aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libbb.h')
-rw-r--r--include/libbb.h42
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 */
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__ */