diff options
| author | Paul Eggert | 2012-12-27 19:13:47 -0800 |
|---|---|---|
| committer | Paul Eggert | 2012-12-27 19:13:47 -0800 |
| commit | 7456e13fa946233d1b4f0beb8371962de5012265 (patch) | |
| tree | dad6f96a1a4a6a9a7411fa27d472cfd82244cca0 /src | |
| parent | 19693cc1740ff2f7edda55b8433652a8ba436e57 (diff) | |
| download | emacs-7456e13fa946233d1b4f0beb8371962de5012265.tar.gz emacs-7456e13fa946233d1b4f0beb8371962de5012265.zip | |
Port EXTERNALLY_VISIBLE to Clang 3.2.
* conf_post.h (__has_attribute): New macro.
(EXTERNALLY_VISIBLE): Use it. This ports to Clang 3.2.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/conf_post.h | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3fabe7579a9..79d1982cc0e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-12-28 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Port EXTERNALLY_VISIBLE to Clang 3.2. | ||
| 4 | * conf_post.h (__has_attribute): New macro. | ||
| 5 | (EXTERNALLY_VISIBLE): Use it. This ports to Clang 3.2. | ||
| 6 | |||
| 1 | 2012-12-27 Glenn Morris <rgm@gnu.org> | 7 | 2012-12-27 Glenn Morris <rgm@gnu.org> |
| 2 | 8 | ||
| 3 | * cygw32.c (Fcygwin_convert_file_name_to_windows) | 9 | * cygw32.c (Fcygwin_convert_file_name_to_windows) |
diff --git a/src/conf_post.h b/src/conf_post.h index b1997e79081..37a426fc451 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -40,6 +40,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 40 | #endif | 40 | #endif |
| 41 | #endif | 41 | #endif |
| 42 | 42 | ||
| 43 | #ifndef __has_attribute | ||
| 44 | # define __has_attribute(a) 0 /* non-clang */ | ||
| 45 | #endif | ||
| 46 | |||
| 43 | /* This silences a few compilation warnings on FreeBSD. */ | 47 | /* This silences a few compilation warnings on FreeBSD. */ |
| 44 | #ifdef BSD_SYSTEM_AHB | 48 | #ifdef BSD_SYSTEM_AHB |
| 45 | #undef BSD_SYSTEM_AHB | 49 | #undef BSD_SYSTEM_AHB |
| @@ -191,7 +195,9 @@ extern void _DebPrint (const char *fmt, ...); | |||
| 191 | #define NO_INLINE | 195 | #define NO_INLINE |
| 192 | #endif | 196 | #endif |
| 193 | 197 | ||
| 194 | #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) | 198 | #if (__clang__ \ |
| 199 | ? __has_attribute (externally_visible) \ | ||
| 200 | : (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))) | ||
| 195 | #define EXTERNALLY_VISIBLE __attribute__((externally_visible)) | 201 | #define EXTERNALLY_VISIBLE __attribute__((externally_visible)) |
| 196 | #else | 202 | #else |
| 197 | #define EXTERNALLY_VISIBLE | 203 | #define EXTERNALLY_VISIBLE |