Commit b3cf17f6 authored by Eli Zaretskii's avatar Eli Zaretskii

Adapt the MSDOS build to the latest changes on mainline.

parent 67b50ba4
2012-11-03 Eli Zaretskii <eliz@gnu.org>
* config.bat: Copy lib/execinfo.in.h to lib/execinfo.in-h if needed.
2012-10-26 Glenn Morris <rgm@gnu.org>
* Makefile.in (EMACS_NAME): New variable.
......
# Build Emacs from a fresh tarball or version-control checkout.
# Copyright (C) 2011-2012 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/>.
#
# written by Paul Eggert
# This GNUmakefile is for GNU Make. It is for convenience, so that
# one can run 'make' in an unconfigured source tree. In such a tree,
# this file causes GNU Make to first create a standard configuration
# with the default options, and then reinvokes itself on the
# newly-built Makefile. If the source tree is already configured,
# this file defers to the existing Makefile.
# If you are using a non-GNU 'make', or if you want non-default build
# options, or if you want to build in an out-of-source tree, please
# run "configure" by hand. But run autogen.sh first, if the source
# was checked out directly from the repository.
# If a Makefile already exists, just use it.
ifeq ($(wildcard Makefile),Makefile)
include Makefile
else
# If cleaning and Makefile does not exist, don't bother creating it.
# The source tree is already clean, or is in a weird state that
# requires expert attention.
ifeq ($(filter-out %clean,$(or $(MAKECMDGOALS),default)),)
$(MAKECMDGOALS):
@echo >&2 'No Makefile; skipping $@.'
else
# No Makefile, and not cleaning.
# If 'configure' does not exist, Emacs must have been checked
# out directly from the repository; run ./autogen.sh.
# Once 'configure' exists, run it.
# Finally, run the actual 'make'.
default $(filter-out configure Makefile,$(MAKECMDGOALS)): Makefile
$(MAKE) -f Makefile $(MAKECMDGOALS)
# Execute in sequence, so that multiple user goals don't conflict.
.NOTPARALLEL:
configure:
@echo >&2 'There seems to be no "configure" file in this directory.'
@echo >&2 'Running ./autogen.sh || autogen/copy_autogen ...'
./autogen.sh || autogen/copy_autogen
@echo >&2 '"configure" file built.'
Makefile: configure
@echo >&2 'There seems to be no Makefile in this directory.'
@echo >&2 'Running ./configure ...'
./configure
@echo >&2 'Makefile built.'
endif
endif
......@@ -264,6 +264,7 @@ cd lib
Rem Rename files like djtar on plain DOS filesystem would.
If Exist build-aux\snippet\c++defs.h update build-aux/snippet/c++defs.h build-aux/snippet/cxxdefs.h
If Exist alloca.in.h update alloca.in.h alloca.in-h
If Exist execinfo.in.h update execinfo.in.h execinfo.in-h
If Exist getopt.in.h update getopt.in.h getopt.in-h
If Exist stdalign.in.h update stdalign.in.h stdalign.in-h
If Exist stdbool.in.h update stdbool.in.h stdbool.in-h
......
2012-11-03 Eli Zaretskii <eliz@gnu.org>
* sedlibmk.inp: Sync with changes in lib/Makefile.in.
(HAVE_DECL_ENVIRON, GNULIB_ENVIRON): Edit to require declaration
through lib/unistd.h.
* sed1v2.inp: Sync with changes in src/Makefile.in.
* sed2v2.inp: Sync with changes in src/config.in.
2012-10-08 Eli Zaretskii <eliz@gnu.org>
* sed1v2.inp (W32_LIBS, W32_OBJ): Edit to empty.
......
......@@ -55,11 +55,11 @@ s/\.h\.in/.h-in/
/^LIB_STANDARD *=/s/@LIB_STANDARD@//
/^LIB_MATH *=/s/@LIB_MATH@/-lm/
/^LIB_PTHREAD *=/s/@LIB_PTHREAD@//
/^LIBTIFF *=/s/@LIBTIFF@//
/^LIBJPEG *=/s/@LIBJPEG@//
/^LIBPNG *=/s/@LIBPNG@//
/^LIBGIF *=/s/@LIBGIF@//
/^LIBXPM *=/s/@LIBXPM@//
s/ *@LIBTIFF@//
s/ *@LIBJPEG@//
s/ *@LIBPNG@//
s/ *@LIBGIF@//
s/ *@LIBXPM@//
/^XFT_LIBS *=/s/@XFT_LIBS@//
/^FONTCONFIG_CFLAGS *=/s/@FONTCONFIG_CFLAGS@//
/^FONTCONFIG_LIBS *=/s/@FONTCONFIG_LIBS@//
......@@ -95,10 +95,8 @@ s/\.h\.in/.h-in/
/^LIBXML2_CFLAGS *=/s/@LIBXML2_CFLAGS@//
/^WIDGET_OBJ *=/s/@WIDGET_OBJ@//
/^CYGWIN_OBJ *=/s/@CYGWIN_OBJ@//
/^WINDOW_SYSTEM_OBJ *=/s/@WINDOW_SYSTEM_OBJ@//
/^MSDOS_OBJ *=/s/= */= dosfns.o msdos.o w16select.o/
/^ns_appdir *=/s/@ns_appdir@//
/^ns_appbindir *=/s/@ns_appbindir@//
/^ns_appsrc *=/s/@ns_appsrc@//
/^NS_OBJ *=/s/@NS_OBJ@//
/^NS_OBJC_OBJ *=/s/@NS_OBJC_OBJ@//
/^GNU_OBJC_CFLAGS*=/s/@GNU_OBJC_CFLAGS@//
......@@ -107,6 +105,7 @@ s/\.h\.in/.h-in/
/^LIB_PTHREAD_SIGMASK *=/s/@[^@\n]*@//
/^LIB_CLOCK_GETTIME *=/s/@[^@\n]*@//g
/^LIB_TIMER_TIME *=/s/@[^@\n]*@//g
/^LIB_EXECINFO *=/s/@[^@\n]*@//g
/^LIBGNUTLS_LIBS *=/s/@[^@\n]*@//
/^LIBGNUTLS_CFLAGS *=/s/@[^@\n]*@//
/^GETLOADAVG_LIBS *=/s/@[^@\n]*@//
......@@ -143,7 +142,7 @@ s/\.h\.in/.h-in/
/^ *test "X\$(PAXCTL)" = X/d
/^ *test "\$(CANNOT_DUMP)" = "yes"/d
/^ if test "\$(CANNOT_DUMP)" =/,/^ else /d
/^ -\{0,1\} *ln -/s/bootstrap-emacs\$(EXEEXT).*$/bootstrap-emacs$(EXEEXT)/
/^ -\{0,1\} *ln /s/bootstrap-emacs\$(EXEEXT).*$/bootstrap-emacs$(EXEEXT)/
/^ fi/d
/^ *LC_ALL=C \$(RUN_TEMACS)/i\
stubedit temacs.exe minstack=1024k
......@@ -170,7 +169,7 @@ s/^ [^ ]*move-if-change / update /
/^ #/d
/^ cd.*make-docfile/s!$!; cd ../src!
/^ @: /d
/^ -\{0,1\} *ln -/s/ln -f/cp -pf/
/^ -\{0,1\} *ln /s/ln /cp /
/^[ ]touch /s/touch/djecho $@ >/
s/@YMF_PASS_LDFLAGS@/flags/
s/@lisp_frag@//
......
......@@ -30,26 +30,25 @@
#ifndef MSDOS\
#define MSDOS\
#endif
/^#undef COPYRIGHT *$/s/^.*$/#define COPYRIGHT "Copyright (C) 2012 Free Software Foundation, Inc."/
/^#undef DIRECTORY_SEP *$/s!^.*$!#define DIRECTORY_SEP '/'!
/^#undef DOS_NT *$/s/^.*$/#define DOS_NT/
/^#undef FLOAT_CHECK_DOMAIN *$/s/^.*$/#define FLOAT_CHECK_DOMAIN/
/^#undef HAVE_ALLOCA *$/s/^.*$/#define HAVE_ALLOCA 1/
/^#undef HAVE_INVERSE_HYPERBOLIC *$/s/^.*$/#define HAVE_INVERSE_HYPERBOLIC/
/^#undef HAVE_SETITIMER *$/s/^.*$/#define HAVE_SETITIMER 1/
/^#undef HAVE_STRUCT_UTIMBUF *$/s/^.*$/#define HAVE_STRUCT_UTIMBUF 1/
/^#undef LOCALTIME_CACHE *$/s/^.*$/#define LOCALTIME_CACHE 1/
/^#undef HAVE_TZSET *$/s/^.*$/#define HAVE_TZSET 1/
/^#undef HAVE_LOGB *$/s/^.*$/#define HAVE_LOGB 1/
/^#undef HAVE_FREXP *$/s/^.*$/#define HAVE_FREXP 1/
/^#undef HAVE_FMOD *$/s/^.*$/#define HAVE_FMOD 1/
/^#undef HAVE_RINT *$/s/^.*$/#define HAVE_RINT 1/
/^#undef HAVE_C99_STRTOLD *$/s/^.*$/#define HAVE_C99_STRTOLD 1/
/^#undef HAVE_CBRT *$/s/^.*$/#define HAVE_CBRT 1/
/^#undef HAVE_DIFFTIME *$/s/^.*$/#define HAVE_DIFFTIME 1/
/^#undef HAVE_FPATHCONF *$/s/^.*$/#define HAVE_FPATHCONF 1/
/^#undef HAVE_MEMSET *$/s/^.*$/#define HAVE_MEMSET 1/
/^#undef HAVE_MEMCMP *$/s/^.*$/#define HAVE_MEMCMP 1/
/^#undef HAVE_MEMMOVE *$/s/^.*$/#define HAVE_MEMMOVE 1/
/^#undef HAVE_SETPGID *$/s/^.*$/#define HAVE_SETPGID 1/
/^#undef HAVE_SETRLIMIT *$/s/^.*$/#define HAVE_SETRLIMIT 1/
/^#undef HAVE_SIGSETJMP *$/s/^.*$/#define HAVE_SIGSETJMP 1/
/^#undef HAVE_GETRUSAGE *$/s/^.*$/#define HAVE_GETRUSAGE 1/
/^#undef GETTIMEOFDAY_TIMEZONE *$/s/^.*$/#define GETTIMEOFDAY_TIMEZONE struct timezone/
/^#undef HAVE_TM_GMTOFF *$/s/^.*$/#define HAVE_TM_GMTOFF 1/
......@@ -70,6 +69,7 @@
/^#undef PACKAGE_STRING/s/^.*$/#define PACKAGE_STRING ""/
/^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/
/^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION ""/
/^#undef PENDING_OUTPUT_COUNT/s/^.*$/#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)/
/^#undef VERSION/s/^.*$/#define VERSION "24.2.50"/
/^#undef SYSTEM_TYPE/s/^.*$/#define SYSTEM_TYPE "ms-dos"/
/^#undef HAVE_DECL_GETENV/s/^.*$/#define HAVE_DECL_GETENV 1/
......@@ -95,8 +95,6 @@
/^#undef NULL_DEVICE *$/s/^.*$/#define NULL_DEVICE "nul"/
/^#undef SEPCHAR *$/s/^.*$/#define SEPCHAR '\;'/
/^#undef USER_FULL_NAME *$/s/^.*$/#define USER_FULL_NAME (getenv ("NAME"))/
/^#undef _setjmp/s/^.*$/#define _setjmp setjmp/
/^#undef _longjmp/s/^.*$/#define _longjmp longjmp/
/^#undef inline/s/^.*$/#define inline __inline__/
/^#undef my_strftime/s/^.*$/#define my_strftime nstrftime/
/^#undef restrict/s/^.*$/#define restrict __restrict/
......
......@@ -141,6 +141,7 @@ am__cd = cd
/^DEPFLAGS *=/s/@[^@\n]*@/-MMD -MF ${DEPDIR}\/$*.d/
/^ECHO_N *=/s/@[^@\n]*@/-n/
/^EXEEXT *=/s/@[^@\n]*@/.exe/
/^EXECINFO_H *=/s/@[^@\n]*@/execinfo.h/
/^GETOPT_H *=/s/@[^@\n]*@/getopt.h/
#
# Gnulib stuff
......@@ -165,7 +166,7 @@ am__cd = cd
/^GNULIB_DUP *=/s/@GNULIB_DUP@/0/
/^GNULIB_DUP2 *=/s/@GNULIB_DUP2@/0/
/^GNULIB_DUP3 *=/s/@GNULIB_DUP3@/1/
/^GNULIB_ENVIRON *=/s/@GNULIB_ENVIRON@/0/
/^GNULIB_ENVIRON *=/s/@GNULIB_ENVIRON@/1/
/^GNULIB_EUIDACCESS *=/s/@GNULIB_EUIDACCESS@/0/
/^GNULIB_FACCESSAT *=/s/@GNULIB_FACCESSAT@/0/
/^GNULIB_FCHDIR *=/s/@GNULIB_FCHDIR@/0/
......@@ -319,7 +320,7 @@ am__cd = cd
/^HAVE_ATOLL *=/s/@HAVE_ATOLL@/0/
/^HAVE_CANONICALIZE_FILE_NAME *=/s/@HAVE_CANONICALIZE_FILE_NAME@/0/
/^HAVE_CHOWN *=/s/@HAVE_CHOWN@/1/
/^HAVE_DECL_ENVIRON *=/s/@HAVE_DECL_ENVIRON@/1/
/^HAVE_DECL_ENVIRON *=/s/@HAVE_DECL_ENVIRON@/0/
/^HAVE_DECL_FCHDIR *=/s/@HAVE_DECL_FCHDIR@/0/
/^HAVE_DECL_FDATASYNC *=/s/@HAVE_DECL_FDATASYNC@/0/
/^HAVE_DECL_FPURGE *=/s/@HAVE_DECL_FPURGE@//
......@@ -540,6 +541,7 @@ am__cd = cd
/^REPLACE_PREAD *=/s/@REPLACE_PREAD@/0/
/^REPLACE_PRINTF *=/s/@REPLACE_PRINTF@/0/
/^REPLACE_PTHREAD_SIGMASK *=/s/@REPLACE_PTHREAD_SIGMASK@/0/
/^REPLACE_PTSNAME *=/s/@REPLACE_PTSNAME@/0/
/^REPLACE_PSELECT *=/s/@REPLACE_PSELECT@/0/
/^REPLACE_PTSNAME *=/s/@REPLACE_PTSNAME@/0/
/^REPLACE_PTSNAME_R *=/s/@REPLACE_PTSNAME_R@/0/
......@@ -646,6 +648,8 @@ s/@echo /@djecho/
# Fix the recipes for header files
s/^@GL_GENERATE_ALLOCA_H_TRUE@//
s/^@GL_GENERATE_ALLOCA_H_FALSE@/\#/
s/^@GL_GENERATE_EXECINFO_H_TRUE@//
s/^@GL_GENERATE_EXECINFO_H_FALSE@/\#/
s/^@GL_GENERATE_STDBOOL_H_TRUE@/\#/
s/^@GL_GENERATE_STDBOOL_H_FALSE@//
s/^@GL_GENERATE_STDALIGN_H_TRUE@//
......
2012-11-03 Eli Zaretskii <eliz@gnu.org>
* msdos.c (msdos_abort): Rename from emacs_abort, and make static.
(msdos_fatal_signal): New function.
(XMenuActivate): Adjust the call to kbd_buffer_events_waiting to
its argument list.
* conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Define to "inline"
for GCC versions before 4.
(emacs_raise): Define to call msdos_fatal_signal.
* xdisp.c (init_from_display_pos): Fix initialization of the bidi
iterator when starting in the middle of a display or overlay
string. (Bug#12745)
......
......@@ -110,8 +110,17 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
#else
# define lstat stat
#endif
/* The "portable" definition of _GL_INLINE on config.h does not work
with DJGPP GCC 3.4.4: it causes unresolved externals in sysdep.c,
although lib/execinfo.h is included and the inline functions there
are visible. */
#if __GNUC__ < 4
# define _GL_EXECINFO_INLINE inline
#endif
/* End of gnulib-related stuff. */
#define emacs_raise(sig) msdos_fatal_signal (sig)
#ifndef HAVE_SETPGID
# ifdef USG
# define setpgid(pid, pgid) setpgrp ()
......
......@@ -3305,7 +3305,7 @@ XMenuActivate (Display *foo, XMenu *menu, int *pane, int *selidx,
Emacs will process them after we return and surprise the user. */
discard_mouse_events ();
mouse_clear_clicks ();
if (!kbd_buffer_events_waiting (1))
if (!kbd_buffer_events_waiting ())
clear_input_pending ();
/* Allow mouse events generation by dos_rawgetc. */
mouse_preempted--;
......@@ -4214,8 +4214,8 @@ init_gettimeofday (void)
}
#endif
void
emacs_abort (void)
static void
msdos_abort (void)
{
dos_ttcooked ();
ScreenSetCursor (10, 0);
......@@ -4232,6 +4232,15 @@ emacs_abort (void)
exit (2);
}
void
msdos_fatal_signal (int sig)
{
if (sig == SIGABRT)
msdos_abort ();
else
raise (sig);
}
void
syms_of_msdos (void)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment