summaryrefslogtreecommitdiff
path: root/fmacros.h
diff options
context:
space:
mode:
authorbyte2016 <[email protected]>2018-06-12 19:40:56 +0800
committerbyte2016 <[email protected]>2018-06-12 19:40:56 +0800
commitc99fe40d6c3fff9bd87702c1faf2048bfdc4a5b5 (patch)
treeb8c53d5ccc86cebd10c44bf1d94ed8384c7f8f97 /fmacros.h
Init commitHEADmaster
Diffstat (limited to 'fmacros.h')
-rw-r--r--fmacros.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/fmacros.h b/fmacros.h
new file mode 100644
index 0000000..a3b1df0
--- /dev/null
+++ b/fmacros.h
@@ -0,0 +1,23 @@
+#ifndef __HIREDIS_FMACRO_H
+#define __HIREDIS_FMACRO_H
+
+#if defined(__linux__)
+#ifndef _BSD_SOURCE
+#define _BSD_SOURCE
+#endif
+#define _DEFAULT_SOURCE
+#endif
+
+#if defined(__sun__)
+#define _POSIX_C_SOURCE 200112L
+#elif defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__)
+#define _XOPEN_SOURCE 600
+#else
+#define _XOPEN_SOURCE
+#endif
+
+#if __APPLE__ && __MACH__
+#define _OSX
+#endif
+
+#endif