Don't attempt to pull in <sys/cdefs.h> directly.

<sys/cdefs.h> is not a standard header. Instead, we'd better pull in a
common header like <stdio.h>. It is very likely that such a header
already provides the necessary bits.
This commit is contained in:
Ed Schouten 2015-01-07 22:22:52 +01:00
parent f9fd21c96f
commit 9a48c87386
1 changed files with 5 additions and 10 deletions

View File

@ -1,9 +1,11 @@
#ifndef _CDEFS_COMPAT_H_
#define _CDEFS_COMPAT_H_
#ifndef _WIN32
#include "sys/cdefs.h"
#else /* _WIN32 */
/*
* We cannot be certain that this operating system has <sys/cdefs.h>.
* Instead, include a header file that is likely to pull in this header.
*/
#include <stdio.h>
#if defined(__cplusplus)
#define __BEGIN_DECLS extern "C" {
@ -13,13 +15,6 @@
#define __END_DECLS
#endif
#define _SYS_CDEFS_H_
#endif /* _WIN32 */
#ifdef __GNUC__
#ifndef __strong_reference
#ifdef __APPLE__