]> code.delx.au - gnu-emacs/blobdiff - src/sysdep.c
Suppress address randomization on Darwin. Do not merge into trunk.
[gnu-emacs] / src / sysdep.c
index 028e6e40957fdb9306e7156bf828b3f0cbd9751e..3abb43f14d2a854c0998e776b9df58f1f43da3c0 100644 (file)
@@ -1,6 +1,6 @@
 /* Interfaces to system-dependent kernel and library entries.
    Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001,
-                 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+                 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
                  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -168,7 +168,7 @@ struct utimbuf {
 #define LPASS8 0
 #endif
 
-static int baud_convert[] =
+static const int baud_convert[] =
   {
     0, 50, 75, 110, 135, 150, 200, 300, 600, 1200,
     1800, 2400, 4800, 9600, 19200, 38400
@@ -411,7 +411,7 @@ wait_for_termination (pid)
   while (1)
     {
 #ifdef subprocesses
-#if defined (BSD_SYSTEM) || defined (HPUX)
+#if (defined (BSD_SYSTEM) || defined (HPUX)) && !defined(__GNU__)
       /* Note that kill returns -1 even if the process is just a zombie now.
         But inevitably a SIGCHLD interrupt should be generated
         and child_sig will do wait3 and make the process go away. */
@@ -623,18 +623,11 @@ sys_suspend ()
   }
 
 #else /* No SIGTSTP */
-#ifdef USG_JOBCTRL /* If you don't know what this is don't mess with it */
-  ptrace (0, 0, 0, 0);         /* set for ptrace - caught by csh */
-  kill (getpid (), SIGQUIT);
-
-#else /* No SIGTSTP or USG_JOBCTRL */
-
 /* On a system where suspending is not implemented,
    instead fork a subshell and let it talk directly to the terminal
    while we wait.  */
   sys_subshell ();
 
-#endif /* no USG_JOBCTRL */
 #endif /* no SIGTSTP */
 }
 
@@ -2782,14 +2775,10 @@ set_file_times (filename, atime, mtime)
 /*
  * Make a directory.
  */
-#ifdef MKDIR_PROTOTYPE
-MKDIR_PROTOTYPE
-#else
 int
 mkdir (dpath, dmode)
      char *dpath;
      int dmode;
-#endif
 {
   int cpid, status, fd;
   struct stat statbuf;
@@ -3211,8 +3200,8 @@ list_system_processes ()
   return proclist;
 }
 
-/* The WINDOWSNT implementation is on w32.c.
-   The MSDOS implementation is on dosfns.c.  */
+/* The WINDOWSNT implementation is in w32.c.
+   The MSDOS implementation is in dosfns.c.  */
 #elif !defined (WINDOWSNT) && !defined (MSDOS)
 
 Lisp_Object
@@ -3314,7 +3303,7 @@ procfs_ttyname (int rdev)
 
              if (MINOR (rdev) >= minor_beg && MINOR (rdev) <= minor_end)
                {
-                 sprintf (name + strlen (name), "%lu", MINOR (rdev));
+                 sprintf (name + strlen (name), "%u", MINOR (rdev));
                  break;
                }
            }
@@ -3385,7 +3374,7 @@ system_process_attributes (Lisp_Object pid)
 
   CHECK_NUMBER_OR_FLOAT (pid);
   proc_id = FLOATP (pid) ? XFLOAT_DATA (pid) : XINT (pid);
-  sprintf (procfn, "/proc/%lu", proc_id);
+  sprintf (procfn, "/proc/%u", proc_id);
   if (stat (procfn, &st) < 0)
     return attrs;
 
@@ -3754,8 +3743,8 @@ system_process_attributes (Lisp_Object pid)
   return attrs;
 }
 
-/* The WINDOWSNT implementation is on w32.c.
-   The MSDOS implementation is on dosfns.c.  */
+/* The WINDOWSNT implementation is in w32.c.
+   The MSDOS implementation is in dosfns.c.  */
 #elif !defined (WINDOWSNT) && !defined (MSDOS)
 
 Lisp_Object