From ee00a7f4587c1b75dedb71b5aa3d12608fb7b54c Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 19 Mar 2012 19:19:21 -0500 Subject: Remove "feature test macros", replace non-portable fdprintf() with standard fprintf(). --- lib/portability.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'lib/portability.h') 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 -#include -#define fdprintf(...) dprintf(__VA_ARGS__) +//#define _POSIX_C_SOURCE 200809L +//#define _XOPEN_SOURCE 600 +//#define _BSD_SOURCE +//#define _SVID_SOURCE + +//#include +//#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 +char *strptime(const char *buf, const char *format, struct tm *tm); +#endif #ifdef __GNUC__ #define noreturn __attribute__((noreturn)) -- cgit v1.2.3