summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-04-11 11:02:13 +0000
committerYang Tse <yangsita@gmail.com>2007-04-11 11:02:13 +0000
commit84c5e846b335f6dc760afb139be31b67aa708687 (patch)
treec89e7f1486ad5f0444de6b4adcdcbcdb2b48b0be
parent47f044265e5e10a3fbcbfddb7849a816c102216e (diff)
downloadgnurl-84c5e846b335f6dc760afb139be31b67aa708687.tar.gz
gnurl-84c5e846b335f6dc760afb139be31b67aa708687.tar.bz2
gnurl-84c5e846b335f6dc760afb139be31b67aa708687.zip
convenience SIG_ATOMIC_T macro definition
-rw-r--r--ares/setup_once.h11
-rw-r--r--lib/setup_once.h11
2 files changed, 22 insertions, 0 deletions
diff --git a/ares/setup_once.h b/ares/setup_once.h
index 083fdbc4f..c80fc32d9 100644
--- a/ares/setup_once.h
+++ b/ares/setup_once.h
@@ -213,6 +213,17 @@ typedef int sig_atomic_t;
/*
+ * Convenience SIG_ATOMIC_T definition
+ */
+
+#ifdef HAVE_SIG_ATOMIC_T_VOLATILE
+#define SIG_ATOMIC_T static sig_atomic_t
+#else
+#define SIG_ATOMIC_T static volatile sig_atomic_t
+#endif
+
+
+/*
* Default return type for signal handlers.
*/
diff --git a/lib/setup_once.h b/lib/setup_once.h
index 03141a4ff..4bbde0ec8 100644
--- a/lib/setup_once.h
+++ b/lib/setup_once.h
@@ -220,6 +220,17 @@ typedef int sig_atomic_t;
/*
+ * Convenience SIG_ATOMIC_T definition
+ */
+
+#ifdef HAVE_SIG_ATOMIC_T_VOLATILE
+#define SIG_ATOMIC_T static sig_atomic_t
+#else
+#define SIG_ATOMIC_T static volatile sig_atomic_t
+#endif
+
+
+/*
* Default return type for signal handlers.
*/