diff options
Diffstat (limited to 'lib/portability.h')
-rw-r--r-- | lib/portability.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/lib/portability.h b/lib/portability.h index 832dd123..9b8d294f 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -9,13 +9,22 @@ #define _FILE_OFFSET_BITS 64 -#define _POSIX_C_SOURCE 200809L -#define _XOPEN_SOURCE 600 -#define _BSD_SOURCE -#define _SVID_SOURCE +#include <features.h> -#include <stdio.h> -#define fdprintf(...) dprintf(__VA_ARGS__) +//#define _POSIX_C_SOURCE 200809L +//#define _XOPEN_SOURCE 600 +//#define _BSD_SOURCE +//#define _SVID_SOURCE + +//#include <stdio.h> +//#define fdprintf(...) dprintf(__VA_ARGS__) + +#ifdef __GLIBC__ +// An SUSv4 function that glibc refuses to #define without crazy #defines, +// see http://pubs.opengroup.org/onlinepubs/9699919799/functions/strptime.html +#include <time.h> +char *strptime(const char *buf, const char *format, struct tm *tm); +#endif #ifdef __GNUC__ #define noreturn __attribute__((noreturn)) |