aboutsummaryrefslogtreecommitdiff
path: root/include/platform.h
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-09 12:35:13 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-09 12:35:13 +0000
commitf81e8dbc74186f34faa5ae2b0fe8bdc3f18114ae (patch)
tree91ee95914c2b9a07817bd6f596fc3df758651147 /include/platform.h
parent327fd47f362843fc62fbee6169904c416ca13d11 (diff)
downloadbusybox-w32-f81e8dbc74186f34faa5ae2b0fe8bdc3f18114ae.tar.gz
busybox-w32-f81e8dbc74186f34faa5ae2b0fe8bdc3f18114ae.tar.bz2
busybox-w32-f81e8dbc74186f34faa5ae2b0fe8bdc3f18114ae.zip
*: make "pragma GCC visibility push(hidden)" less ugly
Diffstat (limited to 'include/platform.h')
-rw-r--r--include/platform.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/platform.h b/include/platform.h
index 13dfcbd32..47fd5f63d 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -4,8 +4,8 @@
4 4
5 Licensed under the GPL v2 or later, see the file LICENSE in this tarball. 5 Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
6*/ 6*/
7#ifndef __PLATFORM_H 7#ifndef BB_PLATFORM_H
8#define __PLATFORM_H 1 8#define BB_PLATFORM_H 1
9 9
10/* Convenience macros to test the version of gcc. */ 10/* Convenience macros to test the version of gcc. */
11#undef __GNUC_PREREQ 11#undef __GNUC_PREREQ
@@ -110,6 +110,16 @@
110# define FAST_FUNC 110# define FAST_FUNC
111#endif 111#endif
112 112
113/* Make all declarations hidden (-fvisibility flag only affects definitions) */
114/* (don't include system headers after this until corresponding pop!) */
115#if __GNUC_PREREQ(4,1)
116# define PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN _Pragma("GCC visibility push(hidden)")
117# define POP_SAVED_FUNCTION_VISIBILITY _Pragma("GCC visibility pop")
118#else
119# define PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
120# define POP_SAVED_FUNCTION_VISIBILITY
121#endif
122
113/* ---- Endian Detection ------------------------------------ */ 123/* ---- Endian Detection ------------------------------------ */
114 124
115#if (defined __digital__ && defined __unix__) 125#if (defined __digital__ && defined __unix__)
@@ -371,4 +381,4 @@ static ALWAYS_INLINE char* strchrnul(const char *s, char c)
371#endif 381#endif
372#endif 382#endif
373 383
374#endif /* platform.h */ 384#endif