Mercurial > emacs
diff src/emacs.c @ 90054:f2ebccfa87d4
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-74
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-709
Update from CVS: src/indent.c (Fvertical_motion): Fix last change.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-710
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-715
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-74
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 08 Dec 2004 05:02:30 +0000 |
parents | cb7f41387eb3 9f7c2511d457 |
children | fb79180b618d |
line wrap: on
line diff
--- a/src/emacs.c Mon Dec 06 12:38:25 2004 +0000 +++ b/src/emacs.c Wed Dec 08 05:02:30 2004 +0000 @@ -580,8 +580,12 @@ for (i = argc - 1; i >= 0; i--) { if (i == 0 || i > skip_args) + /* For the moment, we keep arguments as is in unibyte strings. + They are decoded in the function command-line after we know + locale-coding-system. */ Vcommand_line_args - = Fcons (build_string (argv[i]), Vcommand_line_args); + = Fcons (make_unibyte_string (argv[i], strlen (argv[i])), + Vcommand_line_args); } unbind_to (count, Qnil); @@ -744,7 +748,9 @@ } malloc_set_state (malloc_state_ptr); +#ifndef XMALLOC_OVERRUN_CHECK free (malloc_state_ptr); +#endif } else { @@ -1988,9 +1994,9 @@ bcopy (new, argv, sizeof (char *) * argc); - free (options); - free (new); - free (priority); + xfree (options); + xfree (new); + xfree (priority); } DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 1, "P", @@ -2240,6 +2246,12 @@ memory_warnings (my_edata, malloc_warning); #endif /* not WINDOWSNT */ #endif +#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) + /* Pthread may call malloc before main, and then we will get an endless + loop, because pthread_self (see alloc.c) calls malloc the first time + it is called on some systems. */ + reset_malloc_hooks (); +#endif #ifdef DOUG_LEA_MALLOC malloc_state_ptr = malloc_get_state (); #endif