| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: compat_defs.h,v 1.79 2011/07/17 20:54:55 joerg Exp $ */ | | 1 | /* $NetBSD: compat_defs.h,v 1.80 2011/08/27 18:33:22 joerg Exp $ */ |
2 | | | 2 | |
3 | #ifndef __NETBSD_COMPAT_DEFS_H__ | | 3 | #ifndef __NETBSD_COMPAT_DEFS_H__ |
4 | #define __NETBSD_COMPAT_DEFS_H__ | | 4 | #define __NETBSD_COMPAT_DEFS_H__ |
5 | | | 5 | |
6 | | | 6 | |
7 | /* Work around some complete brain damage. */ | | 7 | /* Work around some complete brain damage. */ |
8 | /* | | 8 | /* |
9 | * Linux: <features.h> turns on _POSIX_SOURCE by default, even though the | | 9 | * Linux: <features.h> turns on _POSIX_SOURCE by default, even though the |
10 | * program (not the OS) should do that. Preload <features.h> to keep any | | 10 | * program (not the OS) should do that. Preload <features.h> to keep any |
11 | * of this crap from being pulled in, and undefine _POSIX_SOURCE. | | 11 | * of this crap from being pulled in, and undefine _POSIX_SOURCE. |
12 | */ | | 12 | */ |
13 | | | 13 | |
14 | #if defined(__linux__) && HAVE_FEATURES_H | | 14 | #if defined(__linux__) && HAVE_FEATURES_H |
| @@ -104,26 +104,28 @@ struct group; | | | @@ -104,26 +104,28 @@ struct group; |
104 | #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) | | 104 | #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) |
105 | #define __packed __attribute__((__packed__)) | | 105 | #define __packed __attribute__((__packed__)) |
106 | #else | | 106 | #else |
107 | #define __packed error: no __packed for this compiler | | 107 | #define __packed error: no __packed for this compiler |
108 | #endif | | 108 | #endif |
109 | #endif /* !__packed */ | | 109 | #endif /* !__packed */ |
110 | #ifndef __RENAME | | 110 | #ifndef __RENAME |
111 | #define __RENAME(x) | | 111 | #define __RENAME(x) |
112 | #endif | | 112 | #endif |
113 | #undef __aconst | | 113 | #undef __aconst |
114 | #define __aconst | | 114 | #define __aconst |
115 | #undef __dead | | 115 | #undef __dead |
116 | #define __dead | | 116 | #define __dead |
| | | 117 | #undef __printflike |
| | | 118 | #define __printflike(x,y) |
117 | #undef __restrict | | 119 | #undef __restrict |
118 | #define __restrict | | 120 | #define __restrict |
119 | #undef __unused | | 121 | #undef __unused |
120 | #define __unused | | 122 | #define __unused |
121 | #undef __arraycount | | 123 | #undef __arraycount |
122 | #define __arraycount(__x) (sizeof(__x) / sizeof(__x[0])) | | 124 | #define __arraycount(__x) (sizeof(__x) / sizeof(__x[0])) |
123 | | | 125 | |
124 | /* Dirent support. */ | | 126 | /* Dirent support. */ |
125 | | | 127 | |
126 | #if HAVE_DIRENT_H | | 128 | #if HAVE_DIRENT_H |
127 | # if defined(__linux__) && defined(__USE_BSD) | | 129 | # if defined(__linux__) && defined(__USE_BSD) |
128 | # undef __USE_BSD | | 130 | # undef __USE_BSD |
129 | # include <dirent.h> | | 131 | # include <dirent.h> |