Mercurial > emacs
annotate src/ecrt0.c @ 108301:68fc9037b502
Fix MSDOS build broken by autoconfiscation and changes in symbol handling.
src/msdos.c (dos_set_window_size):
src/w16select.c (Fx_selection_exists_p): Use `Fsymbol_value (foo)'
instead of `XSYMBOL (foo)->value'.
config.bat: Allow for 2 leading `#'s in comments in
src/Makefile.in.
src/Makefile.in: Don't use Make-style comments past the "start of
cpp stuff" line.
(MSDOS_OBJ): Remove xmenu.o (it is now defined by XMENU_OBJ).
src/s/msdos.h (UNEXEC): Don't define (@unexec@ in Makefile.in is
edited directly by msdos/sed1v2.inp).
msdos/sed3v2.inp (C_SWITCH_MACHINE): Edit to empty.
msdos/sed1v2.inp (@LIB_MATH@): Edit to -lm.
(C_SWITCH_MACHINE, C_SWITCH_SYSTEM, LD_SWITCH_SYSTEM_TEMACS)
(LD_SWITCH_X_SITE_AUX, LD_SWITCH_X_SITE_AUX_RPATH)
(LD_SWITCH_SYSTEM, LD_SWITCH_SYSTEM_EXTRA, LIBTIFF, LIBJPEG)
(LIBPNG, LIBGIF, LIBXPM, XFT_LIBS, DBUS_CFLAGS, DBUS_LIBS)
(DBUS_OBJ, GCONF_CFLAGS, GCONF_LIBS, GTK_OBJ, LIBXMU, LIBXSM)
(LIBXTR6, XOBJ, TOOLKIT_LIBW, WIDGET_OBJ, CYGWIN_OBJ, NS_OBJ)
(NS_SUPPORT, LIBSELINUX_LIBS, START_FILES): Edit to empty.
(XMENU_OBJ): Edit to xmenu.o.
(FONT_OBJ): Edit to value used for X on Unix.
(PRE_ALLOC_OBJ): Edit to lastfile.o.
(POST_ALLOC_OBJ): Edit to $(vmlimitobj).
(@unexec@): Edit to unexec.o.
lisp/cus-start.el (all): Add native condition for tool-bar-* symbols.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 07 May 2010 17:07:51 +0300 |
parents | 992e676c0285 |
children | aec1143e8d85 |
rev | line source |
---|---|
25844 | 1 /* C code startup routine. |
75227
e90d04cd455a
Update copyright for years from Emacs 21 to present (mainly adding
Glenn Morris <rgm@gnu.org>
parents:
68651
diff
changeset
|
2 Copyright (C) 1985, 1986, 1992, 2001, 2002, 2003, 2004, |
106815 | 3 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
25844 | 4 |
5 This file is part of GNU Emacs. | |
6 | |
94963
8971ddf55736
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91702
diff
changeset
|
7 GNU Emacs is free software: you can redistribute it and/or modify |
25844 | 8 it under the terms of the GNU General Public License as published by |
94963
8971ddf55736
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91702
diff
changeset
|
9 the Free Software Foundation, either version 3 of the License, or |
8971ddf55736
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91702
diff
changeset
|
10 (at your option) any later version. |
25844 | 11 |
12 GNU Emacs is distributed in the hope that it will be useful, | |
13 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 GNU General Public License for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
94963
8971ddf55736
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91702
diff
changeset
|
18 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
25844 | 19 |
20 | |
21 /* The standard Vax 4.2 Unix crt0.c cannot be used for Emacs | |
22 because it makes `environ' an initialized variable. | |
23 It is easiest to have a special crt0.c on all machines | |
24 though I don't know whether other machines actually need it. */ | |
25 | |
26 /* On the vax and 68000, in BSD4.2 and USG5.2, | |
27 this is the data format on startup: | |
28 (vax) ap and fp are unpredictable as far as I know; don't use them. | |
29 sp -> word containing argc | |
30 word pointing to first arg string | |
31 [word pointing to next arg string]... 0 or more times | |
32 0 | |
33 Optionally: | |
34 [word pointing to environment variable]... 1 or more times | |
35 ... | |
36 0 | |
37 And always: | |
38 first arg string | |
39 [next arg string]... 0 or more times | |
40 */ | |
41 | |
42 #ifdef emacs | |
43 #include <config.h> | |
44 #endif | |
45 | |
46 /* ******** WARNING ******** | |
47 Do not insert any data definitions before data_start! | |
48 Since this is the first file linked, the address of the following | |
49 variable should correspond to the start of initialized data space. | |
50 On some systems this is a constant that is independent of the text | |
51 size for shared executables. On others, it is a function of the | |
52 text size. In short, this seems to be the most portable way to | |
53 discover the start of initialized data space dynamically at runtime, | |
54 for either shared or unshared executables, on either swapping or | |
55 virtual systems. It only requires that the linker allocate objects | |
56 in the order encountered, a reasonable model for most Unix systems. | |
57 Similarly, note that the address of _start() should be the start | |
58 of text space. Fred Fish, UniSoft Systems Inc. */ | |
59 | |
60 int data_start = 0; | |
61 | |
62 char **environ; | |
63 | |
64 static start1 (); | |
65 | |
66 /* Define symbol "start": here; some systems want that symbol. */ | |
67 asm(" .text "); | |
68 asm(" .globl start "); | |
69 asm(" start: "); | |
70 | |
71 _start () | |
72 { | |
73 /* On vax, nothing is pushed here */ | |
74 start1 (); | |
75 } | |
76 | |
77 static | |
108091
992e676c0285
Simplify m/intel386.h.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
107765
diff
changeset
|
78 start1 (bogus_fp, argc, xargv) |
25844 | 79 int argc; |
80 char *xargv; | |
81 { | |
82 register char **argv = &xargv; | |
83 environ = argv + argc + 1; | |
84 | |
85 if ((char *)environ == xargv) | |
86 environ--; | |
87 exit (main (argc, argv, environ)); | |
88 | |
89 /* Refer to `start1' so GCC will not think it is never called | |
90 and optimize it out. */ | |
91 (void) &start1; | |
92 } | |
52401 | 93 |
94 /* arch-tag: 4025c2fb-d6b1-4d29-b1b6-8100b6bd1e74 | |
95 (do not change this comment) */ |