Adapt the MSDOS build to latest changes.

msdos/inttypes.h: New file.
 msdos/sed2v2.inp (HAVE_DECL_STRTOULL, HAVE_DECL_STRTOUMAX)
 (HAVE_STRTOULL, HAVE_STRTOULL): Define to 1.
 src/sedlibmk.inp (BUILT_SOURCES): Edit out inttypes.h.
 src/sed1v2.inp (CPPFLAGS): Edit to "-I../msdos".
 Add ../msdos/inttypes.h to prerequisites of lread.o.
 src/dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
 rather than `XVECTOR (FOO)->size'.
This commit is contained in:
Eli Zaretskii 2011-04-30 13:31:17 +03:00
parent 330d880c3a
commit 8db90b7394
7 changed files with 60 additions and 6 deletions

View file

@ -1,3 +1,15 @@
2011-04-30 Eli Zaretskii <eliz@gnu.org>
* inttypes.h: New file.
* sed2v2.inp (HAVE_DECL_STRTOULL, HAVE_DECL_STRTOUMAX)
(HAVE_STRTOULL, HAVE_STRTOULL): Define to 1.
* sedlibmk.inp (BUILT_SOURCES): Edit out inttypes.h.
* sed1v2.inp (CPPFLAGS): Edit to "-I../msdos".
Add ../msdos/inttypes.h to prerequisites of lread.o.
2011-04-24 Eli Zaretskii <eliz@gnu.org>
* sedlibmk.inp (am_libgnu_a_OBJECTS): Edit out

31
msdos/inttypes.h Normal file
View file

@ -0,0 +1,31 @@
/* Replacement inntypes.h file for building GNU Emacs on MS-DOS with DJGPP.
Copyright (C) 2011 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _REPL_INTTYPES_H
#define _REPL_INTTYPES_H
#if __DJGPP__ > 2 || __DJGPP_MINOR__ >= 4
#include_next <inttypes.h>
#else /* __DJGPP__ < 2.04 */
#include <stdlib.h>
#define uintmax_t unsigned long long
#define strtoumax strtoull
#endif /* __DJGPP__ < 2.04 */
#endif

View file

@ -28,7 +28,8 @@ s/\.h\.in/.h-in/
/^CPP *=/s/@[^@\n]*@/gcc -e/
/^CFLAGS *=/s/@[^@\n]*@/-O2 -gcoff/
/^ALL_CFLAGS *=/s/@[^@\n]*@//g
/^CPPFLAGS *=/s/@[^@\n]*@//
/^ALL_CFLAGS *=/s/ -I\.//g
/^CPPFLAGS *=/s|@[^@\n]*@|-I../msdos|
/^LDFLAGS *=/s/@[^@\n]*@//
/^LD_FIRSTFLAG *=/s/@[^@\n]*@//
/^LIBS *=/s/@[^@\n]*@//
@ -193,3 +194,5 @@ s/\$(LIBOTF_CFLAGS) \$(M17N_FLT_CFLAGS) \$(DEPFLAGS) //
s/ \$(C_SWITCH_X_SITE)//
s/ \$(DBUS_CFLAGS)//
s| -I\$(srcdir)/../lib||
# Add our local inttypes.h to prerequisites where needed
/^lread\.o:/s|lread\.c|& ../msdos/inttypes.h|

View file

@ -100,6 +100,10 @@ s/^#undef POINTER_TYPE *$/#define POINTER_TYPE void/
#else\
#undef HAVE_STDINT_H\
#endif
s/^#undef HAVE_DECL_STRTOULL *$/#define HAVE_DECL_STRTOULL 1/
s/^#undef HAVE_DECL_STRTOUMAX *$/#define HAVE_DECL_STRTOUMAX 1/
s/^#undef HAVE_STRTOULL *$/#define HAVE_STRTOULL 1/
s/^#undef HAVE_STRTOULL *$/#define HAVE_STRTOULL 1/
# Comment out any remaining undef directives, because some of them
# might be defined in sys/config.h we include at the top of config.h.

View file

@ -515,8 +515,9 @@ am__cd = cd
/^WCHAR_T_SUFFIX *=/s/@WCHAR_T_SUFFIX@/h/
/^WINT_T_SUFFIX *=/s/@WINT_T_SUFFIX@//
/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o strftime.o time_r.o getloadavg.o md5.o filemode.o/
/^am_libgnu_a_OBJECTS *=/s/careadlinkat.\$(OBJEXT)//
/^am_libgnu_a_OBJECTS *=/s/allocator.\$(OBJEXT)//
/^BUILT_SOURCES *=/s/ *inttypes\.h//
/^am_libgnu_a_OBJECTS *=/s/careadlinkat\.\$(OBJEXT)//
/^am_libgnu_a_OBJECTS *=/s/allocator\.\$(OBJEXT)//
/^srcdir *=/s/@[^@\n]*@/./
/^top_srcdir *=/s/@[^@\n]*@/../
/^top_builddir *=/s/@[^@\n]*@/../

View file

@ -1,5 +1,8 @@
2011-04-30 Eli Zaretskii <eliz@gnu.org>
* dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
rather than `XVECTOR (FOO)->size'.
* process.c: Remove HAVE_INTTYPES_H condition from inclusion of
inttypes.h, as a gnulib replacement is used if it not available in
system headers.

View file

@ -62,7 +62,7 @@ REGISTERS should be a vector produced by `make-register' and
CHECK_NUMBER (interrupt);
no = (unsigned long) XINT (interrupt);
CHECK_VECTOR (registers);
if (no < 0 || no > 0xff || XVECTOR (registers)-> size != 8)
if (no < 0 || no > 0xff || ASIZE (registers) != 8)
return Qnil;
for (i = 0; i < 8; i++)
CHECK_NUMBER (XVECTOR (registers)->contents[i]);
@ -102,7 +102,7 @@ Return the updated VECTOR. */)
CHECK_NUMBER (address);
offs = (unsigned long) XINT (address);
CHECK_VECTOR (vector);
len = XVECTOR (vector)-> size;
len = ASIZE (vector);
if (len < 1 || len > 2048 || offs < 0 || offs > 0xfffff - len)
return Qnil;
buf = alloca (len);
@ -125,7 +125,7 @@ DEFUN ("msdos-memput", Fdos_memput, Sdos_memput, 2, 2, 0,
CHECK_NUMBER (address);
offs = (unsigned long) XINT (address);
CHECK_VECTOR (vector);
len = XVECTOR (vector)-> size;
len = ASIZE (vector);
if (len < 1 || len > 2048 || offs < 0 || offs > 0xfffff - len)
return Qnil;
buf = alloca (len);