You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2002/03/16 19:42:00 UTC

cvs commit: apr/test testfmt.c

wrowe       02/03/16 10:42:00

  Modified:    .        configure.in
               include  apr.h.in apr.hnw apr.hw
               test     testfmt.c
  Log:
    Back out some over-engineering.  We use pid_t throughout - and this
    'well known identifier' is entirely distict from an apr_os_proc_t
    [on some, they are equivialant, on Win32, os_proc_t is a proc handle.]
  
    Simplify s/APR_OS_PROC_T_FMT/APR_PID_T_FMT/, apr_os_foo types should
    never be represented as display entities.
  
  Revision  Changes    Path
  1.418     +6 -6      apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.417
  retrieving revision 1.418
  diff -u -r1.417 -r1.418
  --- configure.in	11 Mar 2002 17:22:32 -0000	1.417
  +++ configure.in	16 Mar 2002 18:42:00 -0000	1.418
  @@ -1044,13 +1044,13 @@
   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"'
  +    pid_t_fmt='#define APR_PID_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"'
  +    pid_t_fmt='#define APR_PID_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"'
  +    pid_t_fmt='#define APR_PID_T_FMT "qd"'
   else
  -    os_proc_t_fmt='#error Can not determine the proper size for pid_t'
  +    pid_t_fmt='#error Can not determine the proper size for pid_t'
   fi
   
   # Basically, we have tried to figure out the correct format strings
  @@ -1067,7 +1067,7 @@
          ;;
      *-solaris*)
          off_t_fmt='#define APR_OFF_T_FMT "ld"'
  -       os_proc_t_fmt='#define APR_OS_PROC_T_FMT "ld"'
  +       pid_t_fmt='#define APR_PID_T_FMT "ld"'
          ;;
      *aix4*|*aix5*)
          ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"'
  @@ -1096,7 +1096,7 @@
   AC_SUBST(ssize_t_fmt) 
   AC_SUBST(size_t_fmt)
   AC_SUBST(off_t_fmt) 
  -AC_SUBST(os_proc_t_fmt)
  +AC_SUBST(pid_t_fmt)
   AC_SUBST(int64_literal) 
   AC_SUBST(stdint) 
   
  
  
  
  1.103     +2 -2      apr/include/apr.h.in
  
  Index: apr.h.in
  ===================================================================
  RCS file: /home/cvs/apr/include/apr.h.in,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- apr.h.in	23 Feb 2002 12:00:48 -0000	1.102
  +++ apr.h.in	16 Mar 2002 18:42:00 -0000	1.103
  @@ -249,8 +249,8 @@
   /* And APR_OFF_T_FMT */
   @off_t_fmt@
   
  -/* And APR_OS_PROC_T_FMT */
  -@os_proc_t_fmt@
  +/* And APR_PID_T_FMT */
  +@pid_t_fmt@
   
   /* And APR_INT64_T_FMT */
   @int64_t_fmt@
  
  
  
  1.10      +1 -1      apr/include/apr.hnw
  
  Index: apr.hnw
  ===================================================================
  RCS file: /home/cvs/apr/include/apr.hnw,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- apr.hnw	14 Mar 2002 16:50:11 -0000	1.9
  +++ apr.hnw	16 Mar 2002 18:42:00 -0000	1.10
  @@ -307,7 +307,7 @@
   
   #define APR_OFF_T_FMT            "ld"
   
  -#define APR_OS_PROC_T_FMT        "d"
  +#define APR_PID_T_FMT            "d"
   
   /* Local machine definition for console and log output. */
   #define APR_EOL_STR              "\r\n"
  
  
  
  1.91      +2 -1      apr/include/apr.hw
  
  Index: apr.hw
  ===================================================================
  RCS file: /home/cvs/apr/include/apr.hw,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- apr.hw	13 Mar 2002 20:39:13 -0000	1.90
  +++ apr.hw	16 Mar 2002 18:42:00 -0000	1.91
  @@ -403,7 +403,8 @@
   
   #define APR_OFF_T_FMT            "I64d"
   
  -#define APR_OS_PROC_T_FMT        "d"
  +/* XXX: Win64 portability problem? */
  +#define APR_PID_T_FMT            "d"
   
   #define APR_INT64_T_FMT          "I64d"
   
  
  
  
  1.4       +2 -2      apr/test/testfmt.c
  
  Index: testfmt.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testfmt.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- testfmt.c	13 Mar 2002 20:39:27 -0000	1.3
  +++ testfmt.c	16 Mar 2002 18:42:00 -0000	1.4
  @@ -77,8 +77,8 @@
       }
   
       {
  -        apr_os_proc_t var = 0;
  -        sprintf(buf, "%" APR_OS_PROC_T_FMT, var);
  +        pid_t var = 0;
  +        sprintf(buf, "%" APR_PID_T_FMT, var);
       }
   
       {