diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-09 17:59:34 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-09 17:59:34 +0000 |
commit | 98636eb08c5ecc216e18970e11f7021206ac9b04 (patch) | |
tree | dfc70b7c6bf6276776c4e8198457dcf2df1e09fb /include/libbb.h | |
parent | 50dbed95fb7c0a97135b771385160ca26c377a15 (diff) | |
download | busybox-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
Diffstat (limited to 'include/libbb.h')
-rw-r--r-- | include/libbb.h | 42 |
1 files changed, 33 insertions, 9 deletions
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 */ |
77 | extern char **environ; | 83 | extern char **environ; |
78 | 84 | ||
79 | #if defined(__GLIBC__) && __GLIBC__ < 2 | 85 | #if defined(__GLIBC__) && __GLIBC__ < 2 |
@@ -106,6 +112,23 @@ struct sysinfo { | |||
106 | int sysinfo(struct sysinfo* info); | 112 | int 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__ */ |