cvs: php4 /ext/interbase interbase.c php_interbase.h
| From: | Daniela Mariaschi | Date: | Wed, 14 May 2003 08:22:54 +0000 |
| Subject: | cvs: php4 /ext/interbase interbase.c php_interbase.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-20892@lists.php.net to get a copy of this message | ||
daniela Wed May 14 04:22:54 2003 EDT
Modified files:
/php4/ext/interbase interbase.c php_interbase.h
Log:
better fix bug #20641.
Overflow numeric/decimal datatype on NT
Index: php4/ext/interbase/interbase.c
diff -u php4/ext/interbase/interbase.c:1.104 php4/ext/interbase/interbase.c:1.105
--- php4/ext/interbase/interbase.c:1.104 Mon May 5 18:25:29 2003
+++ php4/ext/interbase/interbase.c Wed May 14 04:22:54 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interbase.c,v 1.104 2003/05/05 22:25:29 daniela Exp $ */
+/* $Id: interbase.c,v 1.105 2003/05/14 08:22:54 daniela Exp $ */
/* TODO: Arrays, roles?
@@ -622,7 +622,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.104 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.105 $");
#ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "yes");
#endif
@@ -1828,7 +1828,8 @@
sprintf(dt, "%%0.%df", -scale);
Z_STRLEN_P(val) = sprintf (string_data, dt, number / f);
} else {
- Z_STRLEN_P(val) = sprintf (string_data, "%.0f", (double) (ISC_INT64) (*((ISC_INT64 *)
data)));
+ Z_STRLEN_P(val) =sprintf (string_data, "%.0" ISC_INT64_FORMAT "d",
+ (ISC_INT64) *(ISC_INT64 *) data);
}
Z_STRVAL_P(val) = estrdup(string_data);
Index: php4/ext/interbase/php_interbase.h
diff -u php4/ext/interbase/php_interbase.h:1.29 php4/ext/interbase/php_interbase.h:1.30
--- php4/ext/interbase/php_interbase.h:1.29 Tue Dec 31 11:06:49 2002
+++ php4/ext/interbase/php_interbase.h Wed May 14 04:22:54 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_interbase.h,v 1.29 2002/12/31 16:06:49 sebastian Exp $ */
+/* $Id: php_interbase.h,v 1.30 2003/05/14 08:22:54 daniela Exp $ */
#ifndef PHP_INTERBASE_H
#define PHP_INTERBASE_H
@@ -30,8 +30,14 @@
#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);