cvs: php4 /main snprintf.c snprintf.h
| From: | Sascha Schumann | Date: | Tue, 07 May 2002 13:24:07 +0000 |
| Subject: | cvs: php4 /main snprintf.c snprintf.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-11736@lists.php.net to get a copy of this message | ||
sas Tue May 7 09:24:07 2002 EDT
Modified files:
/php4/main snprintf.c snprintf.h
Log:
use thread-safe functions unconditionally
Index: php4/main/snprintf.c
diff -u php4/main/snprintf.c:1.14 php4/main/snprintf.c:1.15
--- php4/main/snprintf.c:1.14 Tue May 7 01:26:30 2002
+++ php4/main/snprintf.c Tue May 7 09:24:07 2002
@@ -132,6 +132,7 @@
return (p);
}
+#define NDIG 80
/*
@@ -253,14 +254,6 @@
return (p);
}
-#ifdef HAVE_GCVT
-
-#define ap_php_ecvt ecvt
-#define ap_php_fcvt fcvt
-#define ap_php_gcvt gcvt
-
-#else
-
/*
* cvt.c - IEEE floating point formatting routines for FreeBSD
* from GNU libc-4.6.27
@@ -273,7 +266,6 @@
* sign is set to 0 for positive, 1 for negative
*/
-#define NDIG 80
char *
ap_php_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag, char *buf)
@@ -421,8 +413,6 @@
*p2 = '\0';
return (buf);
}
-
-#endif /* HAVE_CVT */
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) || defined(BROKEN_SNPRINTF) ||
defined(BROKEN_VSNPRINTF)
Index: php4/main/snprintf.h
diff -u php4/main/snprintf.h:1.16 php4/main/snprintf.h:1.17
--- php4/main/snprintf.h:1.16 Tue May 7 01:26:30 2002
+++ php4/main/snprintf.h Tue May 7 09:24:07 2002
@@ -38,20 +38,10 @@
NO = 0, YES = 1
} boolean_e;
-#ifdef HAVE_GCVT
-
-#define ap_php_ecvt ecvt
-#define ap_php_fcvt fcvt
-#define ap_php_gcvt gcvt
-
-#else
-
extern char * ap_php_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag, char *buf);
extern char * ap_php_ecvt(double arg, int ndigits, int *decpt, int *sign, char *buf);
extern char * ap_php_fcvt(double arg, int ndigits, int *decpt, int *sign, char *buf);
extern char * ap_php_gcvt(double number, int ndigit, char *buf, boolean_e altform);
-
-#endif
#define WIDE_INT long
typedef WIDE_INT wide_int;