rbb         99/12/27 15:00:37

  Modified:    src/lib/apr configure.in
               src/lib/apr/include apr.h.in apr_general.h
  Log:
  Move the test and defintion of APR_SSIZE_T_FMT.  This was causing problems,
  because the SIZEOF_SSIZE_T macro was in apr_config.h which apr_general.h
  doesn't have access to.  This puts the APR_SSIZE_T_FMT macro in apr.h, which
  is where it really belongs now, because it is a macro which is meant for use
  by external programs.
  
  Revision  Changes    Path
  1.40      +9 -0      apache-2.0/src/lib/apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- configure.in      1999/12/22 21:24:42     1.39
  +++ configure.in      1999/12/27 23:00:31     1.40
  @@ -144,6 +144,14 @@
   
   AC_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
   
  +if test "$ac_cv_sizeof_ssize_t" = "$ac_cv_sizeof_int"; then
  +    ssize_t_fmt='#define APR_SSIZE_T_FMT "d"'
  +elif test "$ac_cv_sizeof_ssize_t" = "$ac_cv_sizeof_long"; then
  +    ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"'
  +else
  +    ssize_t_fmt='#error Can not determine the proper size for ssize_t'
  +fi
  +
   # Use /bin/sh if it exists, otherwise go looking for sh in the path
   if test ".$SH" = . -a -f /bin/sh; then
     SH="/bin/sh"
  @@ -361,6 +369,7 @@
   AC_SUBST(fcntlser)
   AC_SUBST(procpthreadser)
   AC_SUBST(pthreadser)
  +AC_SUBST(ssize_t_fmt)
   
   AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
   [AC_TRY_COMPILE([#include <sys/types.h>
  
  
  
  1.8       +9 -0      apache-2.0/src/lib/apr/include/apr.h.in
  
  Index: apr.h.in
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr.h.in,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- apr.h.in  1999/12/20 16:10:10     1.7
  +++ apr.h.in  1999/12/27 23:00:34     1.8
  @@ -72,5 +72,14 @@
   #define API_VAR_IMPORT           extern
   #define API_VAR_EXPORT           
   
  +/* Define APR_SSIZE_T_FMT.  
  + * If ssize_t is an integer we define it to be "d",
  + * if ssize_t is a long int we define it to be "ld",
  + * if ssize_t is neither we declare an error here.
  + * I looked for a better way to define this here, but couldn't find one, so
  + * to find the logic for this definition search for "ssize_t_fmt" in
  + * configure.in.
  + */
  [EMAIL PROTECTED]@
   
   #endif /* APR_H */
  
  
  
  1.14      +0 -8      apache-2.0/src/lib/apr/include/apr_general.h
  
  Index: apr_general.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_general.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- apr_general.h     1999/12/09 21:00:22     1.13
  +++ apr_general.h     1999/12/27 23:00:34     1.14
  @@ -79,14 +79,6 @@
   
   #define MAXIMUM_WAIT_OBJECTS 64
   
  -#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;
   
  
  
  

Reply via email to