[1] | 1 | #ifndef SH_STATIC_H
|
---|
| 2 | #define SH_STATIC_H
|
---|
| 3 |
|
---|
| 4 | #include "config_xor.h"
|
---|
| 5 |
|
---|
| 6 | #if defined(SH_COMPILE_STATIC) && defined(__linux__)
|
---|
| 7 |
|
---|
| 8 | #ifdef SH_NEED_PWD_GRP
|
---|
| 9 | int sh_initgroups(const char *user, gid_t gid);
|
---|
| 10 | struct group * sh_getgrent(void);
|
---|
| 11 | struct passwd * sh_getpwent(void);
|
---|
| 12 | void sh_endgrent(void);
|
---|
| 13 | void sh_setgrent(void);
|
---|
| 14 | void sh_endpwent(void);
|
---|
| 15 | void sh_setpwent(void);
|
---|
| 16 | struct group * sh_getgrnam(const char *name);
|
---|
[131] | 17 |
|
---|
[1] | 18 | struct passwd * sh_getpwnam(const char *name);
|
---|
[131] | 19 | int getpwnam_r(const char *name, struct passwd *pwbuf,
|
---|
| 20 | char *buf, size_t buflen, struct passwd **pwbufp);
|
---|
| 21 |
|
---|
[1] | 22 | struct group * sh_getgrgid(gid_t gid);
|
---|
[131] | 23 | int getgrgid_r(gid_t gid, struct group *gbuf,
|
---|
| 24 | char *buf, size_t buflen, struct group **gbufp);
|
---|
| 25 |
|
---|
[1] | 26 | struct passwd * sh_getpwuid(uid_t uid);
|
---|
[131] | 27 | int getpwuid_r(uid_t uid, struct passwd *pwbuf,
|
---|
| 28 | char *buf, size_t buflen, struct passwd **pwbufp);
|
---|
| 29 |
|
---|
[1] | 30 | #endif
|
---|
| 31 |
|
---|
| 32 | #ifdef SH_NEED_GETHOSTBYXXX
|
---|
| 33 | struct hostent * sh_gethostbyaddr (const void *addr, socklen_t len, int type);
|
---|
| 34 | struct hostent * sh_gethostbyname(const char *name);
|
---|
| 35 | #endif
|
---|
| 36 |
|
---|
| 37 | #else
|
---|
| 38 |
|
---|
| 39 | #define sh_initgroups initgroups
|
---|
| 40 | #define sh_getgrgid getgrgid
|
---|
[131] | 41 | #define sh_getgrgid_r getgrgid_r
|
---|
[1] | 42 | #define sh_getpwnam getpwnam
|
---|
[131] | 43 | #define sh_getpwnam_r getpwnam_r
|
---|
[1] | 44 | #define sh_getpwuid getpwuid
|
---|
[131] | 45 | #define sh_getpwuid_r getpwuid_r
|
---|
| 46 | #define sh_getpwent getpwent
|
---|
[1] | 47 | #define sh_endpwent endpwent
|
---|
[111] | 48 | #define sh_setpwent setpwent
|
---|
[1] | 49 |
|
---|
| 50 | #define sh_gethostbyaddr gethostbyaddr
|
---|
| 51 | #define sh_gethostbyname gethostbyname
|
---|
| 52 |
|
---|
| 53 | #endif
|
---|
| 54 |
|
---|
| 55 | #endif
|
---|
| 56 |
|
---|