httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject [PATCH] potential fix for the APR_OFF_T_FMT warning
Date Wed, 28 Jun 2000 21:45:52 GMT

I am submitting this patch, because I don't know if it is a good idea or
not.  Part of me likes it, part of me thinks it's a BIG hack.  

Basically, we just swap the order in which we check the ap_off_t size.  It
sounds far too easy to work, but I think it might be good enough.

Basically, my thinking is that this is a gcc-only thing, and it is
potentially a gcc-on-linux-only thing.  Although I doubt that.

I am taking chances with this patch.  I am assuming that if a platform has
int and long int that are both the same length, then the developers chose
long int for off_t because it will make things easier in the future.  This
may be a HUGE gamble.

Please, post comments, tell me I'm crazy, anything.  If people don't like
this, I'll try to fix the problem another way.

Ryan

Index: lib/apr/configure.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v
retrieving revision 1.128
diff -u -d -b -w -u -r1.128 configure.in
--- lib/apr/configure.in	2000/06/28 16:31:07	1.128
+++ lib/apr/configure.in	2000/06/28 21:39:53
@@ -370,12 +370,12 @@
 
 AC_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
 
-if test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_int"; then
-    off_t_fmt='#define APR_OFF_T_FMT "d"'
+if test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long_long"; then
+    off_t_fmt='#define APR_OFF_T_FMT "qd"'
 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"'
+elif test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_int"; then
+    off_t_fmt='#define APR_OFF_T_FMT "d"'
 else
     off_t_fmt='#error Can not determine the proper size for off_t'
 fi

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message