summaryrefslogtreecommitdiff
path: root/setup_once.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2006-11-22 18:41:35 (GMT)
committerYang Tse <yangsita@gmail.com>2006-11-22 18:41:35 (GMT)
commit7f7d2ad5c69b1feca96ab68e18a635079d190d0b (patch)
treeb6a5a43ab88df69156fb811aec94344d054c35ee /setup_once.h
parent4a23aef23c1cc3f958b381bac54c31d67744e8e6 (diff)
downloadc-ares-7f7d2ad5c69b1feca96ab68e18a635079d190d0b.zip
c-ares-7f7d2ad5c69b1feca96ab68e18a635079d190d0b.tar.gz
c-ares-7f7d2ad5c69b1feca96ab68e18a635079d190d0b.tar.bz2
Added a check in configure that verifies if <signal.h> is available,
defining HAVE_SIGNAL_H if the header is available. Added a check in configure that tests if the sig_atomic_t type is available, defining HAVE_SIG_ATOMIC_T if it is available. Providing a suitable default in setup_once.h if not available. Added a check in configure that tests if the sig_atomic_t type is already defined as volatile, defining HAVE_SIG_ATOMIC_T_VOLATILE if it is available and already defined as volatile.
Diffstat (limited to 'setup_once.h')
-rw-r--r--setup_once.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/setup_once.h b/setup_once.h
index 224ab69..23d75ca 100644
--- a/setup_once.h
+++ b/setup_once.h
@@ -123,5 +123,15 @@
#define ISPRINT(x) (isprint((int) ((unsigned char)x)))
+/*
+ * Typedef to 'int' if sig_atomic_t is not an available 'typedefed' type.
+ */
+
+#ifndef HAVE_SIG_ATOMIC_T
+typedef int sig_atomic_t;
+#define HAVE_SIG_ATOMIC_T
+#endif
+
+
#endif /* __SETUP_ONCE_H */