aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2004-12-08 22:21:07 +0000
committerKaroly Lorentey2004-12-08 22:21:07 +0000
commitb3be62d4c924fd8aa8b6fdfa96b03a015c586285 (patch)
tree84d262494fc16e4a13f68dad39f2bbcd566a98d4 /src
parentfad2f6858075f49c4c8fd16f0535c287e3f14ac3 (diff)
parent3073399bdafd5283661fae867983d0d30c7f2536 (diff)
downloademacs-b3be62d4c924fd8aa8b6fdfa96b03a015c586285.tar.gz
emacs-b3be62d4c924fd8aa8b6fdfa96b03a015c586285.zip
Merged in changes from CVS trunk.
Patches applied: * 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/emacs--cvs-trunk--0--patch-717 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-718 RCS keyword removal * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-719 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-74 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-272
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog25
-rw-r--r--src/alloc.c17
-rw-r--r--src/config.in19
-rw-r--r--src/emacs.c2
-rw-r--r--src/eval.c2
-rw-r--r--src/keyboard.c4
6 files changed, 53 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3064999717f..28030aef0e3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,21 @@
12004-12-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 12004-12-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 2
3 * emacs.c (Fdump_emacs): Add ! defined (SYSTEM_MALLOC) around
4 reset_malloc_hooks.
5
6 * keyboard.c (handle_async_input, input_available_signal): Add
7 ! defined (SYSTEM_MALLOC) around thread code.
8
9 * alloc.c: Add comment about the reason for (UN)BLOCK_INPUT_ALLOC.
10
112004-12-07 Stefan <monnier@iro.umontreal.ca>
12
13 * eval.c (init_eval_once): Increase max_specpdl_size to 1000.
14
15 * config.in: Regenerate.
16
172004-12-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
18
3 * xmenu.c (Fx_popup_menu): Correct documentation about position. 19 * xmenu.c (Fx_popup_menu): Correct documentation about position.
4 (xmenu_show): Do not call XTranslateCoordinates. Adjust position 20 (xmenu_show): Do not call XTranslateCoordinates. Adjust position
5 if not given by a mouse click to correspond with x-popup-menu 21 if not given by a mouse click to correspond with x-popup-menu
@@ -100,13 +116,10 @@
100 116
1012004-11-30 Kenichi Handa <handa@m17n.org> 1172004-11-30 Kenichi Handa <handa@m17n.org>
102 118
103 * term.c (encode_terminal_buf, encode_terminal_bufsize): New 119 * term.c (encode_terminal_buf, encode_terminal_bufsize): New variables.
104 variables.
105 (encode_terminal_code): Argument changed. Encode all 120 (encode_terminal_code): Argument changed. Encode all
106 characters at once, and return a pointer to the result of 121 characters at once, and return a pointer to the result of encoding.
107 encoding. 122 (write_glyphs): Decide coding here. Adjusted for the above change.
108 (write_glyphs): Decide coding here. Adjusted for the above
109 change.
110 (insert_glyphs): Likewise. 123 (insert_glyphs): Likewise.
111 (term_init): Initialize encode_terminal_bufsize to 0. 124 (term_init): Initialize encode_terminal_bufsize to 0.
112 125
diff --git a/src/alloc.c b/src/alloc.c
index 56f8be25f61..4cf5de46d21 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -91,6 +91,23 @@ extern __malloc_size_t __malloc_extra_blocks;
91 91
92#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) 92#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
93 93
94/* When GTK uses the file chooser dialog, different backends can be loaded
95 dynamically. One such a backend is the Gnome VFS backend that gets loaded
96 if you run Gnome. That backend creates several threads and also allocates
97 memory with malloc.
98
99 If Emacs sets malloc hooks (! SYSTEM_MALLOC) and the emacs_blocked_*
100 functions below are called from malloc, there is a chance that one
101 of these threads preempts the Emacs main thread and the hook variables
102 end up in a inconsistent state. So we have a mutex to prevent that (note
103 that the backend handles concurrent access to malloc within its own threads
104 but Emacs code running in the main thread is not included in that control).
105
106 When UNBLOCK_INPUT is called, revoke_input_signal may be called. If this
107 happens in one of the backend threads we will have two threads that tries
108 to run Emacs code at once, and the code is not prepared for that.
109 To prevent that, we only call BLOCK/UNBLOCK from the main thread. */
110
94static pthread_mutex_t alloc_mutex; 111static pthread_mutex_t alloc_mutex;
95pthread_t main_thread; 112pthread_t main_thread;
96 113
diff --git a/src/config.in b/src/config.in
index 65a320bca42..a7b29aac1c9 100644
--- a/src/config.in
+++ b/src/config.in
@@ -1,7 +1,8 @@
1/* src/config.in. Generated from configure.in by autoheader. */ 1/* src/config.in. Generated from configure.in by autoheader. */
2 2
3/* GNU Emacs site configuration template file. 3/* GNU Emacs site configuration template file.
4 Copyright (C) 1988, 93, 94, 99, 2000, 2002 Free Software Foundation, Inc. 4 Copyright (C) 1988, 1993, 1994, 1999, 2000, 2002, 2004
5 Free Software Foundation, Inc.
5 6
6This file is part of GNU Emacs. 7This file is part of GNU Emacs.
7 8
@@ -775,9 +776,9 @@ Boston, MA 02111-1307, USA. */
775/* If using the C implementation of alloca, define if you know the 776/* If using the C implementation of alloca, define if you know the
776 direction of stack growth for your system; otherwise it will be 777 direction of stack growth for your system; otherwise it will be
777 automatically deduced at run-time. 778 automatically deduced at run-time.
778 STACK_DIRECTION > 0 => grows toward higher addresses 779 STACK_DIRECTION > 0 => grows toward higher addresses
779 STACK_DIRECTION < 0 => grows toward lower addresses 780 STACK_DIRECTION < 0 => grows toward lower addresses
780 STACK_DIRECTION = 0 => direction of growth unknown */ 781 STACK_DIRECTION = 0 => direction of growth unknown */
781#undef STACK_DIRECTION 782#undef STACK_DIRECTION
782 783
783/* Define to 1 if you have the ANSI C header files. */ 784/* Define to 1 if you have the ANSI C header files. */
@@ -932,7 +933,7 @@ Boston, MA 02111-1307, USA. */
932/* Don't try to switch on inline handling as detected by AC_C_INLINE 933/* Don't try to switch on inline handling as detected by AC_C_INLINE
933 generally, because even if non-gcc compilers accept `inline', they 934 generally, because even if non-gcc compilers accept `inline', they
934 may reject `extern inline'. */ 935 may reject `extern inline'. */
935#ifdef __GNUC__ 936#if defined (__GNUC__) && defined (OPTIMIZE)
936#define INLINE __inline__ 937#define INLINE __inline__
937#else 938#else
938#define INLINE 939#define INLINE
@@ -980,7 +981,13 @@ Boston, MA 02111-1307, USA. */
980/* Tell regex.c to use a type compatible with Emacs. */ 981/* Tell regex.c to use a type compatible with Emacs. */
981#define RE_TRANSLATE_TYPE Lisp_Object 982#define RE_TRANSLATE_TYPE Lisp_Object
982#define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C) 983#define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C)
983#define RE_TRANSLATE_P(TBL) (XFASTINT (TBL) != 0) 984#ifdef make_number
985/* If make_number is a macro, use it. */
986#define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0)))
987#else
988/* If make_number is a function, avoid it. */
989#define RE_TRANSLATE_P(TBL) (!(INTEGERP (TBL) && XINT (TBL) == 0))
990#endif
984#endif 991#endif
985 992
986/* Avoid link-time collision with system mktime if we will use our own. */ 993/* Avoid link-time collision with system mktime if we will use our own. */
diff --git a/src/emacs.c b/src/emacs.c
index cbd592f9103..fb7c573836a 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2237,7 +2237,7 @@ You must run Emacs in batch mode in order to dump it. */)
2237 memory_warnings (my_edata, malloc_warning); 2237 memory_warnings (my_edata, malloc_warning);
2238#endif /* not WINDOWSNT */ 2238#endif /* not WINDOWSNT */
2239#endif 2239#endif
2240#ifdef HAVE_GTK_AND_PTHREAD 2240#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
2241 /* Pthread may call malloc before main, and then we will get an endless 2241 /* Pthread may call malloc before main, and then we will get an endless
2242 loop, because pthread_self (see alloc.c) calls malloc the first time 2242 loop, because pthread_self (see alloc.c) calls malloc the first time
2243 it is called on some systems. */ 2243 it is called on some systems. */
diff --git a/src/eval.c b/src/eval.c
index 4a63b022fd6..0eb519fbfca 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -204,7 +204,7 @@ init_eval_once ()
204 specpdl_size = 50; 204 specpdl_size = 50;
205 specpdl = (struct specbinding *) xmalloc (specpdl_size * sizeof (struct specbinding)); 205 specpdl = (struct specbinding *) xmalloc (specpdl_size * sizeof (struct specbinding));
206 specpdl_ptr = specpdl; 206 specpdl_ptr = specpdl;
207 max_specpdl_size = 650; 207 max_specpdl_size = 1000;
208 max_lisp_eval_depth = 300; 208 max_lisp_eval_depth = 300;
209 209
210 Vrun_hooks = Qnil; 210 Vrun_hooks = Qnil;
diff --git a/src/keyboard.c b/src/keyboard.c
index 9b42bd06b50..052ef2d38b7 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -6849,7 +6849,7 @@ handle_async_input ()
6849#ifdef BSD4_1 6849#ifdef BSD4_1
6850 extern int select_alarmed; 6850 extern int select_alarmed;
6851#endif 6851#endif
6852#ifdef HAVE_GTK_AND_PTHREAD 6852#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
6853 extern pthread_t main_thread; 6853 extern pthread_t main_thread;
6854 if (pthread_self () != main_thread) 6854 if (pthread_self () != main_thread)
6855 { 6855 {
@@ -6895,7 +6895,7 @@ input_available_signal (signo)
6895{ 6895{
6896 /* Must preserve main program's value of errno. */ 6896 /* Must preserve main program's value of errno. */
6897 int old_errno = errno; 6897 int old_errno = errno;
6898#ifdef HAVE_GTK_AND_PTHREAD 6898#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
6899 extern pthread_t main_thread; 6899 extern pthread_t main_thread;
6900 if (pthread_self () != main_thread) 6900 if (pthread_self () != main_thread)
6901 { 6901 {