[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);
|
---|
[410] | 17 | int sh_getgrnam_r(const char *name, struct group *gbuf,
|
---|
| 18 | char *buf, size_t buflen, struct group **gbufp);
|
---|
[131] | 19 |
|
---|
[1] | 20 | struct passwd * sh_getpwnam(const char *name);
|
---|
[145] | 21 | int sh_getpwnam_r(const char *name, struct passwd *pwbuf,
|
---|
[131] | 22 | char *buf, size_t buflen, struct passwd **pwbufp);
|
---|
| 23 |
|
---|
[1] | 24 | struct group * sh_getgrgid(gid_t gid);
|
---|
[145] | 25 | int sh_getgrgid_r(gid_t gid, struct group *gbuf,
|
---|
[131] | 26 | char *buf, size_t buflen, struct group **gbufp);
|
---|
| 27 |
|
---|
[1] | 28 | struct passwd * sh_getpwuid(uid_t uid);
|
---|
[145] | 29 | int sh_getpwuid_r(uid_t uid, struct passwd *pwbuf,
|
---|
[131] | 30 | char *buf, size_t buflen, struct passwd **pwbufp);
|
---|
| 31 |
|
---|
[1] | 32 | #endif
|
---|
| 33 |
|
---|
| 34 | #ifdef SH_NEED_GETHOSTBYXXX
|
---|
| 35 | struct hostent * sh_gethostbyaddr (const void *addr, socklen_t len, int type);
|
---|
| 36 | struct hostent * sh_gethostbyname(const char *name);
|
---|
| 37 | #endif
|
---|
| 38 |
|
---|
| 39 | #else
|
---|
| 40 |
|
---|
| 41 | #define sh_initgroups initgroups
|
---|
[410] | 42 | #define sh_getgrnam getgrnam
|
---|
| 43 | #define sh_getgrnam_r getgrnam_r
|
---|
[1] | 44 | #define sh_getgrgid getgrgid
|
---|
[131] | 45 | #define sh_getgrgid_r getgrgid_r
|
---|
[1] | 46 | #define sh_getpwnam getpwnam
|
---|
[131] | 47 | #define sh_getpwnam_r getpwnam_r
|
---|
[1] | 48 | #define sh_getpwuid getpwuid
|
---|
[131] | 49 | #define sh_getpwuid_r getpwuid_r
|
---|
| 50 | #define sh_getpwent getpwent
|
---|
[1] | 51 | #define sh_endpwent endpwent
|
---|
[111] | 52 | #define sh_setpwent setpwent
|
---|
[1] | 53 |
|
---|
| 54 | #define sh_gethostbyaddr gethostbyaddr
|
---|
| 55 | #define sh_gethostbyname gethostbyname
|
---|
| 56 |
|
---|
| 57 | #endif
|
---|
| 58 |
|
---|
| 59 | #endif
|
---|
| 60 |
|
---|