Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/include/pwd_.h
- Timestamp:
- Feb 25, 2011, 9:26:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi-busybox/include/pwd_.h
r1765 r2725 19 19 20 20 /* 21 * 21 * POSIX Standard: 9.2.2 User Database Access <pwd.h> 22 22 */ 23 23 24 #if !ENABLE_USE_BB_PWD_GRP 24 #ifndef BB_PWD_H 25 #define BB_PWD_H 1 25 26 26 #include <pwd.h> 27 PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN 27 28 28 #else 29 30 #ifndef _PWD_H 31 #define _PWD_H 1 32 33 /* The passwd structure. */ 34 struct passwd { 35 char *pw_name; /* Username. */ 36 char *pw_passwd; /* Password. */ 37 uid_t pw_uid; /* User ID. */ 38 gid_t pw_gid; /* Group ID. */ 39 char *pw_gecos; /* Real name. */ 40 char *pw_dir; /* Home directory. */ 41 char *pw_shell; /* Shell program. */ 42 }; 43 29 /* This file is #included after #include <pwd.h> 30 * We will use libc-defined structures, but will #define function names 31 * so that function calls are directed to bb_internal_XXX replacements 32 */ 44 33 45 34 #define setpwent bb_internal_setpwent … … 54 43 #define getpwnam_r bb_internal_getpwnam_r 55 44 #define fgetpwent_r bb_internal_fgetpwent_r 56 #define getpw bb_internal_getpw57 45 58 46 59 47 /* All function names below should be remapped by #defines above 60 * in order to not collide with libc names. 61 * In theory it isn't necessary, but I saw weird interactions at link time. 62 * Let's play safe */ 48 * in order to not collide with libc names. */ 63 49 64 50 … … 69 55 extern void endpwent(void); 70 56 57 #ifdef UNUSED_SINCE_WE_AVOID_STATIC_BUFS 71 58 /* Read an entry from the password-file stream, opening it if necessary. */ 72 59 extern struct passwd *getpwent(void); … … 76 63 77 64 /* Write the given entry onto the given stream. */ 78 extern int putpwent( __const struct passwd *__restrict __p,65 extern int putpwent(const struct passwd *__restrict __p, 79 66 FILE *__restrict __f); 67 #endif 80 68 81 69 /* Search for an entry with a matching user ID. */ … … 83 71 84 72 /* Search for an entry with a matching username. */ 85 extern struct passwd *getpwnam( __const char *__name);73 extern struct passwd *getpwnam(const char *__name); 86 74 87 75 /* Reentrant versions of some of the functions above. … … 102 90 struct passwd **__restrict __result); 103 91 104 extern int getpwnam_r( __const char *__restrict __name,92 extern int getpwnam_r(const char *__restrict __name, 105 93 struct passwd *__restrict __resultbuf, 106 94 char *__restrict __buffer, size_t __buflen, … … 114 102 struct passwd **__restrict __result); 115 103 116 /* Re-construct the password-file line for the given uid 117 in the given buffer. This knows the format that the caller 118 will expect, but this need not be the format of the password file. */ 119 extern int getpw(uid_t __uid, char *__buffer); 104 POP_SAVED_FUNCTION_VISIBILITY 120 105 121 #endif /* pwd.h */122 106 #endif
Note:
See TracChangeset
for help on using the changeset viewer.