aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-05-09 17:59:34 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-05-09 17:59:34 +0000
commit98636eb08c5ecc216e18970e11f7021206ac9b04 (patch)
treedfc70b7c6bf6276776c4e8198457dcf2df1e09fb
parent50dbed95fb7c0a97135b771385160ca26c377a15 (diff)
downloadbusybox-w32-98636eb08c5ecc216e18970e11f7021206ac9b04.tar.gz
busybox-w32-98636eb08c5ecc216e18970e11f7021206ac9b04.tar.bz2
busybox-w32-98636eb08c5ecc216e18970e11f7021206ac9b04.zip
Use intra-DSO calls when we build libbusybox. No-op for normal build.
This was Bernhard Fischer' idea. text data bss dec hex filename 773549 7781 9740 791070 c121e busybox.t7/0_lib/libbusybox.so.1.11.0.svn_unstripped 769683 7397 9740 786820 c0184 busybox.t9t/0_lib/libbusybox.so.1.11.0.svn_unstripped
-rw-r--r--coreutils/libcoreutils/coreutils.h8
-rw-r--r--e2fsprogs/e2fs_lib.h8
-rw-r--r--include/busybox.h7
-rw-r--r--include/dump.h9
-rw-r--r--include/grp_.h14
-rw-r--r--include/libbb.h42
-rw-r--r--include/platform.h52
-rw-r--r--include/pwd_.h15
-rw-r--r--include/rtc_.h10
-rw-r--r--include/shadow_.h15
-rw-r--r--include/unarchive.h8
-rw-r--r--include/xatonum.h8
-rw-r--r--include/xregex.h9
-rw-r--r--networking/isrv.h8
-rw-r--r--networking/libiproute/ip_common.h9
-rw-r--r--networking/libiproute/libnetlink.h9
-rw-r--r--networking/libiproute/ll_map.h8
-rw-r--r--networking/libiproute/rt_names.h8
-rw-r--r--networking/libiproute/rtm_map.h7
-rw-r--r--networking/libiproute/utils.h8
-rw-r--r--networking/tcpudp_perhost.h8
-rw-r--r--networking/udhcp/common.h13
-rw-r--r--networking/udhcp/dhcpc.h7
-rw-r--r--networking/udhcp/dhcpd.h8
-rw-r--r--networking/udhcp/options.h8
-rw-r--r--runit/runit_lib.h8
-rw-r--r--util-linux/volume_id/volume_id_internal.h7
27 files changed, 259 insertions, 62 deletions
diff --git a/coreutils/libcoreutils/coreutils.h b/coreutils/libcoreutils/coreutils.h
index c1796b381..be9af1227 100644
--- a/coreutils/libcoreutils/coreutils.h
+++ b/coreutils/libcoreutils/coreutils.h
@@ -6,6 +6,10 @@
6#ifndef COREUTILS_H 6#ifndef COREUTILS_H
7#define COREUTILS_H 1 7#define COREUTILS_H 1
8 8
9#if __GNUC_PREREQ(4,1)
10# pragma GCC visibility push(hidden)
11#endif
12
9typedef int (*stat_func)(const char *fn, struct stat *ps); 13typedef int (*stat_func)(const char *fn, struct stat *ps);
10 14
11int cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf); 15int cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf);
@@ -13,4 +17,8 @@ int cp_mv_stat(const char *fn, struct stat *fn_stat);
13 17
14mode_t getopt_mk_fifo_nod(char **argv); 18mode_t getopt_mk_fifo_nod(char **argv);
15 19
20#if __GNUC_PREREQ(4,1)
21# pragma GCC visibility pop
22#endif
23
16#endif 24#endif
diff --git a/e2fsprogs/e2fs_lib.h b/e2fsprogs/e2fs_lib.h
index d01249db2..40bbd1c83 100644
--- a/e2fsprogs/e2fs_lib.h
+++ b/e2fsprogs/e2fs_lib.h
@@ -9,6 +9,10 @@
9/* Constants and structures */ 9/* Constants and structures */
10#include "e2fs_defs.h" 10#include "e2fs_defs.h"
11 11
12#if __GNUC_PREREQ(4,1)
13# pragma GCC visibility push(hidden)
14#endif
15
12/* Iterate a function on each entry of a directory */ 16/* Iterate a function on each entry of a directory */
13int iterate_on_dir(const char *dir_name, 17int iterate_on_dir(const char *dir_name,
14 int (*func)(const char *, struct dirent *, void *), 18 int (*func)(const char *, struct dirent *, void *),
@@ -41,3 +45,7 @@ extern const char e2attr_flags_sname[];
41#define e2attr_flags_value_chattr (&e2attr_flags_value[1]) 45#define e2attr_flags_value_chattr (&e2attr_flags_value[1])
42#define e2attr_flags_sname_chattr (&e2attr_flags_sname[1]) 46#define e2attr_flags_sname_chattr (&e2attr_flags_sname[1])
43#endif 47#endif
48
49#if __GNUC_PREREQ(4,1)
50# pragma GCC visibility pop
51#endif
diff --git a/include/busybox.h b/include/busybox.h
index 0c44d2f51..314b95126 100644
--- a/include/busybox.h
+++ b/include/busybox.h
@@ -9,6 +9,10 @@
9 9
10#include "libbb.h" 10#include "libbb.h"
11 11
12#if __GNUC_PREREQ(4,1)
13# pragma GCC visibility push(hidden)
14#endif
15
12/* order matters: used as index into "install_dir[]" in appletlib.c */ 16/* order matters: used as index into "install_dir[]" in appletlib.c */
13typedef enum bb_install_loc_t { 17typedef enum bb_install_loc_t {
14 _BB_DIR_ROOT = 0, 18 _BB_DIR_ROOT = 0,
@@ -67,5 +71,8 @@ int lbb_main(char **argv);
67#endif 71#endif
68#endif 72#endif
69 73
74#if __GNUC_PREREQ(4,1)
75# pragma GCC visibility pop
76#endif
70 77
71#endif /* _BB_INTERNAL_H_ */ 78#endif /* _BB_INTERNAL_H_ */
diff --git a/include/dump.h b/include/dump.h
index 7e1715430..20c39c41e 100644
--- a/include/dump.h
+++ b/include/dump.h
@@ -1,4 +1,9 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2
3#if __GNUC_PREREQ(4,1)
4# pragma GCC visibility push(hidden)
5#endif
6
2#define F_IGNORE 0x01 /* %_A */ 7#define F_IGNORE 0x01 /* %_A */
3#define F_SETREP 0x02 /* rep count set, not default */ 8#define F_SETREP 0x02 /* rep count set, not default */
4#define F_ADDRESS 0x001 /* print offset */ 9#define F_ADDRESS 0x001 /* print offset */
@@ -48,3 +53,7 @@ extern int bb_dump_blocksize; /* data block size */
48extern int bb_dump_length; /* max bytes to read */ 53extern int bb_dump_length; /* max bytes to read */
49extern enum _vflag bb_dump_vflag; 54extern enum _vflag bb_dump_vflag;
50extern off_t bb_dump_skip; /* bytes to skip */ 55extern off_t bb_dump_skip; /* bytes to skip */
56
57#if __GNUC_PREREQ(4,1)
58# pragma GCC visibility pop
59#endif
diff --git a/include/grp_.h b/include/grp_.h
index 061b86ef7..45ee22ba9 100644
--- a/include/grp_.h
+++ b/include/grp_.h
@@ -21,15 +21,13 @@
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 23
24#if !ENABLE_USE_BB_PWD_GRP
25
26#include <grp.h>
27
28#else
29
30#ifndef _GRP_H 24#ifndef _GRP_H
31#define _GRP_H 1 25#define _GRP_H 1
32 26
27#if __GNUC_PREREQ(4,1)
28# pragma GCC visibility push(hidden)
29#endif
30
33/* The group structure. */ 31/* The group structure. */
34struct group { 32struct group {
35 char *gr_name; /* Group name. */ 33 char *gr_name; /* Group name. */
@@ -128,6 +126,8 @@ extern int getgrouplist(__const char *__user, gid_t __group,
128 of which USER is a member. Also include GROUP. */ 126 of which USER is a member. Also include GROUP. */
129extern int initgroups(__const char *__user, gid_t __group); 127extern int initgroups(__const char *__user, gid_t __group);
130 128
129#if __GNUC_PREREQ(4,1)
130# pragma GCC visibility pop
131#endif
131 132
132#endif /* grp.h */
133#endif 133#endif
diff --git a/include/libbb.h b/include/libbb.h
index 281152f5f..09dcc1b7f 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -65,15 +65,21 @@
65#define setlocale(x,y) ((void)0) 65#define setlocale(x,y) ((void)0)
66#endif 66#endif
67 67
68#include "pwd_.h" 68#ifdef DMALLOC
69#include "grp_.h" 69#include <dmalloc.h>
70/* ifdef it out, because it may include <shadow.h> */ 70#endif
71/* and we may not even _have_ <shadow.h>! */ 71
72#if !ENABLE_USE_BB_PWD_GRP
73# include <pwd.h>
74# include <grp.h>
75#endif
72#if ENABLE_FEATURE_SHADOWPASSWDS 76#if ENABLE_FEATURE_SHADOWPASSWDS
73#include "shadow_.h" 77# if !ENABLE_USE_BB_SHADOW
78# include <shadow.h>
79# endif
74#endif 80#endif
75 81
76/* Some libc's don't declare it, help them */ 82/* Some libc's forget to declare these, help them */
77extern char **environ; 83extern char **environ;
78 84
79#if defined(__GLIBC__) && __GLIBC__ < 2 85#if defined(__GLIBC__) && __GLIBC__ < 2
@@ -106,6 +112,23 @@ struct sysinfo {
106int sysinfo(struct sysinfo* info); 112int sysinfo(struct sysinfo* info);
107 113
108 114
115/* Make all declarations hidden (-fvisibility flag only affects definitions) */
116/* (don't include system headers after this until corresponding pop!) */
117#if __GNUC_PREREQ(4,1)
118# pragma GCC visibility push(hidden)
119#endif
120
121
122#if ENABLE_USE_BB_PWD_GRP
123# include "pwd_.h"
124# include "grp_.h"
125#endif
126#if ENABLE_FEATURE_SHADOWPASSWDS
127# if ENABLE_USE_BB_SHADOW
128# include "shadow_.h"
129# endif
130#endif
131
109/* Tested to work correctly with all int types (IIRC :]) */ 132/* Tested to work correctly with all int types (IIRC :]) */
110#define MAXINT(T) (T)( \ 133#define MAXINT(T) (T)( \
111 ((T)-1) > 0 \ 134 ((T)-1) > 0 \
@@ -1344,11 +1367,12 @@ extern const char bb_default_login_shell[];
1344#undef isdigit 1367#undef isdigit
1345#define isdigit(a) ((unsigned)((a) - '0') <= 9) 1368#define isdigit(a) ((unsigned)((a) - '0') <= 9)
1346 1369
1370#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
1347 1371
1348#ifdef DMALLOC 1372
1349#include <dmalloc.h> 1373#if __GNUC_PREREQ(4,1)
1374# pragma GCC visibility pop
1350#endif 1375#endif
1351 1376
1352#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
1353 1377
1354#endif /* __LIBBUSYBOX_H__ */ 1378#endif /* __LIBBUSYBOX_H__ */
diff --git a/include/platform.h b/include/platform.h
index 57cff2c33..0e0ccaf90 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -17,7 +17,7 @@
17#endif 17#endif
18 18
19/* __restrict is known in EGCS 1.2 and above. */ 19/* __restrict is known in EGCS 1.2 and above. */
20#if !__GNUC_PREREQ (2,92) 20#if !__GNUC_PREREQ(2,92)
21# ifndef __restrict 21# ifndef __restrict
22# define __restrict /* Ignore */ 22# define __restrict /* Ignore */
23# endif 23# endif
@@ -27,7 +27,7 @@
27 macros freely, and know that they will come into play for the 27 macros freely, and know that they will come into play for the
28 version of gcc in which they are supported. */ 28 version of gcc in which they are supported. */
29 29
30#if !__GNUC_PREREQ (2,7) 30#if !__GNUC_PREREQ(2,7)
31# ifndef __attribute__ 31# ifndef __attribute__
32# define __attribute__(x) 32# define __attribute__(x)
33# endif 33# endif
@@ -37,7 +37,7 @@
37#if defined(__STDC_VERSION__) && __STDC_VERSION__ > 199901L 37#if defined(__STDC_VERSION__) && __STDC_VERSION__ > 199901L
38/* it's a keyword */ 38/* it's a keyword */
39#else 39#else
40# if __GNUC_PREREQ (2,7) 40# if __GNUC_PREREQ(2,7)
41# define inline __inline__ 41# define inline __inline__
42# else 42# else
43# define inline 43# define inline
@@ -48,49 +48,49 @@
48# define __const const 48# define __const const
49#endif 49#endif
50 50
51# define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) 51#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
52# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) 52#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
53# define ATTRIBUTE_PACKED __attribute__ ((__packed__)) 53#define ATTRIBUTE_PACKED __attribute__ ((__packed__))
54# define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m))) 54#define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m)))
55/* __NO_INLINE__: some gcc's do not honor inlining! :( */ 55/* __NO_INLINE__: some gcc's do not honor inlining! :( */
56# if __GNUC_PREREQ (3,0) && !defined(__NO_INLINE__) 56#if __GNUC_PREREQ(3,0) && !defined(__NO_INLINE__)
57# define ALWAYS_INLINE __attribute__ ((always_inline)) inline 57# define ALWAYS_INLINE __attribute__ ((always_inline)) inline
58/* I've seen a toolchain where I needed __noinline__ instead of noinline */ 58/* I've seen a toolchain where I needed __noinline__ instead of noinline */
59# define NOINLINE __attribute__((__noinline__)) 59# define NOINLINE __attribute__((__noinline__))
60# if !ENABLE_WERROR 60# if !ENABLE_WERROR
61# define ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) 61# define ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
62# define ATTRIBUTE_UNUSED_RESULT __attribute__ ((warn_unused_result)) 62# define ATTRIBUTE_UNUSED_RESULT __attribute__ ((warn_unused_result))
63# else
64# define ATTRIBUTE_DEPRECATED /* n/a */
65# define ATTRIBUTE_UNUSED_RESULT /* n/a */
66# endif
67# else 63# else
68# define ALWAYS_INLINE inline /* n/a */
69# define NOINLINE /* n/a */
70# define ATTRIBUTE_DEPRECATED /* n/a */ 64# define ATTRIBUTE_DEPRECATED /* n/a */
71# define ATTRIBUTE_UNUSED_RESULT /* n/a */ 65# define ATTRIBUTE_UNUSED_RESULT /* n/a */
72# endif 66# endif
67#else
68# define ALWAYS_INLINE inline /* n/a */
69# define NOINLINE /* n/a */
70# define ATTRIBUTE_DEPRECATED /* n/a */
71# define ATTRIBUTE_UNUSED_RESULT /* n/a */
72#endif
73 73
74/* -fwhole-program makes all symbols local. The attribute externally_visible 74/* -fwhole-program makes all symbols local. The attribute externally_visible
75 forces a symbol global. */ 75 forces a symbol global. */
76# if __GNUC_PREREQ (4,1) 76#if __GNUC_PREREQ(4,1)
77# define EXTERNALLY_VISIBLE __attribute__(( visibility("default") )) 77# define EXTERNALLY_VISIBLE __attribute__(( visibility("default") ))
78//__attribute__ ((__externally_visible__)) 78//__attribute__ ((__externally_visible__))
79# else 79#else
80# define EXTERNALLY_VISIBLE 80# define EXTERNALLY_VISIBLE
81# endif /* GNUC >= 4.1 */ 81#endif /* GNUC >= 4.1 */
82 82
83/* We use __extension__ in some places to suppress -pedantic warnings 83/* We use __extension__ in some places to suppress -pedantic warnings
84 about GCC extensions. This feature didn't work properly before 84 about GCC extensions. This feature didn't work properly before
85 gcc 2.8. */ 85 gcc 2.8. */
86#if !__GNUC_PREREQ (2,8) 86#if !__GNUC_PREREQ(2,8)
87# ifndef __extension__ 87# ifndef __extension__
88# define __extension__ 88# define __extension__
89# endif 89# endif
90#endif 90#endif
91 91
92/* gcc-2.95 had no va_copy but only __va_copy. */ 92/* gcc-2.95 had no va_copy but only __va_copy. */
93#if !__GNUC_PREREQ (3,0) 93#if !__GNUC_PREREQ(3,0)
94# include <stdarg.h> 94# include <stdarg.h>
95# if !defined va_copy && defined __va_copy 95# if !defined va_copy && defined __va_copy
96# define va_copy(d,s) __va_copy((d),(s)) 96# define va_copy(d,s) __va_copy((d),(s))
diff --git a/include/pwd_.h b/include/pwd_.h
index f47e4eb2c..6199034d2 100644
--- a/include/pwd_.h
+++ b/include/pwd_.h
@@ -21,15 +21,13 @@
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#if !ENABLE_USE_BB_PWD_GRP
25
26#include <pwd.h>
27
28#else
29
30#ifndef _PWD_H 24#ifndef _PWD_H
31#define _PWD_H 1 25#define _PWD_H 1
32 26
27#if __GNUC_PREREQ(4,1)
28# pragma GCC visibility push(hidden)
29#endif
30
33/* The passwd structure. */ 31/* The passwd structure. */
34struct passwd { 32struct passwd {
35 char *pw_name; /* Username. */ 33 char *pw_name; /* Username. */
@@ -118,5 +116,8 @@ extern int fgetpwent_r(FILE *__restrict __stream,
118 will expect, but this need not be the format of the password file. */ 116 will expect, but this need not be the format of the password file. */
119extern int getpw(uid_t __uid, char *__buffer); 117extern int getpw(uid_t __uid, char *__buffer);
120 118
121#endif /* pwd.h */ 119#if __GNUC_PREREQ(4,1)
120# pragma GCC visibility pop
122#endif 121#endif
122
123#endif /* pwd.h */
diff --git a/include/rtc_.h b/include/rtc_.h
index df359da74..b8e4de895 100644
--- a/include/rtc_.h
+++ b/include/rtc_.h
@@ -9,12 +9,14 @@
9 9
10#include "libbb.h" 10#include "libbb.h"
11 11
12#if __GNUC_PREREQ(4,1)
13# pragma GCC visibility push(hidden)
14#endif
15
12extern int rtc_adjtime_is_utc(void); 16extern int rtc_adjtime_is_utc(void);
13extern int rtc_xopen(const char **default_rtc, int flags); 17extern int rtc_xopen(const char **default_rtc, int flags);
14extern time_t rtc_read_time(int fd, int utc); 18extern time_t rtc_read_time(int fd, int utc);
15 19
16
17
18/* 20/*
19 * Everything below this point has been copied from linux/rtc.h 21 * Everything below this point has been copied from linux/rtc.h
20 * to eliminate the kernel header dependency 22 * to eliminate the kernel header dependency
@@ -70,4 +72,8 @@ struct linux_rtc_wkalrm {
70#define RTC_AF 0x20 72#define RTC_AF 0x20
71#define RTC_UF 0x10 73#define RTC_UF 0x10
72 74
75#if __GNUC_PREREQ(4,1)
76# pragma GCC visibility pop
77#endif
78
73#endif 79#endif
diff --git a/include/shadow_.h b/include/shadow_.h
index 92bcde864..5a8b71a47 100644
--- a/include/shadow_.h
+++ b/include/shadow_.h
@@ -19,15 +19,13 @@
19 19
20/* Declaration of types and functions for shadow password suite */ 20/* Declaration of types and functions for shadow password suite */
21 21
22#if !ENABLE_USE_BB_SHADOW
23
24#include <shadow.h>
25
26#else
27
28#ifndef _SHADOW_H 22#ifndef _SHADOW_H
29#define _SHADOW_H 1 23#define _SHADOW_H 1
30 24
25#if __GNUC_PREREQ(4,1)
26# pragma GCC visibility push(hidden)
27#endif
28
31/* Paths to the user database files */ 29/* Paths to the user database files */
32#ifndef _PATH_SHADOW 30#ifndef _PATH_SHADOW
33#define _PATH_SHADOW "/etc/shadow" 31#define _PATH_SHADOW "/etc/shadow"
@@ -110,5 +108,8 @@ extern int lckpwdf(void);
110/* Unlock password file */ 108/* Unlock password file */
111extern int ulckpwdf(void); 109extern int ulckpwdf(void);
112 110
113#endif /* shadow.h */ 111#if __GNUC_PREREQ(4,1)
112# pragma GCC visibility pop
114#endif 113#endif
114
115#endif /* shadow.h */
diff --git a/include/unarchive.h b/include/unarchive.h
index b49e6cbb5..a6b047794 100644
--- a/include/unarchive.h
+++ b/include/unarchive.h
@@ -2,6 +2,10 @@
2#ifndef __UNARCHIVE_H__ 2#ifndef __UNARCHIVE_H__
3#define __UNARCHIVE_H__ 3#define __UNARCHIVE_H__
4 4
5#if __GNUC_PREREQ(4,1)
6# pragma GCC visibility push(hidden)
7#endif
8
5#define ARCHIVE_PRESERVE_DATE 1 9#define ARCHIVE_PRESERVE_DATE 1
6#define ARCHIVE_CREATE_LEADING_DIRS 2 10#define ARCHIVE_CREATE_LEADING_DIRS 2
7#define ARCHIVE_EXTRACT_UNCONDITIONAL 4 11#define ARCHIVE_EXTRACT_UNCONDITIONAL 4
@@ -126,4 +130,8 @@ extern int open_transformer(int src_fd, const char *transform_prog);
126#define open_transformer(src_fd, transformer, transform_prog) open_transformer(src_fd, transform_prog) 130#define open_transformer(src_fd, transformer, transform_prog) open_transformer(src_fd, transform_prog)
127#endif 131#endif
128 132
133#if __GNUC_PREREQ(4,1)
134# pragma GCC visibility pop
135#endif
136
129#endif 137#endif
diff --git a/include/xatonum.h b/include/xatonum.h
index 49ddced50..6cf1299b3 100644
--- a/include/xatonum.h
+++ b/include/xatonum.h
@@ -7,6 +7,10 @@
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)
11# pragma GCC visibility push(hidden)
12#endif
13
10/* Provides extern declarations of functions */ 14/* Provides extern declarations of functions */
11#define DECLARE_STR_CONV(type, T, UT) \ 15#define DECLARE_STR_CONV(type, T, UT) \
12\ 16\
@@ -166,3 +170,7 @@ uint32_t bb_strtou32(const char *arg, char **endp, int base)
166/* Floating point */ 170/* Floating point */
167 171
168/* double bb_strtod(const char *arg, char **endp); */ 172/* double bb_strtod(const char *arg, char **endp); */
173
174#if __GNUC_PREREQ(4,1)
175# pragma GCC visibility pop
176#endif
diff --git a/include/xregex.h b/include/xregex.h
index 23cf19c02..d4bf73279 100644
--- a/include/xregex.h
+++ b/include/xregex.h
@@ -12,7 +12,16 @@
12#define __BB_REGEX__ 12#define __BB_REGEX__
13 13
14#include <regex.h> 14#include <regex.h>
15
16#if __GNUC_PREREQ(4,1)
17# pragma GCC visibility push(hidden)
18#endif
19
15char* regcomp_or_errmsg(regex_t *preg, const char *regex, int cflags); 20char* regcomp_or_errmsg(regex_t *preg, const char *regex, int cflags);
16void xregcomp(regex_t *preg, const char *regex, int cflags); 21void xregcomp(regex_t *preg, const char *regex, int cflags);
17 22
23#if __GNUC_PREREQ(4,1)
24# pragma GCC visibility pop
25#endif
26
18#endif 27#endif
diff --git a/networking/isrv.h b/networking/isrv.h
index 370ed9043..c0158a3e3 100644
--- a/networking/isrv.h
+++ b/networking/isrv.h
@@ -8,6 +8,10 @@
8 * Licensed under GPL version 2, see file LICENSE in this tarball for details. 8 * Licensed under GPL version 2, see file LICENSE in this tarball for details.
9 */ 9 */
10 10
11#if __GNUC_PREREQ(4,1)
12# pragma GCC visibility push(hidden)
13#endif
14
11/* opaque structure */ 15/* opaque structure */
12struct isrv_state_t; 16struct isrv_state_t;
13typedef struct isrv_state_t isrv_state_t; 17typedef struct isrv_state_t isrv_state_t;
@@ -31,3 +35,7 @@ void isrv_run(
31 int timeout, 35 int timeout,
32 int linger_timeout 36 int linger_timeout
33); 37);
38
39#if __GNUC_PREREQ(4,1)
40# pragma GCC visibility pop
41#endif
diff --git a/networking/libiproute/ip_common.h b/networking/libiproute/ip_common.h
index c04735608..346d0b96c 100644
--- a/networking/libiproute/ip_common.h
+++ b/networking/libiproute/ip_common.h
@@ -13,6 +13,10 @@
13#include <linux/if_link.h> 13#include <linux/if_link.h>
14#endif 14#endif
15 15
16#if __GNUC_PREREQ(4,1)
17# pragma GCC visibility push(hidden)
18#endif
19
16extern char **ip_parse_common_args(char **argv); 20extern char **ip_parse_common_args(char **argv);
17extern int print_neigh(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); 21extern int print_neigh(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg);
18extern int ipaddr_list_or_flush(char **argv, int flush); 22extern int ipaddr_list_or_flush(char **argv, int flush);
@@ -29,4 +33,9 @@ extern int do_iplink(char **argv);
29extern int do_ipmonitor(char **argv); 33extern int do_ipmonitor(char **argv);
30extern int do_multiaddr(char **argv); 34extern int do_multiaddr(char **argv);
31extern int do_multiroute(char **argv); 35extern int do_multiroute(char **argv);
36
37#if __GNUC_PREREQ(4,1)
38# pragma GCC visibility pop
39#endif
40
32#endif /* ip_common.h */ 41#endif /* ip_common.h */
diff --git a/networking/libiproute/libnetlink.h b/networking/libiproute/libnetlink.h
index e149f52bf..7507c52e7 100644
--- a/networking/libiproute/libnetlink.h
+++ b/networking/libiproute/libnetlink.h
@@ -8,6 +8,11 @@
8#include <linux/netlink.h> 8#include <linux/netlink.h>
9#include <linux/rtnetlink.h> 9#include <linux/rtnetlink.h>
10 10
11
12#if __GNUC_PREREQ(4,1)
13# pragma GCC visibility push(hidden)
14#endif
15
11struct rtnl_handle 16struct rtnl_handle
12{ 17{
13 int fd; 18 int fd;
@@ -43,4 +48,8 @@ extern int rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, i
43 48
44extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len); 49extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len);
45 50
51#if __GNUC_PREREQ(4,1)
52# pragma GCC visibility pop
53#endif
54
46#endif /* __LIBNETLINK_H__ */ 55#endif /* __LIBNETLINK_H__ */
diff --git a/networking/libiproute/ll_map.h b/networking/libiproute/ll_map.h
index 55e2cf393..c4257894c 100644
--- a/networking/libiproute/ll_map.h
+++ b/networking/libiproute/ll_map.h
@@ -2,6 +2,10 @@
2#ifndef __LL_MAP_H__ 2#ifndef __LL_MAP_H__
3#define __LL_MAP_H__ 1 3#define __LL_MAP_H__ 1
4 4
5#if __GNUC_PREREQ(4,1)
6# pragma GCC visibility push(hidden)
7#endif
8
5int ll_remember_index(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); 9int ll_remember_index(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg);
6int ll_init_map(struct rtnl_handle *rth); 10int ll_init_map(struct rtnl_handle *rth);
7int xll_name_to_index(const char *const name); 11int xll_name_to_index(const char *const name);
@@ -10,4 +14,8 @@ const char *ll_idx_n2a(int idx, char *buf);
10/* int ll_index_to_type(int idx); */ 14/* int ll_index_to_type(int idx); */
11unsigned ll_index_to_flags(int idx); 15unsigned ll_index_to_flags(int idx);
12 16
17#if __GNUC_PREREQ(4,1)
18# pragma GCC visibility pop
19#endif
20
13#endif /* __LL_MAP_H__ */ 21#endif /* __LL_MAP_H__ */
diff --git a/networking/libiproute/rt_names.h b/networking/libiproute/rt_names.h
index f560f248b..60baa3f16 100644
--- a/networking/libiproute/rt_names.h
+++ b/networking/libiproute/rt_names.h
@@ -2,7 +2,9 @@
2#ifndef RT_NAMES_H_ 2#ifndef RT_NAMES_H_
3#define RT_NAMES_H_ 1 3#define RT_NAMES_H_ 1
4 4
5#include <stdint.h> 5#if __GNUC_PREREQ(4,1)
6# pragma GCC visibility push(hidden)
7#endif
6 8
7extern const char* rtnl_rtprot_n2a(int id, char *buf, int len); 9extern const char* rtnl_rtprot_n2a(int id, char *buf, int len);
8extern const char* rtnl_rtscope_n2a(int id, char *buf, int len); 10extern const char* rtnl_rtscope_n2a(int id, char *buf, int len);
@@ -27,4 +29,8 @@ extern const char* ll_proto_n2a(unsigned short id, char *buf, int len);
27extern int ll_proto_a2n(unsigned short *id, char *buf); 29extern int ll_proto_a2n(unsigned short *id, char *buf);
28#endif 30#endif
29 31
32#if __GNUC_PREREQ(4,1)
33# pragma GCC visibility pop
34#endif
35
30#endif 36#endif
diff --git a/networking/libiproute/rtm_map.h b/networking/libiproute/rtm_map.h
index cbbcc214d..02fa77e42 100644
--- a/networking/libiproute/rtm_map.h
+++ b/networking/libiproute/rtm_map.h
@@ -2,10 +2,17 @@
2#ifndef __RTM_MAP_H__ 2#ifndef __RTM_MAP_H__
3#define __RTM_MAP_H__ 1 3#define __RTM_MAP_H__ 1
4 4
5#if __GNUC_PREREQ(4,1)
6# pragma GCC visibility push(hidden)
7#endif
8
5const char *rtnl_rtntype_n2a(int id, char *buf, int len); 9const char *rtnl_rtntype_n2a(int id, char *buf, int len);
6int rtnl_rtntype_a2n(int *id, char *arg); 10int rtnl_rtntype_a2n(int *id, char *arg);
7 11
8int get_rt_realms(uint32_t *realms, char *arg); 12int get_rt_realms(uint32_t *realms, char *arg);
9 13
14#if __GNUC_PREREQ(4,1)
15# pragma GCC visibility pop
16#endif
10 17
11#endif /* __RTM_MAP_H__ */ 18#endif /* __RTM_MAP_H__ */
diff --git a/networking/libiproute/utils.h b/networking/libiproute/utils.h
index 50a6c2026..b67619d20 100644
--- a/networking/libiproute/utils.h
+++ b/networking/libiproute/utils.h
@@ -6,6 +6,10 @@
6#include "ll_map.h" 6#include "ll_map.h"
7#include "rtm_map.h" 7#include "rtm_map.h"
8 8
9#if __GNUC_PREREQ(4,1)
10# pragma GCC visibility push(hidden)
11#endif
12
9extern family_t preferred_family; 13extern family_t preferred_family;
10extern smallint show_stats; /* UNUSED */ 14extern smallint show_stats; /* UNUSED */
11extern smallint show_details; /* UNUSED */ 15extern smallint show_details; /* UNUSED */
@@ -84,4 +88,8 @@ int dnet_pton(int af, const char *src, void *addr);
84const char *ipx_ntop(int af, const void *addr, char *str, size_t len); 88const char *ipx_ntop(int af, const void *addr, char *str, size_t len);
85int ipx_pton(int af, const char *src, void *addr); 89int ipx_pton(int af, const char *src, void *addr);
86 90
91#if __GNUC_PREREQ(4,1)
92# pragma GCC visibility pop
93#endif
94
87#endif /* __UTILS_H__ */ 95#endif /* __UTILS_H__ */
diff --git a/networking/tcpudp_perhost.h b/networking/tcpudp_perhost.h
index 9fc8cee61..2e093c1c4 100644
--- a/networking/tcpudp_perhost.h
+++ b/networking/tcpudp_perhost.h
@@ -7,6 +7,10 @@
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)
11# pragma GCC visibility push(hidden)
12#endif
13
10struct hcc { 14struct hcc {
11 char *ip; 15 char *ip;
12 int pid; 16 int pid;
@@ -27,3 +31,7 @@ void ipsvd_perhost_remove(int pid);
27 31
28//unsigned ipsvd_perhost_setpid(int pid); 32//unsigned ipsvd_perhost_setpid(int pid);
29//void ipsvd_perhost_free(void); 33//void ipsvd_perhost_free(void);
34
35#if __GNUC_PREREQ(4,1)
36# pragma GCC visibility pop
37#endif
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h
index d44bca4e6..1131baee2 100644
--- a/networking/udhcp/common.h
+++ b/networking/udhcp/common.h
@@ -11,6 +11,12 @@
11#define _COMMON_H 11#define _COMMON_H
12 12
13#include "libbb.h" 13#include "libbb.h"
14#include <netinet/udp.h>
15#include <netinet/ip.h>
16
17#if __GNUC_PREREQ(4,1)
18# pragma GCC visibility push(hidden)
19#endif
14 20
15#define DEFAULT_SCRIPT CONFIG_DHCPC_DEFAULT_SCRIPT 21#define DEFAULT_SCRIPT CONFIG_DHCPC_DEFAULT_SCRIPT
16 22
@@ -18,9 +24,6 @@ extern const uint8_t MAC_BCAST_ADDR[6]; /* six all-ones */
18 24
19/*** packet.h ***/ 25/*** packet.h ***/
20 26
21#include <netinet/udp.h>
22#include <netinet/ip.h>
23
24#define DHCP_OPTIONS_BUFSIZE 308 27#define DHCP_OPTIONS_BUFSIZE 308
25 28
26struct dhcpMessage { 29struct dhcpMessage {
@@ -98,4 +101,8 @@ int arpping(uint32_t test_ip, uint32_t from_ip, uint8_t *from_mac, const char *i
98# define DEBUG(str, args...) do {;} while (0) 101# define DEBUG(str, args...) do {;} while (0)
99#endif 102#endif
100 103
104#if __GNUC_PREREQ(4,1)
105# pragma GCC visibility pop
106#endif
107
101#endif 108#endif
diff --git a/networking/udhcp/dhcpc.h b/networking/udhcp/dhcpc.h
index c8acd4982..452afcf45 100644
--- a/networking/udhcp/dhcpc.h
+++ b/networking/udhcp/dhcpc.h
@@ -4,6 +4,10 @@
4#ifndef _DHCPC_H 4#ifndef _DHCPC_H
5#define _DHCPC_H 5#define _DHCPC_H
6 6
7#if __GNUC_PREREQ(4,1)
8# pragma GCC visibility push(hidden)
9#endif
10
7#define INIT_SELECTING 0 11#define INIT_SELECTING 0
8#define REQUESTING 1 12#define REQUESTING 1
9#define BOUND 2 13#define BOUND 2
@@ -60,5 +64,8 @@ int send_renew(uint32_t xid, uint32_t server, uint32_t ciaddr);
60int send_release(uint32_t server, uint32_t ciaddr); 64int send_release(uint32_t server, uint32_t ciaddr);
61int get_raw_packet(struct dhcpMessage *payload, int fd); 65int get_raw_packet(struct dhcpMessage *payload, int fd);
62 66
67#if __GNUC_PREREQ(4,1)
68# pragma GCC visibility pop
69#endif
63 70
64#endif 71#endif
diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h
index 4ce442bef..8a206ea49 100644
--- a/networking/udhcp/dhcpd.h
+++ b/networking/udhcp/dhcpd.h
@@ -4,6 +4,10 @@
4#ifndef _DHCPD_H 4#ifndef _DHCPD_H
5#define _DHCPD_H 5#define _DHCPD_H
6 6
7#if __GNUC_PREREQ(4,1)
8# pragma GCC visibility push(hidden)
9#endif
10
7/************************************/ 11/************************************/
8/* Defaults _you_ may want to tweak */ 12/* Defaults _you_ may want to tweak */
9/************************************/ 13/************************************/
@@ -114,4 +118,8 @@ void read_leases(const char *file);
114struct option_set *find_option(struct option_set *opt_list, uint8_t code); 118struct option_set *find_option(struct option_set *opt_list, uint8_t code);
115 119
116 120
121#if __GNUC_PREREQ(4,1)
122# pragma GCC visibility pop
123#endif
124
117#endif 125#endif
diff --git a/networking/udhcp/options.h b/networking/udhcp/options.h
index e9eeefb57..cf3fe3b18 100644
--- a/networking/udhcp/options.h
+++ b/networking/udhcp/options.h
@@ -3,6 +3,10 @@
3#ifndef _OPTIONS_H 3#ifndef _OPTIONS_H
4#define _OPTIONS_H 4#define _OPTIONS_H
5 5
6#if __GNUC_PREREQ(4,1)
7# pragma GCC visibility push(hidden)
8#endif
9
6#define TYPE_MASK 0x0F 10#define TYPE_MASK 0x0F
7 11
8enum { 12enum {
@@ -112,4 +116,8 @@ char *dname_dec(const uint8_t *cstr, int clen, const char *pre);
112uint8_t *dname_enc(const uint8_t *cstr, int clen, const char *src, int *retlen); 116uint8_t *dname_enc(const uint8_t *cstr, int clen, const char *src, int *retlen);
113#endif 117#endif
114 118
119#if __GNUC_PREREQ(4,1)
120# pragma GCC visibility pop
121#endif
122
115#endif 123#endif
diff --git a/runit/runit_lib.h b/runit/runit_lib.h
index 4b9482024..c94e61cf2 100644
--- a/runit/runit_lib.h
+++ b/runit/runit_lib.h
@@ -25,6 +25,10 @@ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*/ 26*/
27 27
28#if __GNUC_PREREQ(4,1)
29# pragma GCC visibility push(hidden)
30#endif
31
28extern unsigned byte_chr(char *s,unsigned n,int c); 32extern unsigned byte_chr(char *s,unsigned n,int c);
29 33
30#define direntry struct dirent 34#define direntry struct dirent
@@ -95,3 +99,7 @@ typedef struct svstatus_t {
95struct ERR_svstatus_must_be_20_bytes { 99struct ERR_svstatus_must_be_20_bytes {
96 char ERR_svstatus_must_be_20_bytes[sizeof(svstatus_t) == 20 ? 1 : -1]; 100 char ERR_svstatus_must_be_20_bytes[sizeof(svstatus_t) == 20 ? 1 : -1];
97}; 101};
102
103#if __GNUC_PREREQ(4,1)
104# pragma GCC visibility pop
105#endif
diff --git a/util-linux/volume_id/volume_id_internal.h b/util-linux/volume_id/volume_id_internal.h
index 78b4a7b8a..6619d2c6e 100644
--- a/util-linux/volume_id/volume_id_internal.h
+++ b/util-linux/volume_id/volume_id_internal.h
@@ -21,6 +21,9 @@
21#include "libbb.h" 21#include "libbb.h"
22#include "volume_id.h" 22#include "volume_id.h"
23 23
24#if __GNUC_PREREQ(4,1)
25# pragma GCC visibility push(hidden)
26#endif
24 27
25#define dbg(...) ((void)0) 28#define dbg(...) ((void)0)
26/* #define dbg(...) bb_error_msg(__VA_ARGS__) */ 29/* #define dbg(...) bb_error_msg(__VA_ARGS__) */
@@ -224,3 +227,7 @@ int volume_id_probe_udf(struct volume_id *id, uint64_t off);
224//int volume_id_probe_ufs(struct volume_id *id, uint64_t off); 227//int volume_id_probe_ufs(struct volume_id *id, uint64_t off);
225 228
226int volume_id_probe_xfs(struct volume_id *id, uint64_t off); 229int volume_id_probe_xfs(struct volume_id *id, uint64_t off);
230
231#if __GNUC_PREREQ(4,1)
232# pragma GCC visibility pop
233#endif