]> code.delx.au - gnu-emacs/blobdiff - src/mac.c
(x_draw_relief_rect): Add top_p and bot_p args.
[gnu-emacs] / src / mac.c
index bc2d342b19704a6070322d9e2ece23226aec9eb5..9f3455ab5dc09d4e15b57db61d34f9960fe4f7af 100644 (file)
--- a/src/mac.c
+++ b/src/mac.c
@@ -30,6 +30,7 @@ Boston, MA 02111-1307, USA.  */
 #include <sys/stat.h>
 #include <string.h>
 #include <pwd.h>
+#include <grp.h>
 #include <sys/param.h>
 #include <stdlib.h>
 #include <fcntl.h>
@@ -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)
 {
@@ -2770,7 +2785,7 @@ sys_select (n, rfds, wfds, efds, timeout)
   if (!inhibit_window_system && rfds && FD_ISSET (0, rfds))
     return 1;
   else if (inhibit_window_system || noninteractive ||
-          (timeout && (EMACS_SECS(*timeout)==0) && 
+          (timeout && (EMACS_SECS(*timeout)==0) &&
            (EMACS_USECS(*timeout)==0)))
     return select(n, rfds, wfds, efds, timeout);
   else
@@ -2780,22 +2795,22 @@ sys_select (n, rfds, wfds, efds, timeout)
       EMACS_GET_TIME (end_time);
       if (timeout)
        EMACS_ADD_TIME (end_time, end_time, *timeout);
-      
+
       do
        {
          int r;
          EMACS_TIME one_second;
          SELECT_TYPE orfds;
-         
+
          FD_ZERO (&orfds);
          if (rfds)
            {
              orfds = *rfds;
            }
-         
+
          EMACS_SET_SECS (one_second, 1);
          EMACS_SET_USECS (one_second, 0);
-         
+
          if (timeout && EMACS_TIME_LT(*timeout, one_second))
            one_second = *timeout;
 
@@ -2806,12 +2821,12 @@ sys_select (n, rfds, wfds, efds, timeout)
            }
 
          mac_check_for_quit_char();
-         
+
          EMACS_GET_TIME (now);
          EMACS_SUB_TIME (now, end_time, now);
        }
       while (!timeout || !EMACS_TIME_NEG_P (now));
-      
+
       return 0;
     }
 }
@@ -2835,7 +2850,7 @@ int sys_read (fds, buf, nbyte)
       if (sys_select (fds+1, &rfds, 0, 0, NULL) < 0)
        return -1;
     }
-      
+
   return read (fds, buf, nbyte);
 }
 
@@ -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) */