X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/177c0ea74342272645959b82cf219faa0b3dba16..ffe8b3f4e8cf60dd97c3e5ec5f12183ad9006c02:/src/mac.c diff --git a/src/mac.c b/src/mac.c index a6b92db468..9f3455ab5d 100644 --- a/src/mac.c +++ b/src/mac.c @@ -30,6 +30,7 @@ Boston, MA 02111-1307, USA. */ #include #include #include +#include #include #include #include @@ -1164,6 +1165,13 @@ static struct passwd my_passwd = my_passwd_dir, }; +static struct group my_group = +{ + /* There are no groups on the mac, so we just return "root" as the + group name. */ + "root", +}; + /* Initialized by main () in macterm.c to pathname of emacs directory. */ @@ -1258,6 +1266,13 @@ getpwuid (uid_t uid) } +struct group * +getgrgid (gid_t gid) +{ + return &my_group; +} + + struct passwd * getpwnam (const char *name) { @@ -2931,12 +2946,12 @@ init_mac_osx_environment () q[0] = '\0'; strcpy (p, app_bundle_pathname); - strcat (p, "/Contents/MacOS/bin"); + strcat (p, "/Contents/MacOS/libexec"); if (stat (p, &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR) strcat (q, p); strcpy (p, app_bundle_pathname); - strcat (p, "/Contents/MacOS/libexec"); + strcat (p, "/Contents/MacOS/bin"); if (stat (p, &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR) { if (q[0] != '\0') @@ -2988,3 +3003,6 @@ syms_of_mac () defsubr (&Smac_file_name_to_posix); defsubr (&Sposix_file_name_to_mac); } + +/* arch-tag: 29d30c1f-0c6b-4f88-8a6d-0558d7f9dbff + (do not change this comment) */