From cbdc8ca82011df4a524baa08d28f0ffb4ae40cb6 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Tue, 21 Jul 2015 12:04:07 -0600 Subject: tighten up compat include paths, fix glibc compatibility --- include/compat/stdlib.h | 8 +++----- include/compat/sys/stat.h | 7 ++++--- include/compat/sys/types.h | 6 +++--- include/compat/time.h | 5 ----- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/include/compat/stdlib.h b/include/compat/stdlib.h index 47189fd..e31f075 100644 --- a/include/compat/stdlib.h +++ b/include/compat/stdlib.h @@ -3,18 +3,16 @@ * Public domain */ -#ifndef LIBCRYPTOCOMPAT_STDLIB_H -#define LIBCRYPTOCOMPAT_STDLIB_H - #ifdef _MSC_VER #include <../include/stdlib.h> #else #include_next #endif +#ifndef LIBCRYPTOCOMPAT_STDLIB_H +#define LIBCRYPTOCOMPAT_STDLIB_H + #include -#include -//#include #include #ifndef HAVE_ARC4RANDOM_BUF diff --git a/include/compat/sys/stat.h b/include/compat/sys/stat.h index 55135d8..9d48251 100644 --- a/include/compat/sys/stat.h +++ b/include/compat/sys/stat.h @@ -6,7 +6,10 @@ #ifndef LIBCRYPTOCOMPAT_SYS_STAT_H #define LIBCRYPTOCOMPAT_SYS_STAT_H -#ifdef _MSC_VER +#ifndef _MSC_VER +#include_next +#else + #include #include <../include/sys/stat.h> @@ -88,8 +91,6 @@ #define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR) #define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK) -#else -#include_next #endif #endif diff --git a/include/compat/sys/types.h b/include/compat/sys/types.h index 9929dd5..38dc582 100644 --- a/include/compat/sys/types.h +++ b/include/compat/sys/types.h @@ -3,15 +3,15 @@ * sys/types.h compatibility shim */ -#ifndef LIBCRYPTOCOMPAT_SYS_TYPES_H -#define LIBCRYPTOCOMPAT_SYS_TYPES_H - #ifdef _MSC_VER #include <../include/sys/types.h> #else #include_next #endif +#ifndef LIBCRYPTOCOMPAT_SYS_TYPES_H +#define LIBCRYPTOCOMPAT_SYS_TYPES_H + #include #ifdef __MINGW32__ diff --git a/include/compat/time.h b/include/compat/time.h index d363d42..2712951 100644 --- a/include/compat/time.h +++ b/include/compat/time.h @@ -3,14 +3,9 @@ * sys/time.h compatibility shim */ -#ifndef LIBCRYPTOCOMPAT_TIME_H -#define LIBCRYPTOCOMPAT_TIME_H - #ifdef _MSC_VER #include <../include/time.h> #define gmtime_r(tp, tm) ((gmtime_s((tm), (tp)) == 0) ? (tm) : NULL) #else #include_next #endif - -#endif -- cgit v1.2.3-55-g6feb