cvs: php4(PHP_4_3) /ext/interbase interbase.c php_interbase.h
| From: | Daniela Mariaschi | Date: | Wed, 14 May 2003 08:26:34 +0000 |
| Subject: | cvs: php4(PHP_4_3) /ext/interbase interbase.c php_interbase.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-20893@lists.php.net to get a copy of this message | ||
daniela Wed May 14 04:26:34 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/interbase interbase.c php_interbase.h
Log:
MFH: better fix bug #20641.
Overflow numeric/deciaml datatype on NT
Index: php4/ext/interbase/interbase.c
diff -u php4/ext/interbase/interbase.c:1.91.2.5 php4/ext/interbase/interbase.c:1.91.2.6
--- php4/ext/interbase/interbase.c:1.91.2.5 Mon May 5 18:45:32 2003
+++ php4/ext/interbase/interbase.c Wed May 14 04:26:34 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interbase.c,v 1.91.2.5 2003/05/05 22:45:32 daniela Exp $ */
+/* $Id: interbase.c,v 1.91.2.6 2003/05/14 08:26:34 daniela Exp $ */
/* TODO: Arrays, roles?
@@ -619,7 +619,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.91.2.5 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.91.2.6 $");
#ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "yes");
#endif
@@ -1830,8 +1830,8 @@
sprintf(dt, "%%0.%df", -scale);
val->value.str.len = sprintf (string_data, dt, number/f );
} else {
- val->value.str.len = sprintf (string_data, "%.0f",
- (double)(ISC_INT64) (*((ISC_INT64 *)data)));
+ val->value.str.len =sprintf (string_data, "%.0" ISC_INT64_FORMAT "d",
+ (ISC_INT64) *(ISC_INT64 *) data);
}
val->value.str.val = estrdup(string_data);
Index: php4/ext/interbase/php_interbase.h
diff -u php4/ext/interbase/php_interbase.h:1.28.2.1 php4/ext/interbase/php_interbase.h:1.28.2.2
--- php4/ext/interbase/php_interbase.h:1.28.2.1 Tue Dec 31 11:34:46 2002
+++ php4/ext/interbase/php_interbase.h Wed May 14 04:26:34 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_interbase.h,v 1.28.2.1 2002/12/31 16:34:46 sebastian Exp $ */
+/* $Id: php_interbase.h,v 1.28.2.2 2003/05/14 08:26:34 daniela Exp $ */
#ifndef PHP_INTERBASE_H
#define PHP_INTERBASE_H
@@ -30,9 +30,16 @@
#ifdef PHP_WIN32
#define PHP_IBASE_API __declspec(dllexport)
+#ifndef ISC_INT64_FORMAT
+ #define ISC_INT64_FORMAT "I64"
+#endif
#else
#define PHP_IBASE_API
+#ifndef ISC_INT64_FORMAT
+ #define ISC_INT64_FORMAT "ll"
+#endif
#endif
+
PHP_MINIT_FUNCTION(ibase);
PHP_RINIT_FUNCTION(ibase);