2011-03-29 09:02:23 +00:00
|
|
|
#ifndef __HIREDIS_FMACRO_H
|
|
|
|
#define __HIREDIS_FMACRO_H
|
2010-05-18 15:11:09 +00:00
|
|
|
|
2015-01-06 22:46:13 +00:00
|
|
|
#if defined(__linux__)
|
2010-05-18 15:11:09 +00:00
|
|
|
#define _BSD_SOURCE
|
2015-01-06 22:46:13 +00:00
|
|
|
#define _DEFAULT_SOURCE
|
2011-03-29 09:02:23 +00:00
|
|
|
#endif
|
2010-05-18 15:11:09 +00:00
|
|
|
|
2015-08-22 04:58:40 +00:00
|
|
|
#if defined(__CYGWIN__)
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#endif
|
|
|
|
|
2018-01-05 15:17:09 +00:00
|
|
|
#if defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
2015-11-18 08:04:54 +00:00
|
|
|
#define _XOPEN_SOURCE 600
|
2018-01-05 15:17:09 +00:00
|
|
|
#elif defined(__APPLE__) && defined(__MACH__)
|
|
|
|
#define _XOPEN_SOURCE
|
|
|
|
#elif defined(__FreeBSD__)
|
|
|
|
// intentionally left blank, don't define _XOPEN_SOURCE
|
2018-01-05 15:27:10 +00:00
|
|
|
#elif defined(AIX)
|
|
|
|
// intentionally left blank, don't define _XOPEN_SOURCE
|
2018-01-05 15:17:09 +00:00
|
|
|
#else
|
|
|
|
#define _XOPEN_SOURCE
|
2010-05-18 15:11:09 +00:00
|
|
|
#endif
|
2018-01-05 15:17:09 +00:00
|
|
|
|
|
|
|
#if defined(__sun__)
|
|
|
|
#define _POSIX_C_SOURCE 200112L
|
2016-06-20 05:14:41 +00:00
|
|
|
#endif
|
2010-05-18 15:11:09 +00:00
|
|
|
|
2016-04-17 20:23:42 +00:00
|
|
|
#if defined(__APPLE__) && defined(__MACH__)
|
2013-05-01 16:23:06 +00:00
|
|
|
#define _OSX
|
|
|
|
#endif
|
|
|
|
|
2018-01-05 15:27:10 +00:00
|
|
|
#ifndef AIX
|
|
|
|
# define _XOPEN_SOURCE_EXTENDED 1
|
|
|
|
# define _ALL_SOURCE
|
|
|
|
#endif
|
|
|
|
|
2010-05-18 15:11:09 +00:00
|
|
|
#endif
|