summaryrefslogtreecommitdiff
path: root/os_compat.h
diff options
context:
space:
mode:
authorFred Wright <fw@fwright.net>2017-03-04 13:28:29 -0800
committerFred Wright <fw@fwright.net>2017-03-04 13:28:29 -0800
commit2f16a30a4e3a36dd1fe175de885193a73aa99ae6 (patch)
tree6af5745672172cb23c5202d7fedbde8377838b80 /os_compat.h
parentca83e0132b560a1d28acbd0784496ee7c07a6863 (diff)
downloadgpsd-2f16a30a4e3a36dd1fe175de885193a73aa99ae6.tar.gz
Adds default SIGHUP/SIGQUIT defs for non-POSIX builds.
This avoids some build errors on platforms like Windows. Most likely signal() and sigaction() will fail for unsupported signals, but all the GPSD code ignores any such failures, anyway. The definitions match the POSIX values, so they won't collide with other signals on any platform that uses the POSIX numbers for the supported signals. TESTED: Ran "scons build-all" on OSX.
Diffstat (limited to 'os_compat.h')
-rw-r--r--os_compat.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/os_compat.h b/os_compat.h
index 93ea8b06..00e56559 100644
--- a/os_compat.h
+++ b/os_compat.h
@@ -73,6 +73,15 @@ size_t strlcpy(char *dst, const char *src, size_t size);
#endif /* !HAVE_STRLCPY */
+/* Provide missing signal numbers for non-POSIX builds */
+
+#ifndef SIGHUP
+#define SIGHUP 1
+#endif
+#ifndef SIGQUIT
+#define SIGQUIT 3
+#endif
+
# ifdef __cplusplus
}
# endif