From: Eli Zaretskii Date: Sun, 10 Apr 2022 12:44:11 +0000 (+0300) Subject: Clean up the MSDOS port X-Git-Tag: emacs-28.1.90~146 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e8d2f40f41b09ec5e4b4eebe6441927e8d1dc434;p=emacs.git Clean up the MSDOS port * src/msdos.h (tcdrain): Redirect to '_dos_commit'. (openat, fchmodat, futimens, utimensat): Add prototypes. * msdos/sed1v2.inp (MAKE_PDUMPER_FINGERPRINT): Fix indentation, so that Make won't consider this line a command. ($(etc)/DOC): Chdir back to ../src, since "make-docfile -d" leaves us in a wrong directory. * msdos/sedlibmk.inp (GL_GNULIB_GETRANDOM, GL_GNULIB_MEMMEM) (GL_GNULIB_SIGDESCR_NP): Define to 1, to get the prototypes from Gnulib headers. --- diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index e041e4e5b8d..a79bf2eb71c 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -179,6 +179,8 @@ s/ *@LIBXPM@// /^PAXCTL_dumped *=/s/=.*$/=/ /^PAXCTL_notdumped *=/s/=.*$/=/ /^DUMPING *=/s/@DUMPING@/unexec/ +/^[ \t]*MAKE_PDUMPER_FINGERPRINT = *$/c\ +MAKE_PDUMPER_FINGERPRINT = /^lisp\.mk:/,/^$/c\ lisp.mk: $(lispsource)/loadup.el\ @rm -f $@\ @@ -190,6 +192,10 @@ lisp.mk: $(lispsource)/loadup.el\ /^ [ ]*\$(AM_V_at)\$(libsrc)\/make-docfile -d/s!make-docfile!make-docfile -o $(etc)/DOC! / > \$(etc)\/DOC *$/s/ >.*$// +/^\$(etc)\/DOC/,/^$/{ + /^$/i\ + cd ../src +} /^ [ ]*\$(AM_V_GLOBALS)\$(libsrc)\/make-docfile.*>.*globals.tmp/s!make-docfile!make-docfile -o globals.tmp! /^ [ ]*\$(AM_V_GLOBALS)\$(libsrc)\/make-doc/s!>.*$!! /^\$(libsrc)\/make-docfile\$(EXEEXT): /i\ @@ -255,4 +261,4 @@ s| -I\$(top_srcdir)/lib|| s| -I\. -I\$(srcdir)| -I.| /^ *test "X/d /\$(CC) -o \$@.tmp/s/\$@.tmp/\$@/ -/mv \$@.tmp \$@/d \ No newline at end of file +/mv \$@.tmp \$@/d diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp index 59ebec9e756..e87cef5fff2 100644 --- a/msdos/sedlibmk.inp +++ b/msdos/sedlibmk.inp @@ -180,11 +180,14 @@ s/@PACKAGE@/emacs/ /^GL_GNULIB_ENVIRON *=/s/@GL_GNULIB_ENVIRON@/1/ /^GL_GNULIB_FDATASYNC *=/s/@GL_GNULIB_FDATASYNC@/1/ /^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_MEMMEM *=/s/@GL_GNULIB_MEMMEM@/1/ /^GL_GNULIB_MEMRCHR *=/s/@GL_GNULIB_MEMRCHR@/1/ /^GL_GNULIB_MEMPCPY *=/s/@GL_GNULIB_MEMPCPY@/1/ /^GL_GNULIB_MKOSTEMP *=/s/@GL_GNULIB_MKOSTEMP@/1/ /^GL_GNULIB_MKTIME *=/s/@GL_GNULIB_MKTIME@/1/ +/^GL_GNULIB_SIGDESCR_NP *=/s/@GL_GNULIB_SIGDESCR_NP@/1/ /^GL_GNULIB_TIME_R *=/s/@GL_GNULIB_TIME_R@/1/ /^GL_GNULIB_TIMEGM *=/s/@GL_GNULIB_TIMEGM@/1/ /^GL_GNULIB_TIME_RZ *=/s/@GL_GNULIB_TIME_RZ@/1/ diff --git a/src/msdos.h b/src/msdos.h index 7e57c7c1102..24697bcf24b 100644 --- a/src/msdos.h +++ b/src/msdos.h @@ -22,6 +22,10 @@ along with GNU Emacs. If not, see . */ #include #include "termhooks.h" /* struct terminal */ +struct terminal; + +extern unsigned int _dos_commit(int); +#define tcdrain(f) _dos_commit(f) int dos_ttraw (struct tty_display_info *); int dos_ttcooked (void); @@ -57,6 +61,11 @@ ssize_t readlinkat (int, const char *, char *, size_t); int fstatat (int, char const *, struct stat *, int); int unsetenv (const char *); int faccessat (int, const char *, int, int); +int openat (int, const char *, int, int); +int fchmodat (int, const char *, mode_t, int); +int futimens (int, const struct timespec[2]); +int utimensat (int, const char *, const struct timespec[2], int); + void msdos_fatal_signal (int); void syms_of_msdos (void); int pthread_sigmask (int, const sigset_t *, sigset_t *);