From: Po Lu Date: Thu, 29 Sep 2022 01:35:31 +0000 (+0800) Subject: Fix the MS-DOS build X-Git-Tag: emacs-29.0.90~1856^2~152 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2bb8c2cf64890e296ff3f395625ab5b184bc6ecd;p=emacs.git Fix the MS-DOS build * config.bat: Add assert.in-h. * msdos/sed2v2.inp: Define HAVE_STDBOOL_H. * msdos/sedlibmk.inp (GL_GNULIB_LCHMOD, HAVE_LCHMOD): Define to reflect realities. (NEXT_ASSERT_H, @GL_GENERATE_ASSERT_H_CONDITION@): Define. (assert.h): Edit command group into individual commands appending to assert.h-t. --- diff --git a/config.bat b/config.bat index 4adc477bc95..7f2060ce000 100644 --- a/config.bat +++ b/config.bat @@ -276,6 +276,7 @@ cd lib Rem Rename files like djtar on plain DOS filesystem would. If Exist c++defs.h update c++defs.h cxxdefs.h If Exist alloca.in.h update alloca.in.h alloca.in-h +If Exist assert.in.h update assert.in.h assert.in-h If Exist byteswap.in.h update byteswap.in.h byteswap.in-h If Exist dirent.in.h update dirent.in.h dirent.in-h If Exist errno.in.h update errno.in.h errno.in-h diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index 8728c8dac48..ff6be8d0830 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -114,6 +114,7 @@ s/^#undef POINTER_TYPE *$/#define POINTER_TYPE void/ #else\ #undef HAVE_INTTYPES_H\ #endif +s/^#undef HAVE_STDBOOL_H/#define HAVE_STDBOOL_H 1/ /^#undef HAVE_STDINT_H/c\ #if __DJGPP__ > 2 || __DJGPP_MINOR__ > 3\ #define HAVE_STDINT_H 1\ diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp index 79430bbaf1d..3af0db6e0a5 100644 --- a/msdos/sedlibmk.inp +++ b/msdos/sedlibmk.inp @@ -182,6 +182,7 @@ s/@PACKAGE@/emacs/ /^GL_GNULIB_GETLOADAVG *=/s/@GL_GNULIB_GETLOADAVG@/1/ /^GL_GNULIB_GETRANDOM *=/s/@GL_GNULIB_GETRANDOM@/1/ /^GL_GNULIB_UNISTD_H_GETOPT *=/s/@GL_GNULIB_UNISTD_H_GETOPT@/1/ +/^GL_GNULIB_LCHMOD *=/s/@GL_GNULIB_LCHMOD@/1/ /^GL_GNULIB_MEMMEM *=/s/@GL_GNULIB_MEMMEM@/1/ /^GL_GNULIB_MEMRCHR *=/s/@GL_GNULIB_MEMRCHR@/1/ /^GL_GNULIB_MEMPCPY *=/s/@GL_GNULIB_MEMPCPY@/1/ @@ -216,7 +217,8 @@ s/@PACKAGE@/emacs/ /^HAVE_GETHOSTNAME *=/s/@HAVE_GETHOSTNAME@/1/ /^HAVE_GETLOGIN *=/s/@HAVE_GETLOGIN@/1/ /^HAVE_GETPAGESIZE *=/s/@HAVE_GETPAGESIZE@/1/ -/^HAVE_INTTYPES_H *=/s/@HAVE_INTTYPES_H@/HAVE_INTTYPES_H/ +/^HAVE_INTTYPES_H *=/s/@HAVE_INTTYPES_H@/1/ +/^HAVE_LCHMOD *=/s/@HAVE_LCHMOD@/0/ /^HAVE_LINK *=/s/@HAVE_LINK@/1/ /^HAVE_LONG_LONG_INT *=/s/@HAVE_LONG_LONG_INT@/1/ /^HAVE_LSTAT *=/s/@HAVE_LSTAT@/HAVE_LSTAT/ @@ -293,7 +295,8 @@ s/@PACKAGE@/emacs/ /^NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H *=/s!@[^@\n]*@!! /^NEXT_AS_FIRST_DIRECTIVE_TIME_H *=/s/@[^@\n]*@// -/^NEXT_AS_FIRST_DIRECTIVE_UNISTD_H *=/s/@[^@\n]*@// +/^NEXT_ASSERT_H *=/s/@[^@\n]*@// +/^NEXT_DIRENT_H *=/s/@[^@\n]*@// /^NEXT_DIRENT_H *=/s/@[^@\n]*@// /^NEXT_ERRNO_H *=/s/@[^@\n]*@// /^NEXT_FCNTL_H *=/s/@[^@\n]*@// @@ -323,6 +326,7 @@ s/@PACKAGE@/emacs/ /^LIB_GETRANDOM[^ =]* *= *@/s/@[^@\n]*@// /^SIG_ATOMIC_T_SUFFIX *=/s/@SIG_ATOMIC_T_SUFFIX@// /^SIZE_T_SUFFIX *=/s/@SIZE_T_SUFFIX@/u/ +/^ASSERT_H *=/s/@[^@\n]*@/assert.h/ /^ALLOCA_H *=/s/@[^@\n]*@/alloca.h/ /^BYTESWAP_H *=/s/@[^@\n]*@/byteswap.h/ /^DIRENT_H *=/s/@[^@\n]*@// @@ -412,6 +416,9 @@ s/^ -*test -z.*|| rm/ -rm/ s/@echo /@djecho / # # Determine which headers to generate +# DJGPP assert.h lacks static_assert, so assert.h will have to be +# generated +s/= @GL_GENERATE_ASSERT_H_CONDITION@/= 1/ s/= @GL_GENERATE_ALLOCA_H_CONDITION@/= 1/ s/= @GL_GENERATE_BYTESWAP_H_CONDITION@/= 1/ s/= @GL_GENERATE_EXECINFO_H_CONDITION@/= 1/ @@ -497,6 +504,14 @@ s/\.in-h\; *\\$/.in-h >> $@-t/ s/'\; \\ *$/' >> $@-t/ /< \$(srcdir)\/string\.in-h >>/d } +/^assert\.h/,/^ \$(AM_V_AT)mv \$@-t \$@/{ + s/\$(gl_V_at){/\$(gl_V_at)/ + s/< \$(srcdir)\/assert\.in-h/& > $@-t/ + s/ sed/ \$(gl_V_at) \$(SED_HEADER_STDOUT)\\\ + / + s/\} > \$@-t/>> $@-t/ + s/< \$(srcdir)\/verify\.h; \\/\$(srcdir)\/verify\.h >> \$@-t/ +} s!\$(MKDIR_P)[ ][ ]*sys!command.com /c "if not exist sys\\stat.h md sys"! /^ @for dir in/,/^[^ ]/c\ -rm -rf $(MOSTLYCLEANDIRS)