diff options
Diffstat (limited to 'src/mac.c')
| -rw-r--r-- | src/mac.c | 18 |
1 files changed, 18 insertions, 0 deletions
| @@ -30,6 +30,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 30 | #include <sys/stat.h> | 30 | #include <sys/stat.h> |
| 31 | #include <string.h> | 31 | #include <string.h> |
| 32 | #include <pwd.h> | 32 | #include <pwd.h> |
| 33 | #include <grp.h> | ||
| 33 | #include <sys/param.h> | 34 | #include <sys/param.h> |
| 34 | #include <stdlib.h> | 35 | #include <stdlib.h> |
| 35 | #include <fcntl.h> | 36 | #include <fcntl.h> |
| @@ -1164,6 +1165,13 @@ static struct passwd my_passwd = | |||
| 1164 | my_passwd_dir, | 1165 | my_passwd_dir, |
| 1165 | }; | 1166 | }; |
| 1166 | 1167 | ||
| 1168 | static struct group my_group = | ||
| 1169 | { | ||
| 1170 | /* There are no groups on the mac, so we just return "root" as the | ||
| 1171 | group name. */ | ||
| 1172 | "root", | ||
| 1173 | }; | ||
| 1174 | |||
| 1167 | 1175 | ||
| 1168 | /* Initialized by main () in macterm.c to pathname of emacs directory. */ | 1176 | /* Initialized by main () in macterm.c to pathname of emacs directory. */ |
| 1169 | 1177 | ||
| @@ -1258,6 +1266,13 @@ getpwuid (uid_t uid) | |||
| 1258 | } | 1266 | } |
| 1259 | 1267 | ||
| 1260 | 1268 | ||
| 1269 | struct group * | ||
| 1270 | getgrgid (gid_t gid) | ||
| 1271 | { | ||
| 1272 | return &my_group; | ||
| 1273 | } | ||
| 1274 | |||
| 1275 | |||
| 1261 | struct passwd * | 1276 | struct passwd * |
| 1262 | getpwnam (const char *name) | 1277 | getpwnam (const char *name) |
| 1263 | { | 1278 | { |
| @@ -2988,3 +3003,6 @@ syms_of_mac () | |||
| 2988 | defsubr (&Smac_file_name_to_posix); | 3003 | defsubr (&Smac_file_name_to_posix); |
| 2989 | defsubr (&Sposix_file_name_to_mac); | 3004 | defsubr (&Sposix_file_name_to_mac); |
| 2990 | } | 3005 | } |
| 3006 | |||
| 3007 | /* arch-tag: 29d30c1f-0c6b-4f88-8a6d-0558d7f9dbff | ||
| 3008 | (do not change this comment) */ | ||