web
Last change
on this file since f6f3e91 was
f6f3e91,
checked in by Jessica B. Hamrick <jhamrick@…>, 15 years ago
|
Preserve directory hierarchy (not sure what happened to it)
|
-
Property mode set to
100644
|
File size:
946 bytes
|
Line | |
---|
1 | /* |
---|
2 | * Portability macros used in include files. |
---|
3 | * |
---|
4 | * Written by Russ Allbery <rra@stanford.edu> |
---|
5 | * This work is hereby placed in the public domain by its author. |
---|
6 | */ |
---|
7 | |
---|
8 | #ifndef PORTABLE_MACROS_H |
---|
9 | #define PORTABLE_MACROS_H 1 |
---|
10 | |
---|
11 | /* |
---|
12 | * __attribute__ is available in gcc 2.5 and later, but only with gcc 2.7 |
---|
13 | * could you use the __format__ form of the attributes, which is what we use |
---|
14 | * (to avoid confusion with other macros). |
---|
15 | */ |
---|
16 | #ifndef __attribute__ |
---|
17 | # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) |
---|
18 | # define __attribute__(spec) /* empty */ |
---|
19 | # endif |
---|
20 | #endif |
---|
21 | |
---|
22 | /* |
---|
23 | * BEGIN_DECLS is used at the beginning of declarations so that C++ |
---|
24 | * compilers don't mangle their names. END_DECLS is used at the end. |
---|
25 | */ |
---|
26 | #undef BEGIN_DECLS |
---|
27 | #undef END_DECLS |
---|
28 | #ifdef __cplusplus |
---|
29 | # define BEGIN_DECLS extern "C" { |
---|
30 | # define END_DECLS } |
---|
31 | #else |
---|
32 | # define BEGIN_DECLS /* empty */ |
---|
33 | # define END_DECLS /* empty */ |
---|
34 | #endif |
---|
35 | |
---|
36 | #endif /* !PORTABLE_MACROS_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.