From bcd8a3b2403d6269a121c469273880021f2cfb20 Mon Sep 17 00:00:00 2001
From: Yang Tse <yangsita@gmail.com>
Date: Fri, 24 Nov 2006 16:38:58 +0000
Subject: [PATCH] Define HAVE_SIGNAL_H, HAVE_SIG_ATOMIC_T and
 HAVE_SIG_ATOMIC_T_VOLATILE as appropriate for platforms that don't have
 autotools support

---
 ares/Makefile.dj          | 1 +
 ares/Makefile.netware     | 2 ++
 ares/config-win32.h       | 6 ++++++
 lib/Makefile.netware      | 2 ++
 lib/config-amigaos.h      | 2 ++
 lib/config-mac.h          | 2 ++
 lib/config-riscos.h       | 9 +++++++++
 lib/config-tpf.h          | 9 +++++++++
 lib/config-win32.h        | 6 ++++++
 lib/config-win32ce.h      | 6 ++++++
 lib/config.dos            | 2 ++
 packages/vms/config-vms.h | 9 +++++++++
 src/Makefile.netware      | 2 ++
 src/config-win32.h        | 6 ++++++
 14 files changed, 64 insertions(+)

diff --git a/ares/Makefile.dj b/ares/Makefile.dj
index 5887041580..58ff9c6ae9 100644
--- a/ares/Makefile.dj
+++ b/ares/Makefile.dj
@@ -11,6 +11,7 @@ include Makefile.inc
 CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_FIONBIO \
           -DHAVE_STRUCT_IN6_ADDR -DHAVE_SOCKADDR_IN6_SIN6_SCOPE_ID \
           -DHAVE_SYS_TIME_H -DHAVE_STRUCT_SOCKADDR_IN6 -DHAVE_STRUCT_ADDRINFO \
+          -DHAVE_SIGNAL_H -DHAVE_SIG_ATOMIC_T \
           -DHAVE_ARPA_NAMESER_H -DNS_INADDRSZ=4 -DHAVE_RECV -DHAVE_SEND \
           -DSEND_TYPE_ARG1='int'   -DSEND_QUAL_ARG2='const' \
           -DSEND_TYPE_ARG2='void*' -DSEND_TYPE_ARG3='int' \
diff --git a/ares/Makefile.netware b/ares/Makefile.netware
index b20497f9a6..d0a441daad 100644
--- a/ares/Makefile.netware
+++ b/ares/Makefile.netware
@@ -281,6 +281,8 @@ config.h: Makefile.netware
 	@echo $(DL)#define HAVE_SEND 1$(DL) >> $@
 	@echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
 	@echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
+	@echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
+	@echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
 	@echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
 	@echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
 	@echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
diff --git a/ares/config-win32.h b/ares/config-win32.h
index d88c5a46ba..4b802e138f 100644
--- a/ares/config-win32.h
+++ b/ares/config-win32.h
@@ -29,6 +29,9 @@
 #define HAVE_GETOPT_H 1
 #endif
 
+/* Define if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
 /* Define if you have the <sys/time.h> header file */
 /* #define HAVE_SYS_TIME_H 1 */
 
@@ -57,6 +60,9 @@
 /*                        OTHER HEADER INFO                         */
 /* ---------------------------------------------------------------- */
 
+/* Define if sig_atomic_t is an available typedef. */
+#define HAVE_SIG_ATOMIC_T 1
+
 /* Define if you have the ANSI C header files.  */
 #define STDC_HEADERS 1
 
diff --git a/lib/Makefile.netware b/lib/Makefile.netware
index d9489c4c04..fe4b139d9b 100644
--- a/lib/Makefile.netware
+++ b/lib/Makefile.netware
@@ -324,6 +324,8 @@ config.h: Makefile.netware
 	@echo $(DL)#define HAVE_SEND 1$(DL) >> $@
 	@echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
 	@echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
+	@echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
+	@echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
 	@echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
 	@echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
 	@echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
diff --git a/lib/config-amigaos.h b/lib/config-amigaos.h
index 3d880003d3..0e48a206a5 100644
--- a/lib/config-amigaos.h
+++ b/lib/config-amigaos.h
@@ -31,6 +31,8 @@
 #define HAVE_SETJMP_H 1
 #define HAVE_SGTTY_H 1
 #define HAVE_SIGNAL 1
+#define HAVE_SIGNAL_H 1
+#define HAVE_SIG_ATOMIC_T 1
 #define HAVE_SOCKET 1
 #define HAVE_STRCASECMP 1
 #define HAVE_STRDUP 1
diff --git a/lib/config-mac.h b/lib/config-mac.h
index afca67775f..c376102135 100644
--- a/lib/config-mac.h
+++ b/lib/config-mac.h
@@ -32,6 +32,8 @@
 
 //#define HAVE_STRICMP          1
 #define HAVE_SIGACTION          1
+#define HAVE_SIGNAL_H           1
+#define HAVE_SIG_ATOMIC_T       1
 
 #ifdef MACOS_SSL_SUPPORT
 #       define USE_SSLEAY       1
diff --git a/lib/config-riscos.h b/lib/config-riscos.h
index e2877df751..aedf247937 100644
--- a/lib/config-riscos.h
+++ b/lib/config-riscos.h
@@ -245,6 +245,15 @@
 /* Define if you have the `signal' function. */
 #define HAVE_SIGNAL
 
+/* Define if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H
+
+/* Define if sig_atomic_t is an available typedef. */
+#define HAVE_SIG_ATOMIC_T
+
+/* Define if sig_atomic_t is already defined as volatile. */
+#undef HAVE_SIG_ATOMIC_T_VOLATILE
+
 /* Define if you have the `socket' function. */
 #define HAVE_SOCKET
 
diff --git a/lib/config-tpf.h b/lib/config-tpf.h
index 6b1accc799..7a4843c3eb 100644
--- a/lib/config-tpf.h
+++ b/lib/config-tpf.h
@@ -413,6 +413,15 @@
 /* Define to 1 if you have the `signal' function. */
 #define HAVE_SIGNAL 1
 
+/* Define to 1 if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
+/* Define to 1 if sig_atomic_t is an available typedef. */
+#define HAVE_SIG_ATOMIC_T 1
+
+/* Define to 1 if sig_atomic_t is already defined as volatile. */
+/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */
+
 /* If you have sigsetjmp */
 /* #undef HAVE_SIGSETJMP */
 
diff --git a/lib/config-win32.h b/lib/config-win32.h
index 1090a1c25e..3fd08f5bf3 100644
--- a/lib/config-win32.h
+++ b/lib/config-win32.h
@@ -57,6 +57,9 @@
 #define HAVE_PROCESS_H 1
 #endif
 
+/* Define if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
 /* Define if you have the <sgtty.h> header file.  */
 /* #define HAVE_SGTTY_H 1 */
 
@@ -125,6 +128,9 @@
 /*                        OTHER HEADER INFO                         */
 /* ---------------------------------------------------------------- */
 
+/* Define if sig_atomic_t is an available typedef. */
+#define HAVE_SIG_ATOMIC_T 1
+
 /* Define if you have the ANSI C header files.  */
 #define STDC_HEADERS 1
 
diff --git a/lib/config-win32ce.h b/lib/config-win32ce.h
index 21afc4268e..fc516f2643 100644
--- a/lib/config-win32ce.h
+++ b/lib/config-win32ce.h
@@ -48,6 +48,9 @@
 /* Define if you have the <netinet/in.h> header file.  */
 /* #define HAVE_NETINET_IN_H 1 */
 
+/* Define if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
 /* Define if you have the <sgtty.h> header file.  */
 /* #define HAVE_SGTTY_H 1 */
 
@@ -114,6 +117,9 @@
 /*                        OTHER HEADER INFO                         */
 /* ---------------------------------------------------------------- */
 
+/* Define if sig_atomic_t is an available typedef. */
+#define HAVE_SIG_ATOMIC_T 1
+
 /* Define if you have the ANSI C header files.  */
 #define STDC_HEADERS 1
 
diff --git a/lib/config.dos b/lib/config.dos
index 47d8130aab..d79369d5c7 100644
--- a/lib/config.dos
+++ b/lib/config.dos
@@ -51,6 +51,8 @@
 #define HAVE_SETLOCALE         1
 #define HAVE_SETVBUF           1
 #define HAVE_SIGNAL            1
+#define HAVE_SIGNAL_H          1
+#define HAVE_SIG_ATOMIC_T      1
 #define HAVE_SOCKET            1
 #define HAVE_SPNEGO            1
 #define HAVE_STRDUP            1
diff --git a/packages/vms/config-vms.h b/packages/vms/config-vms.h
index 7c61e2a97f..93f981834e 100644
--- a/packages/vms/config-vms.h
+++ b/packages/vms/config-vms.h
@@ -76,6 +76,15 @@
 /* Define if you have the signal function.  */
 #define HAVE_SIGNAL 1
 
+/* Define if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
+/* Define if sig_atomic_t is an available typedef. */
+#define HAVE_SIG_ATOMIC_T 1
+
+/* Define if sig_atomic_t is already defined as volatile. */
+/* #define HAVE_SIG_ATOMIC_T_VOLATILE 1 */
+
 /* Define if you have the socket function.  */
 #define HAVE_SOCKET 1
 
diff --git a/src/Makefile.netware b/src/Makefile.netware
index a04043b5b5..28aa7582f1 100644
--- a/src/Makefile.netware
+++ b/src/Makefile.netware
@@ -312,6 +312,8 @@ config.h: Makefile.netware
 	@echo $(DL)#define HAVE_SEND 1$(DL) >> $@
 	@echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
 	@echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
+	@echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
+	@echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
 	@echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
 	@echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
 	@echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
diff --git a/src/config-win32.h b/src/config-win32.h
index 710860c731..523147d791 100644
--- a/src/config-win32.h
+++ b/src/config-win32.h
@@ -21,6 +21,9 @@
 /* Define if you have the <locale.h> header file.  */
 #define HAVE_LOCALE_H 1
 
+/* Define if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
 /* Define if you have the <sys/time.h> header file */
 /* #define HAVE_SYS_TIME_H 1 */
 
@@ -56,6 +59,9 @@
 /*                        OTHER HEADER INFO                         */
 /* ---------------------------------------------------------------- */
 
+/* Define if sig_atomic_t is an available typedef. */
+#define HAVE_SIG_ATOMIC_T 1
+
 /* Define if you have the ANSI C header files.  */
 #define STDC_HEADERS 1
 
-- 
GitLab