httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@hyperreal.org
Subject cvs commit: apache-2.0/src/main util_script.c
Date Tue, 09 Nov 1999 09:01:19 GMT
ben         99/11/09 01:01:18

  Modified:    src/lib/apr configure.in
               src/lib/apr/include apr_general.h
               src/main util_script.c
  Log:
  Add printf format for ssize_t.
  
  Revision  Changes    Path
  1.23      +9 -8      apache-2.0/src/lib/apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/src/lib/apr/configure.in,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- configure.in	1999/10/21 21:13:15	1.22
  +++ configure.in	1999/11/09 09:01:10	1.23
  @@ -41,14 +41,6 @@
   # This macro needs to be here in case we are on an AIX box.
   AC_AIX
   
  -dnl Checks for integer size
  -AC_CHECK_SIZEOF(char, 1)
  -AC_CHECK_SIZEOF(int, 4)
  -AC_CHECK_SIZEOF(long, 4)
  -AC_CHECK_SIZEOF(short, 2)
  -AC_CHECK_SIZEOF(long double, 12)
  -AC_CHECK_SIZEOF(long long, 8)
  -
   dnl Checks for standard typedefs
   AC_TYPE_OFF_T
   AC_TYPE_PID_T
  @@ -56,6 +48,15 @@
   AC_TYPE_UID_T
   AC_CHECK_TYPE(ssize_t, int)
   AC_C_INLINE
  +
  +dnl Checks for integer size
  +AC_CHECK_SIZEOF(char, 1)
  +AC_CHECK_SIZEOF(int, 4)
  +AC_CHECK_SIZEOF(long, 4)
  +AC_CHECK_SIZEOF(short, 2)
  +AC_CHECK_SIZEOF(long double, 12)
  +AC_CHECK_SIZEOF(long long, 8)
  +AC_CHECK_SIZEOF(ssize_t, 4)
   
   # Use /bin/sh if it exists, otherwise go looking for sh in the path
   if test ".$SH" = . -a -f /bin/sh; then
  
  
  
  1.9       +8 -0      apache-2.0/src/lib/apr/include/apr_general.h
  
  Index: apr_general.h
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/src/lib/apr/include/apr_general.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- apr_general.h	1999/11/09 08:53:53	1.8
  +++ apr_general.h	1999/11/09 09:01:14	1.9
  @@ -117,6 +117,14 @@
   typedef ssize_t                ap_ssize_t;
   typedef off_t                  ap_off_t;
   
  +#if SIZEOF_SSIZE_T == SIZEOF_INT
  +# define APR_SSIZE_T_FMT "d"
  +#elif SIZEOF_SSIZE_T == SIZEOF_LONG
  +# define APR_SSIZE_T_FMT "ld"
  +#else
  +# error "Don't know ssize_t printf format"
  +#endif
  +
   typedef struct context_t  ap_context_t;
   typedef int               ap_signum_t;
   
  
  
  
  1.18      +2 -2      apache-2.0/src/main/util_script.c
  
  Index: util_script.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/src/main/util_script.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- util_script.c	1999/10/31 09:26:03	1.17
  +++ util_script.c	1999/11/09 09:01:15	1.18
  @@ -639,13 +639,13 @@
   	ap_rputs("   1k", r);
       }
       else if (size < 1048576) {
  -	ap_rprintf(r, "%4ldk", (size + 512) / 1024);
  +	ap_rprintf(r, "%4" APR_SSIZE_T_FMT "k", (size + 512) / 1024);
       }
       else if (size < 103809024) {
   	ap_rprintf(r, "%4.1fM", size / 1048576.0);
       }
       else {
  -	ap_rprintf(r, "%4ldM", (size + 524288) / 1048576);
  +	ap_rprintf(r, "%4" APR_SSIZE_T_FMT "M", (size + 524288) / 1048576);
       }
   }
   
  
  
  

Mime
View raw message