Commit bf6b4923 authored by Eli Zaretskii's avatar Eli Zaretskii

Fix the MSDOS build.

 src/unexcoff.c [MSDOS]: Include libc/atexit.h.
 (copy_text_and_data): Zero out the atexit chain pointer before
 dumping Emacs.
 src/termhooks.h (encode_terminal_code): Update prototype.
 src/term.c (encode_terminal_code) [DOS_NT]: Make it externally
 visible for all DOS_NT ports, not just WINDOWSNT.
 (syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
 src/sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
 unless it is defined.
 (emacs_pipe) [MSDOS]: Redirect to 'pipe'.
 src/process.c (close_on_exec, accept4, process_socket): Move into
 the "ifdef subprocesses" part.
 (catch_child_signal): Condition by "ifdef subprocesses".
 (syms_of_process) <Qinternal_default_process_sentinel>
 <Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
 src/msdos.h: Add prototypes for new functions.
 (EINPROGRESS): Define.
 (O_CLOEXEC): Define to zero.
 src/msdos.c (check_window_system): Remove unnecessary an
 incompatible duplicate function.
 (sys_opendir, readlinkat, faccessat, fstatat, unsetenv): New
 functions in support of new functionality.
 src/menu.c (single_menu_item): Add visual indication  of submenu
 also for menus on MSDOS frames.
 (Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
 src/lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
 when async subprocesses aren't supported.
 src/font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
 src/emacs.c (close_output_streams): Zero out errno before calling
 close_stream.
 src/dired.c [MSDOS]: Include msdos.h.
 src/conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
 (DATA_START) [MSDOS]: Define.
 (SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K.
 src/callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
 Ifdef away for MSDOS.
 (record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
 (call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
 for MSDOS.
 (call_process) [MSDOS]: Fix call sequence of dostounix_filename.
 Use temporary file template that is compatible with mkostemp.
 Move vfork-related portions under #ifndef MSDOS.
 (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.

 lisp/term/pc-win.el (x-list-fonts, x-get-selection-value): Provide
 doc strings, as required by snarf-documentation.

 msdos/sedlisp.inp:
 msdos/sedlibmk.inp:
 msdos/sedleim.inp:
 msdos/sed3v2.inp:
 msdos/sed2v2.inp:
 msdos/sed1v2.inp: Update Sed scripts for Emacs 24.4.
 msdos/inttypes.h: Add PRIdMAX.
 msdos/INSTALL: Update for Emacs 24.4.
 msdos/sedadmin.inp: New file.
parent 3a31cae4
2014-04-16 Eli Zaretskii <eliz@gnu.org>
* config.bat: Update for Emacs 24.4.
2014-04-13 Paul Eggert <eggert@cs.ucla.edu>
Port to IRIX 6.5 (Bug#9684).
......
......@@ -264,8 +264,14 @@ 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 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
If Exist execinfo.in.h update execinfo.in.h execinfo.in-h
If Exist fcntl.in.h update fcntl.in.h fcntl.in-h
If Exist getopt.in.h update getopt.in.h getopt.in-h
If Exist inttypes.in.h update inttypes.in.h inttypes.in-h
If Exist stdarg.in.h update stdarg.in.h stdarg.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
If Exist signal.in.h update signal.in.h signal.in-h
......@@ -274,8 +280,11 @@ If Exist stddef.in.h update stddef.in.h stddef.in-h
If Exist stdint.in.h update stdint.in.h stdint.in-h
If Exist stdio.in.h update stdio.in.h stdio.in-h
If Exist stdlib.in.h update stdlib.in.h stdlib.in-h
If Exist string.in.h update string.in.h string.in-h
If Exist sys_select.in.h update sys_select.in.h sys_select.in-h
If Exist sys_stat.in.h update sys_stat.in.h sys_stat.in-h
If Exist sys_types.in.h update sys_types.in.h sys_types.in-h
If Exist sys_time.in.h update sys_time.in.h sys_time.in-h
If Exist time.in.h update time.in.h time.in-h
If Exist unistd.in.h update unistd.in.h unistd.in-h
If Exist Makefile.in sed -f ../msdos/sedlibcf.inp < Makefile.in > makefile.tmp
......@@ -294,13 +303,18 @@ If Exist gnus\.dir-locals.el update gnus/.dir-locals.el gnus/_dir-locals.el
sed -f ../msdos/sedlisp.inp < Makefile.in > Makefile
cd ..
rem ----------------------------------------------------------------------
If not Exist leim\quail\latin-pre.el goto maindir
Echo Configuring the leim directory...
cd leim
sed -f ../msdos/sedleim.inp < Makefile.in > Makefile
cd ..
rem ----------------------------------------------------------------------
:maindir
If Not Exist admin\unidata goto noadmin
Echo Configuring the admin/unidata directory...
cd admin\unidata
sed -f ../../msdos/sedadmin.inp < Makefile.in > Makefile
cd ..\..
:noadmin
rem ----------------------------------------------------------------------
Echo Configuring the main directory...
If Exist .dir-locals.el update .dir-locals.el _dir-locals.el
If Exist src\.dbxinit update src/.dbxinit src/_dbxinit
......
2014-04-16 Eli Zaretskii <eliz@gnu.org>
* update-game-score.c (write_scores): Condition fchmod call on
DOS_NT, not WINDOWSNT.
2014-03-10 Juanma Barranquero <lekktu@gmail.com>
* emacsclient.c (main): #ifdef out previous change on Windows.
......
......@@ -443,7 +443,7 @@ write_scores (const char *filename, const struct score_entry *scores,
fd = mkostemp (tempfile, 0);
if (fd < 0)
return -1;
#ifndef WINDOWSNT
#ifndef DOS_NT
if (fchmod (fd, 0644) != 0)
return -1;
#endif
......@@ -459,7 +459,7 @@ write_scores (const char *filename, const struct score_entry *scores,
return -1;
if (rename (tempfile, filename) != 0)
return -1;
#ifdef WINDOWSNT
#ifdef DOS_NT
if (chmod (filename, 0644) < 0)
return -1;
#endif
......
2014-04-16 Eli Zaretskii <eliz@gnu.org>
* term/pc-win.el (x-list-fonts, x-get-selection-value): Provide
doc strings, as required by snarf-documentation.
2014-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
* ps-def.el (ps-generate-postscript-with-faces1): Use the new `sorted'
......
......@@ -165,6 +165,27 @@ created."
;; From src/xfns.c
(defun x-list-fonts (_pattern &optional _face _frame _maximum width)
"Return a list of the names of available fonts matching PATTERN.
If optional arguments FACE and FRAME are specified, return only fonts
the same size as FACE on FRAME.
PATTERN should be a string containing a font name in the XLFD,
Fontconfig, or GTK format. A font name given in the XLFD format may
contain wildcard characters:
the * character matches any substring, and
the ? character matches any single character.
PATTERN is case-insensitive.
The return value is a list of strings, suitable as arguments to
\`set-face-font'.
Fonts Emacs can't use may or may not be excluded
even if they match PATTERN and FACE.
The optional fourth argument MAXIMUM sets a limit on how many
fonts to match. The first MAXIMUM fonts are reported.
The optional fifth argument WIDTH, if specified, is a number of columns
occupied by a character of a font. In that case, return only fonts
the WIDTH times as wide as FACE on FRAME."
(if (or (null width) (and (numberp width) (= width 1)))
(list "ms-dos")
(list "no-such-font")))
......@@ -232,9 +253,9 @@ is not used)."
(w16-set-clipboard-data text))
(setq x-last-selected-text text))
;;; Return the value of the current selection.
;;; Consult the selection. Treat empty strings as if they were unset.
(defun x-get-selection-value ()
"Return the value of the current selection.
Consult the selection. Treat empty strings as if they were unset."
(if x-select-enable-clipboard
(let (text)
;; Don't die if x-get-selection signals an error.
......
2014-04-16 Eli Zaretskii <eliz@gnu.org>
* sedlisp.inp:
* sedlibmk.inp:
* sedleim.inp:
* sed3v2.inp:
* sed2v2.inp:
* sed1v2.inp: Update Sed scripts for Emacs 24.4.
* inttypes.h: Add PRIdMAX.
* INSTALL: Update for Emacs 24.4.
* sedadmin.inp: New file.
2013-12-24 Paul Eggert <eggert@cs.ucla.edu>
* autogen/Makefile.in: Update copyright year.
......
......@@ -4,18 +4,19 @@ Copyright (C) 1992, 1994, 1996-1997, 2000-2014 Free Software Foundation,
Inc.
See the end of the file for license conditions.
The DJGPP port of GNU Emacs builds and runs on plain DOS and also on
all versions of MS-Windows from version 3.X on, including Windows XP,
Vista, and Windows 7 (however, see below for issues with Windows Vista
and 7).
The DJGPP port of GNU Emacs builds and runs on all versions of
MS-Windows from version 3.X on, including Windows XP, Vista, and
Windows 7 (however, see below for issues with Windows Vista and 7).
Building on plain MS-DOS is supported only if long file names are
supported (e.g., with a specialized driver such as doslfn).
To build and install the DJGPP port, you need to have the DJGPP ports
of GCC (the GNU C compiler), GNU Make, rm, mv, and sed. See the
of GCC (the GNU C compiler), GNU Make, rm, mv, cp, and sed. See the
remarks in CONFIG.BAT for more information about locations and
versions. The Emacs FAQ (see info/efaq) includes pointers to Internet
sites where you can find the necessary utilities; search for "MS-DOS".
The configuration step (see below) will test for these utilities and
will refuse to continue if any of them isn't found.
versions. The Emacs FAQ (see info/efaq.info) includes pointers to
Internet sites where you can find the necessary utilities; search for
"MS-DOS". The configuration step (see below) will test for these
utilities and will refuse to continue if any of them isn't found.
Bootstrapping Emacs or recompiling Lisp files in the `lisp'
subdirectory using the various targets in the lisp/Makefile file
......@@ -27,18 +28,14 @@ are distributed in byte-compiled form as well. As for bootstrapping
itself, you will only need that if you check-out development sources
from the Emacs source repository.
If you are building the DJGPP version of Emacs on a DOS-like system
which supports long file names (e.g. Windows 9X or Windows XP), you
need to make sure that long file names are handled consistently both
when you unpack the distribution and compile it. With DJGPP v2.0 or
later, long file names support is by default, so you need to unpack
Emacs distribution in a way that doesn't truncate the original long
filenames to the DOS 8.3 namespace; the easiest way to do this is to
use djtar program which comes with DJGPP, since it will behave
consistently with the rest of DJGPP tools. Alternatively, you can
build Emacs with LFN=n, if some of your tools don't support long file
names: just ensure that LFN is set to `n' during both unpacking and
compiling.
Building the DJGPP version of Emacs is currently supported only on
systems which support long file names (e.g. Windows 9X or Windows XP).
You need to unpack Emacs distribution in a way that doesn't truncate
the original long filenames to the DOS 8.3 namespace; the easiest way
to do this is to use djtar program which comes with DJGPP, since it
will behave consistently with the rest of DJGPP tools. Do _not_
disable the DJGPP long-file-name support (a.k.a. "LFN") while building
Emacs.
(By the time you read this, you have already unpacked the Emacs
distribution, but if the explanations above imply that you should have
......@@ -46,18 +43,6 @@ done it differently, it's safer to delete the directory tree created
by the unpacking program and unpack Emacs again, than to risk running
into strange problems during the build process.)
It is important to understand that the runtime support of long file
names by the Emacs binary is NOT affected by the LFN setting during
compilation; Emacs compiled with DJGPP v2.0 or later will always
support long file names on Windows no matter what was the setting
of LFN at compile time. However, if you compiled with LFN disabled
and want to enable LFN support after Emacs was already built, you need
to make sure that the support files in the lisp, etc and info
directories are called by their original long names as found in the
distribution. You can do this either by renaming the files manually,
or by extracting them from the original distribution archive with
djtar after you set LFN=y in the environment.
To unpack Emacs with djtar, type this command:
djtar -x emacs.tgz
......@@ -68,13 +53,6 @@ your system.)
When unpacking Emacs is done, a directory called `emacs-XX.YY' will be
created, where XX.YY is the Emacs version.
On plain DOS, unpacking can complain about several directories and
files in the `nextstep' subdirectory of the `emacs-XX.YY' top-level
directory. This is because the names of these files overflow the
67-character limit on the file-name length imposed by DOS filesystems.
When prompted by `djtar' for a different name for these files, just
press [Enter] to skip them: they are not needed for the DJGPP build.
If you want to print international characters, install the intlfonts
distribution. For this, create a directory called `fonts' under the
`emacs-XX.YY' top-level directory created by unpacking emacs.tgz,
......
......@@ -32,6 +32,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define strtoumax strtoull
#define strtoimax strtoll
#define PRIuMAX "llu"
#define PRIdMAX "lld"
#endif /* __DJGPP__ < 2.04 */
#endif
......@@ -48,12 +48,16 @@ s/\.h\.in/.h-in/
/^LD_SWITCH_SYSTEM_TEMACS *=/s/@LD_SWITCH_SYSTEM_TEMACS@//
/^LD_SWITCH_X_SITE_AUX *=/s/@LD_SWITCH_X_SITE_AUX@//
/^LD_SWITCH_X_SITE_AUX_RPATH *=/s/@LD_SWITCH_X_SITE_AUX_RPATH@//
/^LD_SWITCH_X_SITE_RPATH *=/s/@LD_SWITCH_X_SITE_RPATH@//
/^LD_SWITCH_SYSTEM *=/s/@LD_SWITCH_SYSTEM@//
/^LIBS_SYSTEM *=/s/@LIBS_SYSTEM@//
/^LIB_GCC *=/s/@LIB_GCC@//
/^LIB_STANDARD *=/s/@LIB_STANDARD@//
/^LIB_MATH *=/s/@LIB_MATH@/-lm/
/^LIB_PTHREAD *=/s/@LIB_PTHREAD@//
/^LIB_ACL *=/s/@LIB_ACL@//
/^LIB_EACCESS *=/s/@LIB_EACCESS@//
/^LIB_FDATASYNC *=/s/@LIB_FDATASYNC@//
s/ *@LIBTIFF@//
s/ *@LIBJPEG@//
s/ *@LIBPNG@//
......@@ -71,8 +75,10 @@ s/ *@LIBXPM@//
/^DBUS_CFLAGS *=/s/@DBUS_CFLAGS@//
/^DBUS_LIBS *=/s/@DBUS_LIBS@//
/^DBUS_OBJ *=/s/@DBUS_OBJ@//
/^NOTIFY_OBJ *=/s/@NOTIFY_OBJ@//
/^SETTINGS_CFLAGS *=/s/@SETTINGS_CFLAGS@//
/^SETTINGS_LIBS *=/s/@SETTINGS_LIBS@//
/^GFILENOTIFY_LIBS *=/s/@GFILENOTIFY_LIBS@//
/^GTK_OBJ *=/s/@GTK_OBJ@//
/^LIBS_TERMCAP *=/s/@LIBS_TERMCAP@//
/^TERMCAP_OBJ *=/s/@TERMCAP_OBJ@/termcap.o tparam.o/
......@@ -83,6 +89,7 @@ s/ *@LIBXPM@//
/^OLDXMENU_TARGET *=/s/@OLDXMENU_TARGET@//
/^OLDXMENU_DEPS *=/s/@OLDXMENU_DEPS@//
/^XOBJ *=/s/@XOBJ@//
/^XGSELOBJ *=/s/@XGSELOBJ@//
/^TOOLKIT_LIBW *=/s/@TOOLKIT_LIBW@//
/^LIBSOUND *=/s/@LIBSOUND@//
/^LIBS_GNUSTEP *=/s/@LIBS_GNUSTEP@//
......@@ -114,12 +121,19 @@ s/ *@LIBXPM@//
/^XMENU_OBJ *=/s/@XMENU_OBJ@/xmenu.o/
/^FONT_OBJ *=/s/@FONT_OBJ@//
/^LIBGPM *=/s/@LIBGPM@//
/^LIBZ *=/s/@LIBZ@//
/^EXEEXT *=/s/@EXEEXT@/.exe/
/^MKDIR_P *=/s/@MKDIR_P@/gmkdir -p/
/^OLDXMENU *=/s/@OLDXMENU@/nothing/
/^LIBXMENU *=/s/@LIBXMENU@//
/^LIBX_OTHER *=/s/@LIBX_OTHER@//
/^XRANDR_LIBS *=/s/@XRANDR_LIBS@//
/^XRANDR_CFLAGS *=/s/@XRANDR_CFLAGS@//
/^XINERAMA_LIBS *=/s/@XINERAMA_LIBS@//
/^XINERAMA_CFLAGS *=/s/@XINERAMA_CFLAGS@//
/^GMALLOC_OBJ *=/s/@GMALLOC_OBJ@/gmalloc.o/
/^VMLIMIT_OBJ *=/s/@VMLIMIT_OBJ@/vm-limit.o/
/^FIRSTFILE_OBJ *=/s/@FIRSTFILE_OBJ@//
/^RALLOC_OBJ *=/s/@RALLOC_OBJ@/ralloc.o/
/^PRE_ALLOC_OBJ *=/s/@PRE_ALLOC_OBJ@/lastfile.o/
/^POST_ALLOC_OBJ *=/s/@POST_ALLOC_OBJ@/$(vmlimitobj)/
......@@ -130,9 +144,15 @@ s/ *@LIBXPM@//
/^W32_OBJ *=/s/@W32_OBJ@//
/^W32_LIBS *=/s/@W32_LIBS@//
/^version *=/s/@[^@\n]*@//
/^EMACSRES *=/s/@EMACSRES@//
/^EMACS_MANIFEST *=/s/@EMACS_MANIFEST@//
/^W32_RES_LINK *=/s/@W32_RES_LINK@//
/^CM_OBJ *=/s/@CM_OBJ@/cm.o/
/^@SET_MAKE@$/s/@SET_MAKE@//
/^TEMACS_POST_LINK *=/s/@TEMACS_POST_LINK@/stubedit temacs.exe minstack=1024k/
/^ADDSECTION *=/s/@ADDSECTION@//
/^ [ ]*\$(libsrc)\/make-docfile.*>.*\/DOC/s!make-docfile!make-docfile -o $(etc)/DOC!
/^ [ ]*\$(libsrc)\/make-docfile.*>.*gl-tmp/s!make-docfile!make-docfile -o gl-tmp!
/^ [ ]*\$(libsrc)\/make-docfile.*>.*gl.tmp/s!make-docfile!make-docfile -o gl.tmp!
/^.\$(libsrc)\/make-doc/s!>.*$!!
/^ [ ]*\$(libsrc)\/make-docfile /s!`[^`]*`!$(lisp); cd ../src!
/^[ ]*$/d
......@@ -142,6 +162,7 @@ s/ *@LIBXPM@//
/^ *test "X\$(PAXCTL)" = X/d
/^ *test "\$(CANNOT_DUMP)" = "yes"/d
/^ if test "\$(CANNOT_DUMP)" =/,/^ else /d
/^ *\$(SETFATTR) -n/d
/^ -\{0,1\} *ln /s/bootstrap-emacs\$(EXEEXT).*$/bootstrap-emacs$(EXEEXT)/
/^ fi/d
/^ *LC_ALL=C \$(RUN_TEMACS)/i\
......@@ -156,15 +177,17 @@ s/ @true *$/ @rem/
s/^ [^ ]*move-if-change / update /
/^ echo[ ][ ]*timestamp/s/echo /djecho /
/^ .*djecho timestamp/a\
@rm -f gl-tmp
/^ cd \$(leimdir) && \$(MAKE)/i\
@rm -f gl.tmp
/^ cd ..\/leim && \$(MAKE)/i\
$(RUN_TEMACS) -batch -l loadup dump\
stubify emacs\
stubedit emacs.exe minstack=2048k\
rm -f b-emacs$(EXEEXT)\
cp emacs$(EXEEXT) b-emacs$(EXEEXT)
/^ cd \$(leimdir) && \$(MAKE)/c\
$(MAKE) $(MFLAGS) -C $(leimdir) leim-list.el EMACS=$(bootstrap_exe)
/^ cd ..\/leim && \$(MAKE)/c\
$(MAKE) $(MFLAGS) -C ../leim leim-list.el EMACS=$(bootstrap_exe)
/^ cd ..\/admin\/unidata && \$(MAKE)/c\
$(MAKE) $(MFLAGS) -C ../admin/unidata all EMACS="../$(bootstrap_exe)"
/^ cd \$(lib) && \$(MAKE)/c\
$(MAKE) $(MFLAGS) -C $(lib) libgnu.a
/^RUN_TEMACS *=/s|`/bin/pwd`|.|
......@@ -199,6 +222,10 @@ s/echo.*buildobj.lst/dj&/
/^ @\{0,1\}cd ..\/lisp;.*[^\]$/s|$|\; cd ../src|
/^ *THEFILE=/s|$|\; cd ../src|
/^ echo.* buildobj.h/s|echo |djecho |
/^buildobj\.h:/,/^ mv /{
/^ *for /,/^ *done /c\
djecho "$(ALLOBJS)" | sed -e 's/^ */"/' -e 's/ *$$/"/' -e 's/ */", "/g' >>$@.tmp
}
# Make the GCC command line fit one screen line
/^[ ][ ]*\$(GNUSTEP_CFLAGS)/d
/^[ ][ ]*\$(GCONF_CFLAGS)/d
......
......@@ -132,6 +132,7 @@ s/^#undef HAVE_STRTOULL *$/#define HAVE_STRTOULL 1/
#else\
#undef HAVE_SNPRINTF\
#endif
s/^#undef PENDING_OUTPUT_N_BYTES *$/#define PENDING_OUTPUT_N_BYTES fp->_ptr - fp->_base/
# 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.
......
......@@ -42,9 +42,17 @@ s/-DVERSION[^ ]* //
/^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@//
/^WARN_CFLAGS *=/s/@WARN_CFLAGS@//
/^WERROR_CFLAGS *=/s/@WERROR_CFLAGS@//
/^UPDATE_MANIFEST *=/s/@UPDATE_MANIFEST@//
/^PROFILING_CFLAGS *=/s/@PROFILING_CFLAGS@//
/^ALLOCA *=/s!@ALLOCA@!!
/^EXEEXT *=/s!@EXEEXT@!!
/^EXEEXT *=/s!@EXEEXT@!.exe!
/^CLIENTW *=/s/@CLIENTW@//
/^LIB_FDATASYNC *=/s/@LIB_FDATASYNC@//
/^LIB_WSOCK32 *=/s/@LIB_WSOCK32@//
/^LIBS_ECLIENT *=/s/@LIBS_ECLIENT@//
/^NTLIB *=/s/@NTLIB@//
/^CLIENTRES *=/s/@CLIENTRES@//
/^WINDRES *=/s/@WINDRES@//
/^GETOPT_H *=/s!@GETOPT_H@!getopt.h!
/^GETOPTOBJS *=/s!@GETOPTOBJS@!getopt.o getopt1.o!
/^INSTALLABLES/s/emacsclient[^ ]* *//
......
......@@ -42,5 +42,5 @@ export MAKEINFO := $(MAKEINFO) $(MAKEINFO_OPTS)
s/^ for file in $(INFO_TARGETS)\; do rm -f.*$/ rm -f $(INFO_TARGETS)/
}
/^mkinfodir *=/s| @.*$|@command.com /c if not exist ..\\..\\info\\emacs mkdir ..\\..\\info|
/^mkinfodir *=/s| @.*$|@command.com /c if not exist ..\\..\\info\\emacs$(INFO_EXT) mkdir ..\\..\\info|
......@@ -19,56 +19,21 @@
SHELL=/xyzzy/command\
MAKESHELL=/xyzzy/command
/^version=/d
/^prefix=/d
/^datadir=/s|@datadir@|../..|
/^srcdir=/s|srcdir=@srcdir@|srcdir := $(subst \\,/,$(shell cd))|
/^INSTALLDIR=/c\
INSTALLDIR=.
# Need a relative directory name for the md command, otherwise it
# chokes, perhaps due to multiple dots in emacs-XX.YY.NN name.
/^leimdir *=/a\
rel_leimdir = ..\\lisp\\leim
/touch stamp-subdir/s|touch|djecho "stamp-subdir" >|
s|\([ ]\)echo|\1djecho|g
/^ @true *$/d
/RUN_EMACS *=/,/^$/c\
export EMACSLOADPATH=${buildlisppath}\
RUN_EMACS = ${EMACS} -batch --no-site-file
export EMACSLOADPATH=\
RUN_EMACS = ${EMACS} -batch --no-site-file --no-site-lisp
/^MKDIR_P *=/s,@MKDIR_P@,command.com /c md,
/^ cd ../c\
${MAKE} -C ../src ${MFLAGS} emacs
/if \[ -f $@ \]\; then true/d
/fi$/s/; fi$//
/^leim-list.el:/,/^$/ {
/^ if/d
/^ else/,/^ fi/d
s| *| |
/^ --eval/,/; \\$/s|\; \\||
}
/^setwins=/,/^$/d
/^\.PHONY: compile-targets/d
/^compile-targets:/d
/^compile-main:/,/^$/c\
compile-main: ${TIT_MISC}\
$(MAKE) $(MFLAGS) $(foreach f,$(wildcard ja-dic/*.el),$(basename $f).elc)\
$(MAKE) $(MFLAGS) $(foreach f,$(wildcard quail/*.el),$(basename $f).elc)\
/^install:/,/^$/c\
install: all\
/^bootstrap-clean:/,/^$/c\
bootstrap-clean: clean\
rm -f ja-dic/*.elc quail/*.elc\
/^ if test -f/d
/^distclean:/,/^$/ {
s|\(rm -f Makefile\)|\1 stamp-subdir|
}
/^MKDIR_P *=/s,@MKDIR_P@,-command.com /c md,
/MKDIR_P.* \${leimdir}\/.*$/s|\${leimdir}/|$(rel_leimdir)\\|
/MKDIR_P.* \$(leimdir)\/.*$/s|\$(leimdir)/|$(rel_leimdir)\\|
This diff is collapsed.
......@@ -19,8 +19,9 @@
/^SHELL *=/i\
export FNCASE=y
/^SHELL *=/s|@SHELL@|/bin/sh|
/^lisp *=/s|\$(srcdir)|$(CURDIR)|
/^srcdir *=/s|@srcdir@|.|
/^top_srcdir *=/s|@top_srcdir@|./..|
/^abs_top_builddir *=/s|@abs_top_builddir@|$(CURDIR)/..|
/^XARGS_LIMIT *=/s|@XARGS_LIMIT@||
2014-04-16 Eli Zaretskii <eliz@gnu.org>
* unexcoff.c [MSDOS]: Include libc/atexit.h.
(copy_text_and_data): Zero out the atexit chain pointer before
dumping Emacs.
* termhooks.h (encode_terminal_code): Update prototype.
* term.c (encode_terminal_code) [DOS_NT]: Make it externally
visible for all DOS_NT ports, not just WINDOWSNT.
(syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
* sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
unless it is defined.
(emacs_pipe) [MSDOS]: Redirect to 'pipe'.
* process.c (close_on_exec, accept4, process_socket): Move into
the "ifdef subprocesses" part.
(catch_child_signal): Condition by "ifdef subprocesses".
(syms_of_process) <Qinternal_default_process_sentinel>
<Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
* msdos.h: Add prototypes for new functions.
(EINPROGRESS): Define.
(O_CLOEXEC): Define to zero.
* msdos.c (check_window_system): Remove unnecessary an
incompatible duplicate function.
(sys_opendir, readlinkat, faccessat, fstatat, unsetenv): New
functions in support of new functionality.
* menu.c (single_menu_item): Add visual indication of submenu
also for menus on MSDOS frames.
(Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
* lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
when async subprocesses aren't supported.
* font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
* emacs.c (close_output_streams): Zero out errno before calling
close_stream.
* dired.c [MSDOS]: Include msdos.h.
* conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
(DATA_START) [MSDOS]: Define.
(SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K.
* callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
Ifdef away for MSDOS.
(record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
(call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
for MSDOS.
(call_process) [MSDOS]: Fix call sequence of dostounix_filename.
Use temporary file template that is compatible with mkostemp.
Move vfork-related portions under #ifndef MSDOS.
(syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
2014-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
* buffer.c (Foverlays_at): Add argument `sorted'.
......
......@@ -105,6 +105,8 @@ enum
static Lisp_Object call_process (ptrdiff_t, Lisp_Object *, int, ptrdiff_t);
#ifndef MSDOS
/* Block SIGCHLD. */
void
......@@ -124,6 +126,8 @@ unblock_child_signal (void)
pthread_sigmask (SIG_SETMASK, &empty_mask, 0);
}
#endif /* !MSDOS */
/* Return the current buffer's working directory, or the home
directory if it's unreachable, as a string suitable for a system call.
Signal an error if the result would not be an accessible directory. */
......@@ -162,6 +166,7 @@ encode_current_directory (void)
void
record_kill_process (struct Lisp_Process *p, Lisp_Object tempfile)
{
#ifndef MSDOS
block_child_signal ();
if (p->alive)
......@@ -172,6 +177,7 @@ record_kill_process (struct Lisp_Process *p, Lisp_Object tempfile)
}
unblock_child_signal ();
#endif /* !MSDOS */
}
/* Clean up files, file descriptors and processes created by Fcall_process. */
......@@ -211,6 +217,7 @@ call_process_cleanup (Lisp_Object buffer)
{
Fset_buffer (buffer);
#ifndef MSDOS
if (synch_process_pid)
{
kill (-synch_process_pid, SIGINT);
......@@ -222,6 +229,7 @@ call_process_cleanup (Lisp_Object buffer)
immediate_quit = 0;
message1 ("Waiting for process to die...done");
}
#endif /* !MSDOS */
}
#ifdef DOS_NT
......@@ -518,10 +526,10 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
char const *outf = tmpdir ? tmpdir : "";
tempfile = alloca (strlen (outf) + 20);
strcpy (tempfile, outf);
dostounix_filename (tempfile, 0);
dostounix_filename (tempfile);
if (*tempfile == '\0' || tempfile[strlen (tempfile) - 1] != '/')
strcat (tempfile, "/");
strcat (tempfile, "detmp.XXX");
strcat (tempfile, "emXXXXXX");
mktemp (tempfile);
if (!*tempfile)
report_file_error ("Opening process output file", Qnil);
......@@ -710,8 +718,6 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
unblock_child_signal ();
unblock_input ();
#endif /* not MSDOS */
if (pid < 0)
report_file_errno ("Doing vfork", Qnil, child_errno);
......@@ -726,6 +732,8 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
emacs_close (filefd);
clear_unwind_protect (count - 1);
#endif /* not MSDOS */
if (INTEGERP (buffer))
return unbind_to (count, Qnil);
......@@ -1672,10 +1680,8 @@ syms_of_callproc (void)
{
#ifndef DOS_NT
Vtemp_file_name_pattern = build_string ("emacsXXXXXX");
#elif defined (WINDOWSNT)
#else /* DOS_NT */
Vtemp_file_name_pattern = build_string ("emXXXXXX");
#else
Vtemp_file_name_pattern = build_string ("detmp.XXX");
#endif
staticpro (&Vtemp_file_name_pattern);
......
......@@ -121,6 +121,11 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
#else
# define lstat stat
#endif
/* We must intercept 'opendir' calls to stash away the directory name,
so we could reuse it in realinkat, see msdos.c. */
#define opendir sys_opendir
/* 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
......@@ -132,6 +137,9 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
#define emacs_raise(sig) msdos_fatal_signal (sig)
/* DATA_START is needed by vm-limit.c and unexcoff.c. */
#define DATA_START (&etext + 1)
/* Define one of these for easier conditionals. */
#ifdef HAVE_X_WINDOWS
/* We need a little extra space, see ../../lisp/loadup.el and the
......@@ -148,7 +156,7 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
directory tree). Given the unknown policy of different DPMI
hosts regarding loading of untouched pages, I'm not going to risk
enlarging Emacs footprint by another 100+ KBytes. */
#define SYSTEM_PURESIZE_EXTRA (-170000+65000)
#define SYSTEM_PURESIZE_EXTRA (-170000+90000)
#endif
#endif /* MSDOS */
......
......@@ -47,6 +47,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "regex.h"
#include "blockinput.h"
#ifdef MSDOS
#include "msdos.h" /* for fstatat */
#endif
static Lisp_Object Qdirectory_files;
static Lisp_Object Qdirectory_files_and_attributes;
static Lisp_Object Qfile_name_completion;
......
......@@ -686,6 +686,11 @@ void (*__malloc_initialize_hook) (void) EXTERNALLY_VISIBLE = malloc_initialize_h
static void
close_output_streams (void)
{
int err = errno;
/* close_stream checks errno, so make sure it doesn't inherit some
random value. */