Tells GC how to save a copy of the stack. */
char *stack_bottom;
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
extern Lisp_Object Vwindow_system;
-#endif /* HAVE_X_WINDOWS */
+#endif /* HAVE_WINDOW_SYSTEM */
extern Lisp_Object Vauto_save_list_file_name;
\f
#ifdef VMS
#ifdef LINK_CRTL_SHARE
-#ifdef SHAREABLE_LIB_BUG
+#ifdef SHARABLE_LIB_BUG
extern noshare char **environ;
-#endif /* SHAREABLE_LIB_BUG */
+#endif /* SHARABLE_LIB_BUG */
#endif /* LINK_CRTL_SHARE */
#endif /* VMS */
extern int errno;
extern sys_nerr;
+#ifdef LINUX_SBRK_BUG
+ __sbrk (1);
+#endif
+
sort_args (argc, argv);
if (argmatch (argv, argc, "-version", "--version", 3, NULL, &skip_args))
}
#ifdef LINK_CRTL_SHARE
-#ifdef SHAREABLE_LIB_BUG
+#ifdef SHARABLE_LIB_BUG
/* Bletcherous shared libraries! */
if (!stdin)
stdin = fdopen (0, "r");
stderr = fdopen (2, "w");
if (!environ)
environ = envp;
-#endif /* SHAREABLE_LIB_BUG */
+#endif /* SHARABLE_LIB_BUG */
#endif /* LINK_CRTL_SHARE */
#endif /* VMS */
exit (1);
}
fprintf (stderr, "Using %s\n", term);
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
inhibit_window_system = 1; /* -t => -nw */
#endif
}
/* Change --display to -d, when its arg is separate. */
else if (displayname != 0 && skip_args > count_before
&& argv[count_before + 1][1] == '-')
- argv[count_before] = "-d";
+ argv[count_before + 1] = "-d";
/* Don't actually discard this arg. */
skip_args = count_before;
init_dosfns ();
/* Set defaults for several environment variables. */
if (initialized) init_environment (argc, argv, skip_args);
+ else init_gettimeofday ();
+#endif
+
+#ifdef WINDOWSNT
+ /* Initialize environment from registry settings. */
+ init_environment ();
#endif
/* egetenv is a pretty low-level facility, which may get called in
#ifdef HAVE_X11
syms_of_xselect ();
#endif
-#ifdef HAVE_X_MENU
- syms_of_xmenu ();
-#endif /* HAVE_X_MENU */
#endif /* HAVE_X_WINDOWS */
#if defined (MSDOS) && !defined (HAVE_X_WINDOWS)
syms_of_xfaces ();
- syms_of_xmenu ();
#endif
+#ifdef HAVE_MENUS
+ syms_of_xmenu ();
+#endif /* HAVE_MENUS */
+
+#ifdef HAVE_NTGUI
+ syms_of_win32term ();
+ syms_of_win32fns ();
+ syms_of_win32faces ();
+ syms_of_win32select ();
+ syms_of_win32menu ();
+#endif /* HAVE_NTGUI */
+
#ifdef SYMS_SYSTEM
SYMS_SYSTEM;
#endif
initialized = 1;
-#if defined (sun) || defined (LOCALTIME_CACHE)
- /* sun's localtime has a bug. it caches the value of the time
+#ifdef LOCALTIME_CACHE
+ /* Some versions of localtime have a bug. They cache the value of the time
zone rather than looking it up every time. Since localtime() is
called to bolt the undumping time into the undumped emacs, this
results in localtime ignoring the TZ environment variable.
This flushes the new TZ value into localtime. */
tzset ();
-#endif /* defined (sun) || defined (LOCALTIME_CACHE) */
+#endif /* defined (LOCALTIME_CACHE) */
/* Enter editor command loop. This never returns. */
Frecursive_edit ();
while (to < argc)
{
int best = -1;
- int best_priority = -2;
+ int best_priority = -9999;
/* Find the highest priority remaining option.
If several have equal priority, take the first of them. */
{
p = index (path, SEPCHAR);
if (!p) p = path + strlen (path);
- lpath = Fcons (p - path ? make_string (path, p - path) : Qnil,
+ lpath = Fcons (p - path ? make_string (path, p - path)
+ : build_string ("."),
lpath);
if (*p)
path = p + 1;