if (saved_doc_string_size == 0)
{
saved_doc_string_size = nskip + 100;
- saved_doc_string = (char *) malloc (saved_doc_string_size);
+ saved_doc_string = (char *) xmalloc (saved_doc_string_size);
}
if (nskip > saved_doc_string_size)
{
saved_doc_string_size = nskip + 100;
- saved_doc_string = (char *) realloc (saved_doc_string,
- saved_doc_string_size);
+ saved_doc_string = (char *) xrealloc (saved_doc_string,
+ saved_doc_string_size);
}
saved_doc_string_position = ftell (instream);
XSYMBOL (sym)->value = val;
}
\f
+/* Record the value of load-path used at the start of dumping
+ so we can see if the site changed it later during dumping. */
+static Lisp_Object dump_path;
+
init_lread ()
{
char *normal;
from the default before dumping, don't override that value. */
if (initialized)
{
- Lisp_Object dump_path;
-
- dump_path = decode_env_path (0, PATH_DUMPLOADSEARCH);
-
Vsource_directory = Fexpand_file_name (build_string ("../"),
- Fcar (dump_path));
+ Fcar (Fcdr (dump_path)));
if (! NILP (Fequal (dump_path, Vload_path)))
{
}
}
else
- /* ../lisp refers to the build directory.
- NORMAL refers to the lisp dir in the source directory. */
- Vload_path = Fcons (build_string ("../lisp"),
- decode_env_path (0, normal));
+ {
+ /* ../lisp refers to the build directory.
+ NORMAL refers to the lisp dir in the source directory. */
+ Vload_path = Fcons (build_string ("../lisp"),
+ decode_env_path (0, normal));
+ dump_path = Vload_path;
+ }
#endif
#ifndef WINDOWSNT
Qload_file_name = intern ("load-file-name");
staticpro (&Qload_file_name);
+
+ staticpro (&dump_path);
}