From 9b98e42f3590e4b2d70923632b445df32a9dfc5e Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sun, 14 Sep 2003 09:12:54 +0000 Subject: - Add length modifiers(ll, j, t, h, hh) # Still missing formats (%a, %A) # Still missing modifier (l) in (%lc, %ls) # Still missing modifier (L) in (%La, %LA, %Le, %LE, %Lf, %LF, %Lg, %LG) # C99 requires any conversion to be able to produce at least 4095 # characters. Implementation only allows less then 512. # # Only inside ext/mbstring etc. we could use %lc and %ls. And none of the # rest should affect us until we stay with double and avoid long double. --- main/snprintf.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'main/snprintf.h') diff --git a/main/snprintf.h b/main/snprintf.h index e810826a6e..da659c3bec 100644 --- a/main/snprintf.h +++ b/main/snprintf.h @@ -83,12 +83,35 @@ typedef enum { NO = 0, YES = 1 } boolean_e; +typedef enum { + LM_STD = 0, +#if SIZEOF_INTMAX_T + LM_INTMAX_T, +#endif +#if SIZEOF_PTRDIFF_T + LM_PTRDIFF_T, +#endif +#if SIZEOF_LONG_LONG + LM_LONG_LONG, +#endif + LM_SIZE_T, + LM_LONG +} length_modifier_e; + 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); -#define WIDE_INT long +#if SIZEOF_LONG_LONG_INT +# define WIDE_INT long long int +#elif SIZEOF_LONG_LONG +# define WIDE_INT long long +#elif _WIN64 +# define WIDE_INT __int64 +#else +# define WIDE_INT long +#endif typedef WIDE_INT wide_int; typedef unsigned WIDE_INT u_wide_int; -- cgit v1.2.1