emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1540481850: Fix the MS-DOS build


From: Po Lu
Subject: master 1540481850: Fix the MS-DOS build
Date: Wed, 6 Jul 2022 02:10:05 -0400 (EDT)

branch: master
commit 15404818503e0d3df7a8c56af13e4123bd231989
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix the MS-DOS build
    
    * msdos/sedlibmk.inp: Define GL_GNULIB_RAWMEMCHR.
    * src/process.c (Fsignal_names): Disable on MS-DOS and use
    SIGNUM_BOUND, which is always provided by gnulib.
---
 msdos/sedlibmk.inp | 3 +++
 src/process.c      | 9 ++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp
index 302fefe19f..9847e710c0 100644
--- a/msdos/sedlibmk.inp
+++ b/msdos/sedlibmk.inp
@@ -192,6 +192,9 @@ s/@PACKAGE@/emacs/
 /^GL_GNULIB_TIMEGM *=/s/@GL_GNULIB_TIMEGM@/1/
 /^GL_GNULIB_TIME_RZ *=/s/@GL_GNULIB_TIME_RZ@/1/
 /^GL_GNULIB_UNSETENV *=/s/@GL_GNULIB_UNSETENV@/1/
+# Apparently without this `rawmemchr' isn't declared, so
+# we get warnings building canonicalize-lgpl.o
+/^GL_GNULIB_RAWMEMCHR *=/s/@GL_GNULIB_RAWMEMCHR@/1/
 /^GL_GNULIB_[^ =]* *= *@/s/@[^@\n]*@/0/
 /^GL_GSETTINGS_CFLAGS *=/s/@[^@\n]*@//
 /^GL_GSETTINGS_LIBS *=/s/@[^@\n]*@//
diff --git a/src/process.c b/src/process.c
index af402c8edb..d6d51b26e1 100644
--- a/src/process.c
+++ b/src/process.c
@@ -8321,14 +8321,21 @@ DEFUN ("signal-names", Fsignal_names, Ssignal_names, 0, 
0, 0,
        doc: /* Return a list of known signal names on this system.  */)
   (void)
 {
+#ifndef MSDOS
+  int i;
   char name[SIG2STR_MAX];
   Lisp_Object names = Qnil;
-  for (int i = 0; i < 256; ++i)
+
+  for (i = 0; i <= SIGNUM_BOUND; ++i)
     {
       if (!sig2str (i, name))
        names = Fcons (build_string (name), names);
     }
+
   return names;
+#else
+  return Qnil;
+#endif
 }
 
 #ifdef subprocesses



reply via email to

[Prev in Thread] Current Thread [Next in Thread]