diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-08-11 07:42:48 +0200 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-08-11 07:42:48 +0200 |
commit | c566235d981eba73c88bbff00b6a1d88360b6e9f (patch) | |
tree | f8d653add3570fe750a83d1123ed35022e0bf4ef /src/emacs.c | |
parent | 0bfdb86f425a88fe43ebc88851c6f9a6418e1862 (diff) | |
parent | 490b89acab3e759426ede25c31c94268df55e925 (diff) | |
download | emacs-c566235d981eba73c88bbff00b6a1d88360b6e9f.tar.gz emacs-c566235d981eba73c88bbff00b6a1d88360b6e9f.tar.bz2 emacs-c566235d981eba73c88bbff00b6a1d88360b6e9f.zip |
Merge from trunk
Diffstat (limited to 'src/emacs.c')
-rw-r--r-- | src/emacs.c | 51 |
1 files changed, 17 insertions, 34 deletions
diff --git a/src/emacs.c b/src/emacs.c index fbae7763877..4dc670e6032 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -63,6 +63,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include "keyboard.h" #include "keymap.h" +#ifdef HAVE_NS +#include "nsterm.h" +#endif + #ifdef HAVE_SETLOCALE #include <locale.h> #endif @@ -87,8 +91,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #endif #endif -const char emacs_copyright[] = "Copyright (C) 2010 Free Software Foundation, Inc."; -const char emacs_version[] = "24.0.50"; +static const char emacs_copyright[] = "Copyright (C) 2010 Free Software Foundation, Inc."; +static const char emacs_version[] = "24.0.50"; /* Make these values available in GDB, which doesn't see macros. */ @@ -213,15 +217,6 @@ static unsigned long heap_bss_diff; output a warning in dump-emacs. */ #define MAX_HEAP_BSS_DIFF (1024*1024) - -#ifdef HAVE_WINDOW_SYSTEM -extern Lisp_Object Vinitial_window_system; -#endif /* HAVE_WINDOW_SYSTEM */ - -extern Lisp_Object Vauto_save_list_file_name; - -extern Lisp_Object Vinhibit_redisplay; - /* Nonzero means running Emacs without interactive terminal. */ int noninteractive; @@ -634,7 +629,7 @@ void __main (void) enough information to do it right. */ static int -argmatch (char **argv, int argc, char *sstr, char *lstr, int minlen, char **valptr, int *skipptr) +argmatch (char **argv, int argc, const char *sstr, const char *lstr, int minlen, char **valptr, int *skipptr) { char *p = NULL; int arglen; @@ -757,7 +752,6 @@ main (int argc, char **argv) char *ch_to_dir; #if GC_MARK_STACK - extern Lisp_Object *stack_base; stack_base = &dummy; #endif @@ -861,23 +855,6 @@ main (int argc, char **argv) } #endif /* HAVE_PERSONALITY_LINUX32 */ - -/* Map in shared memory, if we are using that. */ -#ifdef HAVE_SHM - if (argmatch (argv, argc, "-nl", "--no-shared-memory", 6, NULL, &skip_args)) - { - map_in_data (0); - /* The shared memory was just restored, which clobbered this. */ - skip_args = 1; - } - else - { - map_in_data (1); - /* The shared memory was just restored, which clobbered this. */ - skip_args = 0; - } -#endif - #if defined (HAVE_SETRLIMIT) && defined (RLIMIT_STACK) /* Extend the stack space available. Don't do that if dumping, since some systems (e.g. DJGPP) @@ -1276,9 +1253,7 @@ main (int argc, char **argv) #ifdef AIX /* 20 is SIGCHLD, 21 is SIGTTIN, 22 is SIGTTOU. */ signal (SIGXCPU, fatal_error_signal); -#ifndef _I386 signal (SIGIOINT, fatal_error_signal); -#endif signal (SIGGRANT, fatal_error_signal); signal (SIGRETRACT, fatal_error_signal); signal (SIGSOUND, fatal_error_signal); @@ -1747,9 +1722,18 @@ main (int argc, char **argv) #else extern char etext; #endif +#ifdef HAVE___EXECUTABLE_START + /* This symbol is defined by GNU ld to the start of the text + segment. */ + extern char __executable_start[]; +#else extern void safe_bcopy (); +#endif atexit (_mcleanup); +#ifdef HAVE___EXECUTABLE_START + monstartup (__executable_start, &etext); +#else /* This uses safe_bcopy because that function comes first in the Emacs executable. It might be better to use something that gives the start of the text segment, but start_of_text is not @@ -1757,6 +1741,7 @@ main (int argc, char **argv) /* FIXME: Does not work on architectures with function descriptors. */ monstartup (safe_bcopy, &etext); +#endif } else moncontrol (0); @@ -2084,8 +2069,6 @@ all of which are called before Emacs is actually killed. */) unlink (SDATA (Vauto_save_list_file_name)); exit (INTEGERP (arg) ? XINT (arg) : EXIT_SUCCESS); - /* NOTREACHED */ - return Qnil; } |