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.
This commit is contained in:
Po Lu 2022-07-06 14:09:51 +08:00
parent 18050712a4
commit 1540481850
2 changed files with 11 additions and 1 deletions

View file

@ -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]*@//

View file

@ -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