apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Saxon Druce" <sa...@blocksoftware.com>
Subject [PATCH] Borland C++ Builder signals
Date Wed, 25 Jun 2003 06:35:40 GMT

This is a repost of the patch below, which I posted on the 3rd of June and
14th of May.

Under Borland C++ Builder 6.0 (bcc32 5.6) the existing code produces about a
hundred warnings like this:

[C++ Warning] signal.h(65): W8017 Redefinition of 'SIGUSR1' is not identical
[C++ Warning] signal.h(66): W8017 Redefinition of 'SIGUSR2' is not identical
[C++ Warning] apr_private.h(132): W8017 Redefinition of 'SIGUSR1' is not
[C++ Warning] apr_private.h(134): W8017 Redefinition of 'SIGUSR2' is not

This is because Borland's signal.h defines SIGUSR1 and SIGUSR2 with
different values to the ones defined in apr_private.h. Microsoft Visual
C++'s signal.h doesn't define SIGUSR1 or SIGUSR2 at all, which is why it

The patch changes SIGUSR1 and SIGUSR2 to use the same values as defined in
Borland's signal.h, includes signal.h to ensure the system definitions are
available in apr_private.h, and only defines SIGUSR1 and SIGUSR2 if they're
not previously defined (eg in signal.h).

Is there something wrong with the patch, or is the person responsible for
reviewing it just busy? Should I keep posting it every so often?

Saxon Druce (saxon@blocksoftware.com)


--- apr/include/arch/win32/apr_private.h.old    Tue May 13 14:35:29 2003
+++ apr/include/arch/win32/apr_private.h        Wed May 14 08:14:42 2003
@@ -105,6 +105,10 @@
 #include <time.h>

+#include <signal.h>
 /* Use this section to define all of the HAVE_FOO_H
  * that are required to build properly.
@@ -129,14 +133,20 @@
 #define SIGBUS     7
 /* 8 is used for SIGFPE on windows */
 #define SIGKILL    9
-#define SIGUSR1    10
+#define SIGSTKFLT  10
 /* 11 is used for SIGSEGV on windows */
-#define SIGUSR2    12
+#define SIGCHLD    12
 #define SIGPIPE    13
 #define SIGALRM    14
 /* 15 is used for SIGTERM on windows */
-#define SIGSTKFLT  16
-#define SIGCHLD    17
+#ifndef SIGUSR1
+/* 16 is used for SIGUSR1 with Borland C++ */
+#define SIGUSR1    16
+#ifndef SIGUSR2
+/* 17 is used for SIGUSR2 with Borland C++ */
+#define SIGUSR2    17
 #define SIGCONT    18
 #define SIGSTOP    19
 #define SIGTSTP    20

View raw message