summaryrefslogtreecommitdiff
path: root/main/snprintf.h
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-09-14 09:12:54 +0000
committerMarcus Boerger <helly@php.net>2003-09-14 09:12:54 +0000
commit9b98e42f3590e4b2d70923632b445df32a9dfc5e (patch)
tree2001a0f0cf2545722de983b2d5dab7de5b0b61de /main/snprintf.h
parentcb5b1690ace07cf4af15b04c2a09b80f376fc976 (diff)
downloadphp-git-9b98e42f3590e4b2d70923632b445df32a9dfc5e.tar.gz
- 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.
Diffstat (limited to 'main/snprintf.h')
-rw-r--r--main/snprintf.h25
1 files changed, 24 insertions, 1 deletions
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;