]> code.delx.au - gnu-emacs/blobdiff - src/sysdep.c
* keymap.c (syms_of_keymap): Construct exclude_keys in pure memory.
[gnu-emacs] / src / sysdep.c
index 1cf9890ecb8ed3345abcef8efb8271c2ac41940e..fc252e87aa87ec12925852135372614425d934d5 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
+                 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
                  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -22,6 +22,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <config.h>
 #endif
 
+#include <ctype.h>
 #include <signal.h>
 #include <stdio.h>
 #include <setjmp.h>
@@ -577,12 +578,6 @@ child_setup_tty (out)
   /* rms: Formerly it set s.main.c_cc[VINTR] to 0377 here
      unconditionally.  Then a SIGNALS_VIA_CHARACTERS conditional
      would force it to 0377.  That looks like duplicated code.  */
-#ifndef SIGNALS_VIA_CHARACTERS
-  /* QUIT and INTR work better as signals, so disable character forms */
-  s.main.c_cc[VQUIT] = CDISABLE;
-  s.main.c_cc[VINTR] = CDISABLE;
-  s.main.c_lflag &= ~ISIG;
-#endif /* no TIOCGPGRP or no TIOCGLTC or no TIOCGETC */
   s.main.c_cc[VEOL] = CDISABLE;
   s.main.c_cflag = (s.main.c_cflag & ~CBAUD) | B9600; /* baud rate sanity */
 #endif /* AIX */
@@ -628,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 */
 }
 
@@ -2539,10 +2527,7 @@ emacs_write (fildes, buf, nbyte)
 #ifdef SYNC_INPUT
              /* I originally used `QUIT' but that might causes files to
                 be truncated if you hit C-g in the middle of it.  --Stef  */
-             if (interrupt_input_pending)
-               handle_async_input ();
-              if (pending_atimers)
-                do_pending_atimers ();
+             process_pending_signals ();
 #endif
              continue;
            }
@@ -2790,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;
@@ -3219,8 +3200,9 @@ list_system_processes ()
   return proclist;
 }
 
-/* The WINDOWSNT implementation is on w32.c.  */
-#elif !defined (WINDOWSNT)
+/* The WINDOWSNT implementation is in w32.c.
+   The MSDOS implementation is in dosfns.c.  */
+#elif !defined (WINDOWSNT) && !defined (MSDOS)
 
 Lisp_Object
 list_system_processes ()
@@ -3321,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;
                }
            }
@@ -3392,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;
 
@@ -3708,17 +3690,19 @@ system_process_attributes (Lisp_Object pid)
                Qcminflt
                Qcmajflt
 
+               Qutime
+               Qcutime
                Qstime
                Qcstime
                Are they available? */
 
-         attrs = Fcons (Fcons (Qutime,
+         attrs = Fcons (Fcons (Qtime,
                                list3 (make_number (pinfo.pr_time.tv_sec >> 16),
                                       make_number (pinfo.pr_time.tv_sec & 0xffff),
                                       make_number (pinfo.pr_time.tv_nsec))),
                         attrs);
 
-         attrs = Fcons (Fcons (Qcutime,
+         attrs = Fcons (Fcons (Qctime,
                                list3 (make_number (pinfo.pr_ctime.tv_sec >> 16),
                                       make_number (pinfo.pr_ctime.tv_sec & 0xffff),
                                       make_number (pinfo.pr_ctime.tv_nsec))),
@@ -3759,8 +3743,9 @@ system_process_attributes (Lisp_Object pid)
   return attrs;
 }
 
-/* The WINDOWSNT implementation is on w32.c.  */
-#elif !defined (WINDOWSNT)
+/* The WINDOWSNT implementation is in w32.c.
+   The MSDOS implementation is in dosfns.c.  */
+#elif !defined (WINDOWSNT) && !defined (MSDOS)
 
 Lisp_Object
 system_process_attributes (Lisp_Object pid)