What is __strong_reference? cleaning up compat.h files so it builds on Mac again

This commit is contained in:
Jameson Nash 2012-04-08 20:46:02 -04:00
parent 0df00dd0f7
commit 8d25b39dca
2 changed files with 17 additions and 15 deletions

View file

@ -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
#endif /* _CDEFS_COMPAT_H_ */

View file

@ -5,29 +5,23 @@
#define __WIN32__
#endif
#ifdef __APPLE__
#include <sys/_types.h>
#include <machine/_limits.h>
#endif
#include <sys/types.h>
#include <machine/limits.h>
#ifdef __linux__
/* Not sure what to do about __pure2 on linux */
#define __pure2
#include <sys/types.h>
#include <limits.h>
#endif
#ifdef __WIN32__
/* Not sure what to do about __pure2 on linux */
#define __pure2
#include <sys/types.h>
#include <stdint.h>
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 <limits.h>
#endif
#endif
#endif