You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by gs...@locus.apache.org on 2000/04/20 00:50:14 UTC

cvs commit: apache-2.0/src/lib/apr/misc/unix errorcodes.c

gstein      00/04/19 15:50:14

  Modified:    src/lib/apr/misc/unix errorcodes.c
  Log:
  add a missing const. wrap some lines. add parse-safety to SYS_ERR_STRING.
  
  Revision  Changes    Path
  1.2       +11 -5     apache-2.0/src/lib/apr/misc/unix/errorcodes.c
  
  Index: errorcodes.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/unix/errorcodes.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- errorcodes.c	2000/04/19 22:39:35	1.1
  +++ errorcodes.c	2000/04/19 22:50:13	1.2
  @@ -62,7 +62,7 @@
   #error "not implemented yet"
   #else
   #define SYS_ERR_STRING(code, p) \
  -    errstr = strerror(code);
  +    if (1) errstr = strerror(code); else
   #endif
   
   static const char *apr_error_string(ap_status_t statcode)
  @@ -97,9 +97,13 @@
       case APR_EDSOOPEN:
           return "Could not open the dso.";
       case APR_INCHILD:
  -        return "Your code just forked, and you are currently executing in the child process";
  +        return
  +	    "Your code just forked, and you are currently executing in the "
  +	    "child process";
       case APR_INPARENT:
  -        return "Your code just forked, and you are currently executing in the parent process";
  +        return
  +	    "Your code just forked, and you are currently executing in the "
  +	    "parent process";
       case APR_DETACH:
           return "The specified thread is detached";
       case APR_NOTDETACH:
  @@ -125,7 +129,9 @@
       case APR_KEYBASED:
           return "Shared memory is implemented using a key system";
       case APR_EINIT:
  -        return "There is no error, this value signifies an initialized error code";
  +        return
  +	    "There is no error, this value signifies an initialized "
  +	    "error code";
       case APR_ENOTIMPL:
           return "This function has not been implemented on this platform";
       case APR_EMISMATCH:
  @@ -149,7 +155,7 @@
           return "APR does not understand this error code";
       }
       else {
  -        char *errstr;
  +        const char *errstr;
           SYS_ERR_STRING(statcode - APR_OS_START_SYSERR, p);
           return errstr;
       }