Index: ii.c =================================================================== RCS file: /repository/pecl/ingres/ii.c,v retrieving revision 1.107 diff -u -w -r1.107 ii.c --- ii.c 8 Apr 2008 05:15:17 -0000 1.107 +++ ii.c 11 Apr 2008 10:03:49 -0000 @@ -2917,7 +2917,7 @@ int i, j, k, l; double value_double = 0; long value_long = 0; - long long int value_long_long = 0; + ingres_int64 value_long_long = 0; char value_long_long_str[21]; int value_long_long_str_len=0; char *value_char_p; @@ -3165,10 +3165,10 @@ /* PHP does not support BIGINT/INTEGER8 so we have to return */ /* values greater/smaller than the max/min size of a LONG value as a string */ /* Anyone wanting to manipulate this value can use PECL big_int */ - if ((*((long long int *) columnData[k].dv_value) > LONG_MAX ) || - (*((long long int *) columnData[k].dv_value) < LONG_MIN )) + if ((*((ingres_int64 *) columnData[k].dv_value) > LONG_MAX ) || + (*((ingres_int64 *) columnData[k].dv_value) < LONG_MIN )) { - value_long_long = *((long long int *) columnData[k].dv_value); + value_long_long = *((ingres_int64 *) columnData[k].dv_value); sprintf(value_long_long_str, "%lld\0", value_long_long); value_long_long_str_len = strlen(value_long_long_str); } @@ -4668,12 +4668,12 @@ efree(descriptorInfo); return II_FAIL; } - if ((ii_result->procname) && ((*val)->is_ref )) { + if ((ii_result->procname) && (PZVAL_IS_REF(val))) { php_error_docref(NULL TSRMLS_CC, E_ERROR,"Byref parameters can only be used against procedures"); return II_FAIL; } - if ((ii_result->procname != NULL) && ((*val)->is_ref)) { + if ((ii_result->procname != NULL) && (PZVAL_IS_REF(val))) { columnType = IIAPI_COL_PROCBYREFPARM; } Index: ii.h =================================================================== RCS file: /repository/pecl/ingres/ii.h,v retrieving revision 1.33 diff -u -w -r1.33 ii.h --- ii.h 17 Sep 2007 15:30:15 -0000 1.33 +++ ii.h 11 Apr 2008 10:03:49 -0000 @@ -63,6 +63,14 @@ int link_id; /* the link to which this result belongs */ } II_RESULT; +/* The following was added to allow the extension to build on Windows using */ +/* Visual C++ 6.0 */ +#ifdef WIN32 + typedef __int64 ingres_int64; +#else + typedef long long int ingres_int64; +#endif + #define II_FAIL 0 #define II_OK 1 #define II_NO_DATA 2