apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Solaris and printf of 64bit values...
Date Sun, 22 Apr 2001 07:14:30 GMT
Solaris doesn't support "qd" in printf format strings for long long.  
All of the other platforms I am aware of also support "lld" (FreeBSD 
and Linux) - it is possible that "qd" is still the only option for 
true 4.4BSD kernels (qd originated there).  OS-dependent flags would 
have to be added for those platforms.  

Recent man pages of Linux call "qd" deprecated and recommend "lld" 
instead.  FreeBSD's man pages don't mention "lld" explictly, but
looking at libc/stdio/vfprintf.c from FreeBSD-4.2 shows it has support
for "lld" support in it.

It looks like whichever compiler has longlong uses "qd" - is this
Win32, by any chance?  Or, should this be switched to "lld" as well?
-- justin

Index: configure.in
===================================================================
RCS file: /home/cvspublic/apr/configure.in,v
retrieving revision 1.290
diff -u -r1.290 configure.in
--- configure.in	2001/04/12 13:05:38	1.290
+++ configure.in	2001/04/22 06:58:10
@@ -703,7 +703,7 @@
 elif test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long"; then
     off_t_fmt='#define APR_OFF_T_FMT "ld"'
 elif test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long_long"; then
-    off_t_fmt='#define APR_OFF_T_FMT "qd"'
+    off_t_fmt='#define APR_OFF_T_FMT "lld"'
 else
     off_t_fmt='#error Can not determine the proper size for off_t'
 fi
@@ -715,7 +715,7 @@
 elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_long"; then
     os_proc_t_fmt='#define APR_OS_PROC_T_FMT "ld"'
 elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_long_long"; then
-    os_proc_t_fmt='#define APR_OS_PROC_T_FMT "qd"'
+    os_proc_t_fmt='#define APR_OS_PROC_T_FMT "lld"'
 else
     os_proc_t_fmt='#error Can not determine the proper size for pid_t'
 fi


Mime
View raw message