diff options
| author | Stefan Kangas | 2024-12-28 21:35:07 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2024-12-28 21:35:07 +0100 |
| commit | c70d595708cd0dc19e85e58148a75df21d80f9b2 (patch) | |
| tree | 9ea02c4ecc00d789e66c294730986552ea7ac0f7 | |
| parent | 305bd550cf28045505e76c2b23f51860da914310 (diff) | |
| download | emacs-c70d595708cd0dc19e85e58148a75df21d80f9b2.tar.gz emacs-c70d595708cd0dc19e85e58148a75df21d80f9b2.zip | |
Delete firstfile.c and lastfile.c
With the removal of unexec and purespace, the definitions in these files
are no longer used. Remove them.
* src/firstfile.c:
* src/lastfile.c: Delete unused files.
* configure.ac (PRE_ALLOC_OBJ, POST_ALLOC_OBJ, FIRSTFILE_OBJ):
Remove variables and dependent code.
* msdos/autogen/Makefile.in:
* msdos/sed1v2.inp:
* src/Makefile.in: Don't use above deleted variables.
* src/deps.mk: Remove lastfile.c dependencies.
| -rw-r--r-- | configure.ac | 11 | ||||
| -rw-r--r-- | msdos/autogen/Makefile.in | 3 | ||||
| -rw-r--r-- | msdos/sed1v2.inp | 3 | ||||
| -rw-r--r-- | src/Makefile.in | 14 | ||||
| -rw-r--r-- | src/deps.mk | 1 | ||||
| -rw-r--r-- | src/firstfile.c | 32 | ||||
| -rw-r--r-- | src/lastfile.c | 44 |
7 files changed, 2 insertions, 106 deletions
diff --git a/configure.ac b/configure.ac index 86e2e0a9f78..422ca92dca9 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -2998,7 +2998,6 @@ if test "${opsys}" = "mingw32"; then | |||
| 2998 | HAVE_W32=${emacs_cv_w32api} | 2998 | HAVE_W32=${emacs_cv_w32api} |
| 2999 | fi | 2999 | fi |
| 3000 | 3000 | ||
| 3001 | FIRSTFILE_OBJ= | ||
| 3002 | NTDIR= | 3001 | NTDIR= |
| 3003 | LIBS_ECLIENT= | 3002 | LIBS_ECLIENT= |
| 3004 | LIB_WSOCK32= | 3003 | LIB_WSOCK32= |
| @@ -3046,7 +3045,6 @@ if test "${HAVE_W32}" = "yes"; then | |||
| 3046 | W32_RES_LINK="\$(EMACSRES)" | 3045 | W32_RES_LINK="\$(EMACSRES)" |
| 3047 | CLIENTRES="emacsclient.res" | 3046 | CLIENTRES="emacsclient.res" |
| 3048 | CLIENTW="emacsclientw\$(EXEEXT)" | 3047 | CLIENTW="emacsclientw\$(EXEEXT)" |
| 3049 | FIRSTFILE_OBJ=firstfile.o | ||
| 3050 | NTDIR=nt | 3048 | NTDIR=nt |
| 3051 | CM_OBJ= | 3049 | CM_OBJ= |
| 3052 | LIBS_ECLIENT="-lcomctl32" | 3050 | LIBS_ECLIENT="-lcomctl32" |
| @@ -3068,7 +3066,6 @@ AC_SUBST([EMACS_MANIFEST]) | |||
| 3068 | AC_SUBST([CLIENTRES]) | 3066 | AC_SUBST([CLIENTRES]) |
| 3069 | AC_SUBST([CLIENTW]) | 3067 | AC_SUBST([CLIENTW]) |
| 3070 | AC_SUBST([W32_RES_LINK]) | 3068 | AC_SUBST([W32_RES_LINK]) |
| 3071 | AC_SUBST([FIRSTFILE_OBJ]) | ||
| 3072 | AC_SUBST([NTDIR]) | 3069 | AC_SUBST([NTDIR]) |
| 3073 | AC_SUBST([CM_OBJ]) | 3070 | AC_SUBST([CM_OBJ]) |
| 3074 | AC_SUBST([LIBS_ECLIENT]) | 3071 | AC_SUBST([LIBS_ECLIENT]) |
| @@ -7206,20 +7203,12 @@ AC_SUBST([RALLOC_OBJ]) | |||
| 7206 | 7203 | ||
| 7207 | if test "$opsys" = "cygwin"; then | 7204 | if test "$opsys" = "cygwin"; then |
| 7208 | CYGWIN_OBJ="cygw32.o" | 7205 | CYGWIN_OBJ="cygw32.o" |
| 7209 | PRE_ALLOC_OBJ= | ||
| 7210 | POST_ALLOC_OBJ=lastfile.o | ||
| 7211 | elif test "$opsys" = "mingw32"; then | 7206 | elif test "$opsys" = "mingw32"; then |
| 7212 | CYGWIN_OBJ= | 7207 | CYGWIN_OBJ= |
| 7213 | PRE_ALLOC_OBJ= | ||
| 7214 | POST_ALLOC_OBJ=lastfile.o | ||
| 7215 | else | 7208 | else |
| 7216 | CYGWIN_OBJ= | 7209 | CYGWIN_OBJ= |
| 7217 | PRE_ALLOC_OBJ=lastfile.o | ||
| 7218 | POST_ALLOC_OBJ= | ||
| 7219 | fi | 7210 | fi |
| 7220 | AC_SUBST([CYGWIN_OBJ]) | 7211 | AC_SUBST([CYGWIN_OBJ]) |
| 7221 | AC_SUBST([PRE_ALLOC_OBJ]) | ||
| 7222 | AC_SUBST([POST_ALLOC_OBJ]) | ||
| 7223 | 7212 | ||
| 7224 | dnl Call this 'FORTIFY_SOUR' so that it sorts before the 'FORTIFY_SOURCE' | 7213 | dnl Call this 'FORTIFY_SOUR' so that it sorts before the 'FORTIFY_SOURCE' |
| 7225 | dnl verbatim defined above. The tricky name is apropos, as this hack | 7214 | dnl verbatim defined above. The tricky name is apropos, as this hack |
diff --git a/msdos/autogen/Makefile.in b/msdos/autogen/Makefile.in index 4225cc72bcc..f67dfc1ba03 100644 --- a/msdos/autogen/Makefile.in +++ b/msdos/autogen/Makefile.in | |||
| @@ -456,7 +456,6 @@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ | |||
| 456 | ERRNO_H = @ERRNO_H@ | 456 | ERRNO_H = @ERRNO_H@ |
| 457 | EXECINFO_H = @EXECINFO_H@ | 457 | EXECINFO_H = @EXECINFO_H@ |
| 458 | EXEEXT = @EXEEXT@ | 458 | EXEEXT = @EXEEXT@ |
| 459 | FIRSTFILE_OBJ = @FIRSTFILE_OBJ@ | ||
| 460 | FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ | 459 | FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ |
| 461 | FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ | 460 | FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ |
| 462 | FONT_OBJ = @FONT_OBJ@ | 461 | FONT_OBJ = @FONT_OBJ@ |
| @@ -990,10 +989,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ | |||
| 990 | PATH_SEPARATOR = @PATH_SEPARATOR@ | 989 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
| 991 | PAXCTL = @PAXCTL@ | 990 | PAXCTL = @PAXCTL@ |
| 992 | PKG_CONFIG = @PKG_CONFIG@ | 991 | PKG_CONFIG = @PKG_CONFIG@ |
| 993 | POST_ALLOC_OBJ = @POST_ALLOC_OBJ@ | ||
| 994 | PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ | 992 | PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ |
| 995 | PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ | 993 | PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ |
| 996 | PRE_ALLOC_OBJ = @PRE_ALLOC_OBJ@ | ||
| 997 | PRIPTR_PREFIX = @PRIPTR_PREFIX@ | 994 | PRIPTR_PREFIX = @PRIPTR_PREFIX@ |
| 998 | PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ | 995 | PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ |
| 999 | PROFILING_CFLAGS = @PROFILING_CFLAGS@ | 996 | PROFILING_CFLAGS = @PROFILING_CFLAGS@ |
diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index a84cee32927..e344058ea08 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp | |||
| @@ -165,10 +165,7 @@ s/ *@WEBP_LIBS@// | |||
| 165 | /^XINERAMA_CFLAGS *=/s/@XINERAMA_CFLAGS@// | 165 | /^XINERAMA_CFLAGS *=/s/@XINERAMA_CFLAGS@// |
| 166 | /^GMALLOC_OBJ *=/s/@GMALLOC_OBJ@/gmalloc.o/ | 166 | /^GMALLOC_OBJ *=/s/@GMALLOC_OBJ@/gmalloc.o/ |
| 167 | /^VMLIMIT_OBJ *=/s/@VMLIMIT_OBJ@/vm-limit.o/ | 167 | /^VMLIMIT_OBJ *=/s/@VMLIMIT_OBJ@/vm-limit.o/ |
| 168 | /^FIRSTFILE_OBJ *=/s/@FIRSTFILE_OBJ@// | ||
| 169 | /^RALLOC_OBJ *=/s/@RALLOC_OBJ@/ralloc.o/ | 168 | /^RALLOC_OBJ *=/s/@RALLOC_OBJ@/ralloc.o/ |
| 170 | /^PRE_ALLOC_OBJ *=/s/@PRE_ALLOC_OBJ@/lastfile.o/ | ||
| 171 | /^POST_ALLOC_OBJ *=/s/@POST_ALLOC_OBJ@/$(vmlimitobj)/ | ||
| 172 | /^UNEXEC_OBJ *=/s/@UNEXEC_OBJ@/unexcoff.o/ | 169 | /^UNEXEC_OBJ *=/s/@UNEXEC_OBJ@/unexcoff.o/ |
| 173 | /^BUILD_DETAILS *=/s/@BUILD_DETAILS@// | 170 | /^BUILD_DETAILS *=/s/@BUILD_DETAILS@// |
| 174 | /^CANNOT_DUMP *=/s/@CANNOT_DUMP@/no/ | 171 | /^CANNOT_DUMP *=/s/@CANNOT_DUMP@/no/ |
diff --git a/src/Makefile.in b/src/Makefile.in index 51352dd6d74..ce7d7bb36f3 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -446,8 +446,6 @@ ALL_CXX_CFLAGS = $(EMACS_CFLAGS) \ | |||
| 446 | .cc.o: | 446 | .cc.o: |
| 447 | $(AM_V_CXX)$(CXX) -c $(CPPFLAGS) $(ALL_CXX_CFLAGS) $(PROFILING_CFLAGS) $< | 447 | $(AM_V_CXX)$(CXX) -c $(CPPFLAGS) $(ALL_CXX_CFLAGS) $(PROFILING_CFLAGS) $< |
| 448 | 448 | ||
| 449 | ## lastfile must follow all files whose initialized data areas should | ||
| 450 | ## be dumped as pure by dump-emacs. | ||
| 451 | base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ | 449 | base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ |
| 452 | charset.o coding.o category.o ccl.o character.o chartab.o bidi.o \ | 450 | charset.o coding.o category.o ccl.o character.o chartab.o bidi.o \ |
| 453 | $(CM_OBJ) term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \ | 451 | $(CM_OBJ) term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \ |
| @@ -496,19 +494,11 @@ VMLIMIT_OBJ=@VMLIMIT_OBJ@ | |||
| 496 | ## ralloc.o if !SYSTEM_MALLOC && REL_ALLOC, else empty. | 494 | ## ralloc.o if !SYSTEM_MALLOC && REL_ALLOC, else empty. |
| 497 | RALLOC_OBJ=@RALLOC_OBJ@ | 495 | RALLOC_OBJ=@RALLOC_OBJ@ |
| 498 | 496 | ||
| 499 | ## Empty on Cygwin and MinGW, lastfile.o elsewhere. | ||
| 500 | PRE_ALLOC_OBJ=@PRE_ALLOC_OBJ@ | ||
| 501 | ## lastfile.o on Cygwin and MinGW, empty elsewhere. | ||
| 502 | POST_ALLOC_OBJ=@POST_ALLOC_OBJ@ | ||
| 503 | |||
| 504 | ## List of object files that make-docfile should not be told about. | 497 | ## List of object files that make-docfile should not be told about. |
| 505 | otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \ | 498 | otherobj= $(TERMCAP_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS) |
| 506 | $(POST_ALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS) | ||
| 507 | 499 | ||
| 508 | ## All object files linked into temacs. $(VMLIMIT_OBJ) should be first. | 500 | ## All object files linked into temacs. $(VMLIMIT_OBJ) should be first. |
| 509 | ## (On MinGW, firstfile.o should be before vm-limit.o.) | 501 | ALLOBJS = $(VMLIMIT_OBJ) $(obj) $(otherobj) |
| 510 | FIRSTFILE_OBJ=@FIRSTFILE_OBJ@ | ||
| 511 | ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj) | ||
| 512 | 502 | ||
| 513 | # Must be first, before dep inclusion! | 503 | # Must be first, before dep inclusion! |
| 514 | ifneq ($(HAVE_BE_APP),yes) | 504 | ifneq ($(HAVE_BE_APP),yes) |
diff --git a/src/deps.mk b/src/deps.mk index 0ba43a014f8..80937e26b10 100644 --- a/src/deps.mk +++ b/src/deps.mk | |||
| @@ -137,7 +137,6 @@ keyboard.o: keyboard.c termchar.h termhooks.h termopts.h buffer.h character.h \ | |||
| 137 | keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \ | 137 | keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \ |
| 138 | atimer.h systime.h character.h charset.h $(INTERVALS_H) \ | 138 | atimer.h systime.h character.h charset.h $(INTERVALS_H) \ |
| 139 | keymap.h window.h coding.h frame.h lisp.h globals.h $(config_h) | 139 | keymap.h window.h coding.h frame.h lisp.h globals.h $(config_h) |
| 140 | lastfile.o: lastfile.c $(config_h) | ||
| 141 | macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h msdos.h \ | 140 | macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h msdos.h \ |
| 142 | dispextern.h lisp.h globals.h $(config_h) systime.h coding.h composite.h | 141 | dispextern.h lisp.h globals.h $(config_h) systime.h coding.h composite.h |
| 143 | gmalloc.o: gmalloc.c $(config_h) | 142 | gmalloc.o: gmalloc.c $(config_h) |
diff --git a/src/firstfile.c b/src/firstfile.c deleted file mode 100644 index 737757a2779..00000000000 --- a/src/firstfile.c +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | /* Mark beginning of data space to dump as pure, for GNU Emacs. | ||
| 2 | Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | This file is part of GNU Emacs. | ||
| 5 | |||
| 6 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation, either version 3 of the License, or (at | ||
| 9 | your option) any later version. | ||
| 10 | |||
| 11 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | |||
| 20 | #include <config.h> | ||
| 21 | |||
| 22 | #ifdef WINDOWSNT | ||
| 23 | /* See comments in lastfile.c. */ | ||
| 24 | char my_begdata[] = "Beginning of Emacs initialized data"; | ||
| 25 | char my_begbss[1]; /* Do not initialize this variable. */ | ||
| 26 | static char _my_begbss[1]; | ||
| 27 | char * my_begbss_static = _my_begbss; | ||
| 28 | |||
| 29 | /* Add a dummy reference to ensure emacs.o is linked in. */ | ||
| 30 | extern int main (int, char **); | ||
| 31 | int (*dummy_main_reference) (int, char **) = main; | ||
| 32 | #endif | ||
diff --git a/src/lastfile.c b/src/lastfile.c deleted file mode 100644 index 9f2b2a04958..00000000000 --- a/src/lastfile.c +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | /* Mark end of data space to dump as pure, for GNU Emacs. | ||
| 2 | Copyright (C) 1985, 2001-2024 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | This file is part of GNU Emacs. | ||
| 5 | |||
| 6 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation, either version 3 of the License, or (at | ||
| 9 | your option) any later version. | ||
| 10 | |||
| 11 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | |||
| 20 | /* How this works: | ||
| 21 | |||
| 22 | Fdump_emacs dumps everything up to my_edata as text space (pure). | ||
| 23 | |||
| 24 | The files of Emacs are written so as to have no initialized | ||
| 25 | data that can ever need to be altered except at the first startup. | ||
| 26 | This is so that those words can be dumped as shareable text. | ||
| 27 | |||
| 28 | It is not possible to exercise such control over library files. | ||
| 29 | So it is necessary to refrain from making their data areas shared. | ||
| 30 | Therefore, this file is loaded following all the files of Emacs | ||
| 31 | but before library files. | ||
| 32 | As a result, the symbol my_edata indicates the point | ||
| 33 | in data space between data coming from Emacs and data | ||
| 34 | coming from libraries. | ||
| 35 | */ | ||
| 36 | |||
| 37 | #include <config.h> | ||
| 38 | |||
| 39 | #include "lisp.h" | ||
| 40 | |||
| 41 | #if (!defined SYSTEM_MALLOC \ | ||
| 42 | || defined WINDOWSNT || defined CYGWIN || defined DARWIN_OS) | ||
| 43 | char my_edata[] = "End of Emacs initialized data"; | ||
| 44 | #endif | ||