aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/busybox.h14
-rw-r--r--include/dump.h8
-rw-r--r--include/grp_.h17
-rw-r--r--include/libbb.h15
-rw-r--r--include/platform.h16
-rw-r--r--include/pwd_.h12
-rw-r--r--include/rtc_.h10
-rw-r--r--include/shadow_.h8
-rw-r--r--include/unarchive.h12
-rw-r--r--include/usage.h8
-rw-r--r--include/xatonum.h8
-rw-r--r--include/xregex.h12
12 files changed, 54 insertions, 86 deletions
diff --git a/include/busybox.h b/include/busybox.h
index 314b95126..54c278f87 100644
--- a/include/busybox.h
+++ b/include/busybox.h
@@ -4,14 +4,12 @@
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 _BB_INTERNAL_H_ 7#ifndef BUSYBOX_H
8#define _BB_INTERNAL_H_ 1 8#define BUSYBOX_H 1
9 9
10#include "libbb.h" 10#include "libbb.h"
11 11
12#if __GNUC_PREREQ(4,1) 12PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
13# pragma GCC visibility push(hidden)
14#endif
15 13
16/* order matters: used as index into "install_dir[]" in appletlib.c */ 14/* order matters: used as index into "install_dir[]" in appletlib.c */
17typedef enum bb_install_loc_t { 15typedef enum bb_install_loc_t {
@@ -71,8 +69,6 @@ int lbb_main(char **argv);
71#endif 69#endif
72#endif 70#endif
73 71
74#if __GNUC_PREREQ(4,1) 72POP_SAVED_FUNCTION_VISIBILITY
75# pragma GCC visibility pop
76#endif
77 73
78#endif /* _BB_INTERNAL_H_ */ 74#endif
diff --git a/include/dump.h b/include/dump.h
index 44f2082b7..925270d9c 100644
--- a/include/dump.h
+++ b/include/dump.h
@@ -1,8 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2 2
3#if __GNUC_PREREQ(4,1) 3PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
4# pragma GCC visibility push(hidden)
5#endif
6 4
7#define F_IGNORE 0x01 /* %_A */ 5#define F_IGNORE 0x01 /* %_A */
8#define F_SETREP 0x02 /* rep count set, not default */ 6#define F_SETREP 0x02 /* rep count set, not default */
@@ -55,6 +53,4 @@ dumper_t* alloc_dumper(void) FAST_FUNC;
55extern void bb_dump_add(dumper_t *dumper, const char *fmt) FAST_FUNC; 53extern void bb_dump_add(dumper_t *dumper, const char *fmt) FAST_FUNC;
56extern int bb_dump_dump(dumper_t *dumper, char **argv) FAST_FUNC; 54extern int bb_dump_dump(dumper_t *dumper, char **argv) FAST_FUNC;
57 55
58#if __GNUC_PREREQ(4,1) 56POP_SAVED_FUNCTION_VISIBILITY
59# pragma GCC visibility pop
60#endif
diff --git a/include/grp_.h b/include/grp_.h
index 3d00b4aa7..deaf9e6a3 100644
--- a/include/grp_.h
+++ b/include/grp_.h
@@ -15,18 +15,15 @@
15 You should have received a copy of the GNU Lesser General Public 15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free 16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */ 18 02111-1307 USA.
19 19 */
20/* 20/*
21 * POSIX Standard: 9.2.1 Group Database Access <grp.h> 21 * POSIX Standard: 9.2.1 Group Database Access <grp.h>
22 */ 22 */
23#ifndef BB_GRP_H
24#define BB_GRP_H 1
23 25
24#ifndef BB_GRP_H 26PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
25#define BB_GRP_H 1
26
27#if __GNUC_PREREQ(4,1)
28# pragma GCC visibility push(hidden)
29#endif
30 27
31/* This file is #included after #include <grp.h> 28/* This file is #included after #include <grp.h>
32 * We will use libc-defined structures, but will #define function names 29 * We will use libc-defined structures, but will #define function names
@@ -115,8 +112,6 @@ extern int getgrouplist(const char *__user, gid_t __group,
115 of which USER is a member. Also include GROUP. */ 112 of which USER is a member. Also include GROUP. */
116extern int initgroups(const char *__user, gid_t __group); 113extern int initgroups(const char *__user, gid_t __group);
117 114
118#if __GNUC_PREREQ(4,1) 115POP_SAVED_FUNCTION_VISIBILITY
119# pragma GCC visibility pop
120#endif
121 116
122#endif 117#endif
diff --git a/include/libbb.h b/include/libbb.h
index 74ec678d8..babf9c9f7 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -7,8 +7,8 @@
7 * 7 *
8 * Licensed under the GPL version 2, see the file LICENSE in this tarball. 8 * Licensed under the GPL version 2, see the file LICENSE in this tarball.
9 */ 9 */
10#ifndef __LIBBUSYBOX_H__ 10#ifndef LIBBB_H
11#define __LIBBUSYBOX_H__ 1 11#define LIBBB_H 1
12 12
13#include "platform.h" 13#include "platform.h"
14 14
@@ -110,9 +110,7 @@ int sysinfo(struct sysinfo* info);
110 110
111/* Make all declarations hidden (-fvisibility flag only affects definitions) */ 111/* Make all declarations hidden (-fvisibility flag only affects definitions) */
112/* (don't include system headers after this until corresponding pop!) */ 112/* (don't include system headers after this until corresponding pop!) */
113#if __GNUC_PREREQ(4,1) 113PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
114# pragma GCC visibility push(hidden)
115#endif
116 114
117 115
118#if ENABLE_USE_BB_PWD_GRP 116#if ENABLE_USE_BB_PWD_GRP
@@ -1532,9 +1530,6 @@ extern const char bb_default_login_shell[];
1532#define ARRAY_SIZE(x) ((unsigned)(sizeof(x) / sizeof((x)[0]))) 1530#define ARRAY_SIZE(x) ((unsigned)(sizeof(x) / sizeof((x)[0])))
1533 1531
1534 1532
1535#if __GNUC_PREREQ(4,1) 1533POP_SAVED_FUNCTION_VISIBILITY
1536# pragma GCC visibility pop
1537#endif
1538
1539 1534
1540#endif /* __LIBBUSYBOX_H__ */ 1535#endif
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
diff --git a/include/pwd_.h b/include/pwd_.h
index a0cf7c9f7..f52445ceb 100644
--- a/include/pwd_.h
+++ b/include/pwd_.h
@@ -21,12 +21,10 @@
21 * POSIX Standard: 9.2.2 User Database Access <pwd.h> 21 * POSIX Standard: 9.2.2 User Database Access <pwd.h>
22 */ 22 */
23 23
24#ifndef BB_PWD_H 24#ifndef BB_PWD_H
25#define BB_PWD_H 1 25#define BB_PWD_H 1
26 26
27#if __GNUC_PREREQ(4,1) 27PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
28# pragma GCC visibility push(hidden)
29#endif
30 28
31/* This file is #included after #include <pwd.h> 29/* This file is #included after #include <pwd.h>
32 * We will use libc-defined structures, but will #define function names 30 * We will use libc-defined structures, but will #define function names
@@ -107,8 +105,6 @@ extern int fgetpwent_r(FILE *__restrict __stream,
107 will expect, but this need not be the format of the password file. */ 105 will expect, but this need not be the format of the password file. */
108/* UNUSED extern int getpw(uid_t __uid, char *__buffer); */ 106/* UNUSED extern int getpw(uid_t __uid, char *__buffer); */
109 107
110#if __GNUC_PREREQ(4,1) 108POP_SAVED_FUNCTION_VISIBILITY
111# pragma GCC visibility pop
112#endif
113 109
114#endif /* pwd.h */ 110#endif /* pwd.h */
diff --git a/include/rtc_.h b/include/rtc_.h
index ae17ee7d4..74bb695a0 100644
--- a/include/rtc_.h
+++ b/include/rtc_.h
@@ -5,13 +5,11 @@
5 */ 5 */
6 6
7#ifndef BB_RTC_H 7#ifndef BB_RTC_H
8#define BB_RTC_H 8#define BB_RTC_H 1
9 9
10#include "libbb.h" 10#include "libbb.h"
11 11
12#if __GNUC_PREREQ(4,1) 12PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
13# pragma GCC visibility push(hidden)
14#endif
15 13
16extern int rtc_adjtime_is_utc(void) FAST_FUNC; 14extern int rtc_adjtime_is_utc(void) FAST_FUNC;
17extern int rtc_xopen(const char **default_rtc, int flags) FAST_FUNC; 15extern int rtc_xopen(const char **default_rtc, int flags) FAST_FUNC;
@@ -71,8 +69,6 @@ struct linux_rtc_wkalrm {
71#define RTC_AF 0x20 69#define RTC_AF 0x20
72#define RTC_UF 0x10 70#define RTC_UF 0x10
73 71
74#if __GNUC_PREREQ(4,1) 72POP_SAVED_FUNCTION_VISIBILITY
75# pragma GCC visibility pop
76#endif
77 73
78#endif 74#endif
diff --git a/include/shadow_.h b/include/shadow_.h
index 60f3e6b5f..02d3bf9a5 100644
--- a/include/shadow_.h
+++ b/include/shadow_.h
@@ -22,9 +22,7 @@
22#ifndef BB_SHADOW_H 22#ifndef BB_SHADOW_H
23#define BB_SHADOW_H 1 23#define BB_SHADOW_H 1
24 24
25#if __GNUC_PREREQ(4,1) 25PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
26# pragma GCC visibility push(hidden)
27#endif
28 26
29/* This file is #included after #include <shadow.h> 27/* This file is #included after #include <shadow.h>
30 * We will use libc-defined structures, but will #define function names 28 * We will use libc-defined structures, but will #define function names
@@ -97,8 +95,6 @@ extern int lckpwdf(void);
97/* Unlock password file */ 95/* Unlock password file */
98extern int ulckpwdf(void); 96extern int ulckpwdf(void);
99 97
100#if __GNUC_PREREQ(4,1) 98POP_SAVED_FUNCTION_VISIBILITY
101# pragma GCC visibility pop
102#endif
103 99
104#endif /* shadow.h */ 100#endif /* shadow.h */
diff --git a/include/unarchive.h b/include/unarchive.h
index 9077130a5..beb962c8f 100644
--- a/include/unarchive.h
+++ b/include/unarchive.h
@@ -1,10 +1,8 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2#ifndef __UNARCHIVE_H__ 2#ifndef UNARCHIVE_H
3#define __UNARCHIVE_H__ 3#define UNARCHIVE_H 1
4 4
5#if __GNUC_PREREQ(4,1) 5PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
6# pragma GCC visibility push(hidden)
7#endif
8 6
9#define ARCHIVE_PRESERVE_DATE 1 7#define ARCHIVE_PRESERVE_DATE 1
10#define ARCHIVE_CREATE_LEADING_DIRS 2 8#define ARCHIVE_CREATE_LEADING_DIRS 2
@@ -150,8 +148,6 @@ void open_transformer(int src_fd, const char *transform_prog) FAST_FUNC;
150#define open_transformer(fd, transformer, transform_prog) open_transformer(fd, transform_prog) 148#define open_transformer(fd, transformer, transform_prog) open_transformer(fd, transform_prog)
151#endif 149#endif
152 150
153#if __GNUC_PREREQ(4,1) 151POP_SAVED_FUNCTION_VISIBILITY
154# pragma GCC visibility pop
155#endif
156 152
157#endif 153#endif
diff --git a/include/usage.h b/include/usage.h
index af54b86a7..cbbd7516a 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -9,9 +9,8 @@
9 * or 9 * or
10 * |<5 spaces>"\ntext with tabs".... 10 * |<5 spaces>"\ntext with tabs"....
11 */ 11 */
12 12#ifndef BB_USAGE_H
13#ifndef __BB_USAGE_H__ 13#define BB_USAGE_H 1
14#define __BB_USAGE_H__
15 14
16 15
17#define NOUSAGE_STR "\b" 16#define NOUSAGE_STR "\b"
@@ -4921,4 +4920,5 @@ USE_FEATURE_TUNCTL_UG( \
4921 "\nWith no -q, runs continuously monitoring for ARP conflicts," \ 4920 "\nWith no -q, runs continuously monitoring for ARP conflicts," \
4922 "\nexits only on I/O errors (link down etc)" \ 4921 "\nexits only on I/O errors (link down etc)" \
4923 4922
4924#endif /* __BB_USAGE_H__ */ 4923
4924#endif
diff --git a/include/xatonum.h b/include/xatonum.h
index 86a3472d9..ee816efb4 100644
--- a/include/xatonum.h
+++ b/include/xatonum.h
@@ -7,9 +7,7 @@
7 * Licensed under GPLv2, see file LICENSE in this tarball for details. 7 * Licensed under GPLv2, see file LICENSE in this tarball for details.
8 */ 8 */
9 9
10#if __GNUC_PREREQ(4,1) 10PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
11# pragma GCC visibility push(hidden)
12#endif
13 11
14/* Provides extern declarations of functions */ 12/* Provides extern declarations of functions */
15#define DECLARE_STR_CONV(type, T, UT) \ 13#define DECLARE_STR_CONV(type, T, UT) \
@@ -171,6 +169,4 @@ uint32_t bb_strtou32(const char *arg, char **endp, int base)
171 169
172double bb_strtod(const char *arg, char **endp) FAST_FUNC; 170double bb_strtod(const char *arg, char **endp) FAST_FUNC;
173 171
174#if __GNUC_PREREQ(4,1) 172POP_SAVED_FUNCTION_VISIBILITY
175# pragma GCC visibility pop
176#endif
diff --git a/include/xregex.h b/include/xregex.h
index 90cf124ee..61658ed85 100644
--- a/include/xregex.h
+++ b/include/xregex.h
@@ -8,20 +8,16 @@
8 * 8 *
9 * Licensed under GPLv2 or later, see file License in this tarball for details. 9 * Licensed under GPLv2 or later, see file License in this tarball for details.
10 */ 10 */
11#ifndef __BB_REGEX__ 11#ifndef BB_REGEX_H
12#define __BB_REGEX__ 12#define BB_REGEX_H 1
13 13
14#include <regex.h> 14#include <regex.h>
15 15
16#if __GNUC_PREREQ(4,1) 16PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
17# pragma GCC visibility push(hidden)
18#endif
19 17
20char* regcomp_or_errmsg(regex_t *preg, const char *regex, int cflags) FAST_FUNC; 18char* regcomp_or_errmsg(regex_t *preg, const char *regex, int cflags) FAST_FUNC;
21void xregcomp(regex_t *preg, const char *regex, int cflags) FAST_FUNC; 19void xregcomp(regex_t *preg, const char *regex, int cflags) FAST_FUNC;
22 20
23#if __GNUC_PREREQ(4,1) 21POP_SAVED_FUNCTION_VISIBILITY
24# pragma GCC visibility pop
25#endif
26 22
27#endif 23#endif