From 8d25b39dca33fe0e54b8f1e92de2b886b69ea53d Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Sun, 8 Apr 2012 20:46:02 -0400 Subject: [PATCH] What is __strong_reference? cleaning up compat.h files so it builds on Mac again --- include/cdefs-compat.h | 20 ++++++++++++++------ include/types-compat.h | 12 +++--------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/include/cdefs-compat.h b/include/cdefs-compat.h index 70a714b..3631047 100644 --- a/include/cdefs-compat.h +++ b/include/cdefs-compat.h @@ -8,7 +8,7 @@ #ifndef __WIN32__ #include "sys/cdefs.h" -#else //__WIN32__ +#else /* __WIN32__ */ #if defined(__cplusplus) #define __BEGIN_DECLS extern "C" { @@ -18,9 +18,18 @@ #define __END_DECLS #endif +#endif /* __WIN32__ */ + + + + #ifdef __GNUC__ -#define __strong_reference(sym,aliassym) \ - extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym))); +#ifndef __strong_reference +#define __strong_reference(sym,aliassym) + //extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym))); +#endif /* __strong_reference */ + +#ifndef __weak_reference #ifdef __ELF__ #ifdef __STDC__ #define __weak_reference(sym,alias) \ @@ -56,9 +65,8 @@ __asm__(".stabs \"_/**/sym\",1,0,0,0") #endif /* __STDC__ */ #endif /* __ELF__ */ +#endif /* __weak_reference */ #endif /* __GNUC__ */ -#endif - -#endif \ No newline at end of file +#endif /* _CDEFS_COMPAT_H_ */ diff --git a/include/types-compat.h b/include/types-compat.h index 55de42d..d1272b6 100644 --- a/include/types-compat.h +++ b/include/types-compat.h @@ -5,29 +5,23 @@ #define __WIN32__ #endif -#ifdef __APPLE__ -#include -#include -#endif +#include +#include #ifdef __linux__ /* Not sure what to do about __pure2 on linux */ #define __pure2 -#include -#include #endif #ifdef __WIN32__ /* Not sure what to do about __pure2 on linux */ #define __pure2 -#include #include typedef uint8_t u_int8_t; typedef uint16_t u_int16_t; typedef uint32_t u_int32_t; typedef uint64_t u_int64_t; -#include #endif -#endif \ No newline at end of file +#endif