You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2001/03/01 14:41:47 UTC
cvs commit: apr/include apr.h.in apr.hw
trawick 01/03/01 05:41:47
Modified: . configure.in acconfig.h
include apr.h.in apr.hw
Log:
Add APR_OS_PROC_T_FMT. Hopefully this will be used to get rid
of various unfortunate constructs in Apache (like using %ld for
pid_t but then casting the arg to long).
Revision Changes Path
1.254 +13 -0 apr/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.253
retrieving revision 1.254
diff -u -r1.253 -r1.254
--- configure.in 2001/03/01 12:23:22 1.253
+++ configure.in 2001/03/01 13:41:43 1.254
@@ -603,6 +603,18 @@
off_t_fmt='#error Can not determine the proper size for off_t'
fi
+APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], pid_t, 8)
+
+if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_int"; then
+ os_proc_t_fmt='#define APR_OS_PROC_T_FMT "d"'
+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"'
+else
+ os_proc_t_fmt='#error Can not determine the proper size for pid_t'
+fi
+
# Basically, we have tried to figure out the correct format strings
# for APR types which vary between platforms, but we don't always get
# it right. If you find that we don't get it right for your platform,
@@ -632,6 +644,7 @@
AC_SUBST(ssize_t_fmt)
AC_SUBST(size_t_fmt)
AC_SUBST(off_t_fmt)
+AC_SUBST(os_proc_t_fmt)
dnl #----------------------------- Checking for string functions
AC_CHECK_FUNCS(strnicmp, have_strnicmp="1", have_strnicmp="0")
1.39 +1 -0 apr/acconfig.h
Index: acconfig.h
===================================================================
RCS file: /home/cvs/apr/acconfig.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- acconfig.h 2001/02/21 20:49:28 1.38
+++ acconfig.h 2001/03/01 13:41:44 1.39
@@ -31,6 +31,7 @@
#undef SIZEOF_SSIZE_T
#undef SIZEOF_SIZE_T
#undef SIZEOF_OFF_T
+#undef SIZEOF_PID_T
#undef HAVE_MM_SHMT_MMFILE
1.74 +3 -0 apr/include/apr.h.in
Index: apr.h.in
===================================================================
RCS file: /home/cvs/apr/include/apr.h.in,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- apr.h.in 2001/02/26 16:46:55 1.73
+++ apr.h.in 2001/03/01 13:41:46 1.74
@@ -218,6 +218,9 @@
/* And APR_OFF_T_FMT */
@off_t_fmt@
+/* And APR_OS_PROC_T_FMT */
+@os_proc_t_fmt@
+
/* Local machine definition for console and log output. */
#define APR_EOL_STR "@eolstr@"
1.57 +3 -1 apr/include/apr.hw
Index: apr.hw
===================================================================
RCS file: /home/cvs/apr/include/apr.hw,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- apr.hw 2001/02/25 20:39:31 1.56
+++ apr.hw 2001/03/01 13:41:46 1.57
@@ -280,9 +280,11 @@
#define APR_SSIZE_T_FMT "d"
-#define APR_SIZE_T_FMT "d"
+#define APR_SIZE_T_FMT "d"
#define APR_OFF_T_FMT "ld"
+
+#define APR_OS_PROC_T_FMT "d"
/* Local machine definition for console and log output. */
#define APR_EOL_STR "\r\n"