apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: apr/threadproc/unix signals.c
Date Tue, 23 Jul 2002 17:01:57 GMT
rbb         2002/07/23 10:01:57

  Modified:    threadproc/unix signals.c
  Log:
  The old macro was blowing up on some platforms that weren't using gcc.
  Specifically, True64 with the cc compiler.  This resolves that problem
  by using a cleaner macro.
  
  Revision  Changes    Path
  1.49      +8 -2      apr/threadproc/unix/signals.c
  
  Index: signals.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/unix/signals.c,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- signals.c	8 Jun 2002 18:47:56 -0000	1.48
  +++ signals.c	23 Jul 2002 17:01:57 -0000	1.49
  @@ -167,8 +167,14 @@
   static const char *signal_description[APR_NUMSIG];
   
   #define store_desc(index, string) \
  -	(assert(index < APR_NUMSIG), \
  -         signal_description[index] = string)
  +        do { \
  +            if (index >= APR_NUMSIG) { \
  +                assert(index < APR_NUMSIG); \ 
  +            } \
  +            else { \
  +                signal_description[index] = string; \
  +            } \
  +        } while (0)
   
   void apr_signal_init(apr_pool_t *pglobal)
   {
  
  
  

Mime
View raw message