annotate src/s/sunos4shr.h @ 83525:b2e7507b55c6

Fix C-x 5 2 on the controlling tty; fix some possible crash conditions and a memory leak. * src/frame.c (make_terminal_frame): Don't create frames on a terminal that is being deleted. * src/xfns.c (Fx_create_frame, x_create_tip_frame): Ditto. * src/keyboard.c (tty_read_avail_input): Don't read from a terminal that is being deleted. * src/term.c (get_named_tty): Abort if tty name is NULL. Simplify accordingly. * src/term.c (Ftty_type): Return nil if terminal is not on a tty instead of throwing an error. Doc update. * src/term.c (init_tty): Set name before calling `get_named_tty'. * src/term.c (delete_tty): Let delete_terminal delete the frames. Plug memory leak caused by tty->name. Remove reference to `deleting_tty'. * src/term.c (syms_of_term) <Vsuspend_tty_functions, Vresume_tty_functions>: Doc update. * src/termhooks.h (terminal) <name>: Explain why identifying terminals by name is a bad idea. * src/terminal.c (delete_terminal): Doc update. * src/xterm.c (XTread_socket): Disable loop on all X displays. * src/xterm.c (x_delete_display): Doc update to reflect changes in delete_terminal. * src/xterm.c (x_delete_terminal): Don't set terminal->deleted and let delete_terminal delete the frames on the terminal. * src/xterm.h (x_display_info) <terminal>: Move member earlier in the struct. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-565
author Karoly Lorentey <lorentey@elte.hu>
date Sat, 20 May 2006 17:12:43 +0000
parents 695cf19ef79e
children 386a4a482dee 375f2633d815
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5039
8755e1e3faf1 (GNU_MALLOC, REL_ALLOC): Don't define if already defined.
Richard M. Stallman <rms@gnu.org>
parents: 4205
diff changeset
1 /* This file permits building Emacs with a shared libc on Sunos 4.
8755e1e3faf1 (GNU_MALLOC, REL_ALLOC): Don't define if already defined.
Richard M. Stallman <rms@gnu.org>
parents: 4205
diff changeset
2 To make this work, you must completely replace your C shared library
9031
5da502223e20 Comment changes.
Richard M. Stallman <rms@gnu.org>
parents: 9019
diff changeset
3 using one of the SunOS 4.1.x jumbo replacement patches from Sun.
5da502223e20 Comment changes.
Richard M. Stallman <rms@gnu.org>
parents: 9019
diff changeset
4 Here are the patch numbers for Sunos 4.1.3:
5da502223e20 Comment changes.
Richard M. Stallman <rms@gnu.org>
parents: 9019
diff changeset
5 100890-10 SunOS 4.1.3: domestic libc jumbo patch
5da502223e20 Comment changes.
Richard M. Stallman <rms@gnu.org>
parents: 9019
diff changeset
6 100891-10 SunOS 4.1.3: international libc jumbo patch */
5da502223e20 Comment changes.
Richard M. Stallman <rms@gnu.org>
parents: 9019
diff changeset
7
5039
8755e1e3faf1 (GNU_MALLOC, REL_ALLOC): Don't define if already defined.
Richard M. Stallman <rms@gnu.org>
parents: 4205
diff changeset
8
2733
d7cacd332230 * s/sunos4shr.h: Apply changes from David J. Mackenzie; this isn't
Jim Blandy <jimb@redhat.com>
parents: 625
diff changeset
9 #include "sunos4-1.h"
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
10
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11 /* Say that the text segment of a.out includes the header;
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12 the header actually occupies the first few bytes of the text segment
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13 and is counted in hdr.a_text. */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15 /* Misleading! Actually gets loaded after crt0.o */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16 #define START_FILES pre-crt0.o
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
18 /*
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19 * Kludge! can't get at symbol "start" in std crt0.o
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20 * Who the #$%&* decided to remove the __ characters!
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21 * Someone needs to fix this in sysdep.c with an #ifdef BROKEN_START in
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
22 * sysdep.c. We do not use this address so any value should do really. Still
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23 * may need it in the future?
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24 */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25 #define BROKEN_START
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26 #define TEXT_START 0x2020
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28 #define UNEXEC unexsunos4.o
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29 #define RUN_TIME_REMAP
11615
7fa33c87242c (ORDINARY_LINK): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 9073
diff changeset
30 #define ORDINARY_LINK
12585
771e75e8ebb5 (SUNOS4_SHARED_LIBRARIES): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 12459
diff changeset
31 #define SUNOS4_SHARED_LIBRARIES
2733
d7cacd332230 * s/sunos4shr.h: Apply changes from David J. Mackenzie; this isn't
Jim Blandy <jimb@redhat.com>
parents: 625
diff changeset
32
d7cacd332230 * s/sunos4shr.h: Apply changes from David J. Mackenzie; this isn't
Jim Blandy <jimb@redhat.com>
parents: 625
diff changeset
33 #undef LD_SWITCH_SYSTEM
18586
41f11018aeb5 (LD_SWITCH_SYSTEM_TEMACS): Add #undef.
Richard M. Stallman <rms@gnu.org>
parents: 13863
diff changeset
34 #undef LD_SWITCH_SYSTEM_TEMACS
4165
328187f39c3a (SYSTEM_MALLOC): Add #undef.
Richard M. Stallman <rms@gnu.org>
parents: 2733
diff changeset
35
328187f39c3a (SYSTEM_MALLOC): Add #undef.
Richard M. Stallman <rms@gnu.org>
parents: 2733
diff changeset
36 #undef SYSTEM_MALLOC
5039
8755e1e3faf1 (GNU_MALLOC, REL_ALLOC): Don't define if already defined.
Richard M. Stallman <rms@gnu.org>
parents: 4205
diff changeset
37 #ifndef GNU_MALLOC
4165
328187f39c3a (SYSTEM_MALLOC): Add #undef.
Richard M. Stallman <rms@gnu.org>
parents: 2733
diff changeset
38 #define GNU_MALLOC
5039
8755e1e3faf1 (GNU_MALLOC, REL_ALLOC): Don't define if already defined.
Richard M. Stallman <rms@gnu.org>
parents: 4205
diff changeset
39 #endif
8755e1e3faf1 (GNU_MALLOC, REL_ALLOC): Don't define if already defined.
Richard M. Stallman <rms@gnu.org>
parents: 4205
diff changeset
40 #ifndef REL_ALLOC
4165
328187f39c3a (SYSTEM_MALLOC): Add #undef.
Richard M. Stallman <rms@gnu.org>
parents: 2733
diff changeset
41 #define REL_ALLOC
5039
8755e1e3faf1 (GNU_MALLOC, REL_ALLOC): Don't define if already defined.
Richard M. Stallman <rms@gnu.org>
parents: 4205
diff changeset
42 #endif
4205
23978f12007b (memmove): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 4165
diff changeset
43
23978f12007b (memmove): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 4165
diff changeset
44 /* khera@cs.duke.edu says this is needed. */
23978f12007b (memmove): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 4165
diff changeset
45 #define memmove(to, from, size) bcopy (from, to, size)
9073
43aa8427db01 (USE_DL_STUBS): Add #undef.
Richard M. Stallman <rms@gnu.org>
parents: 9031
diff changeset
46
43aa8427db01 (USE_DL_STUBS): Add #undef.
Richard M. Stallman <rms@gnu.org>
parents: 9031
diff changeset
47 #undef USE_DL_STUBS
12459
d1da7f16002c (LIBXMU): New definitions (two alternative ones).
Richard M. Stallman <rms@gnu.org>
parents: 11615
diff changeset
48
13863
8b143e9a5394 (LIBXMU): Replace previous change.
Richard M. Stallman <rms@gnu.org>
parents: 13711
diff changeset
49 #ifndef HAVE_X11R6
8b143e9a5394 (LIBXMU): Replace previous change.
Richard M. Stallman <rms@gnu.org>
parents: 13711
diff changeset
50 /* With X11R5 it was reported that linking -lXmu dynamically
8b143e9a5394 (LIBXMU): Replace previous change.
Richard M. Stallman <rms@gnu.org>
parents: 13711
diff changeset
51 did not work. With X11R6, it does work; and since normally
8b143e9a5394 (LIBXMU): Replace previous change.
Richard M. Stallman <rms@gnu.org>
parents: 13711
diff changeset
52 only the dynamic libraries are available, we should use them. */
12459
d1da7f16002c (LIBXMU): New definitions (two alternative ones).
Richard M. Stallman <rms@gnu.org>
parents: 11615
diff changeset
53 #ifdef __GNUC__
13863
8b143e9a5394 (LIBXMU): Replace previous change.
Richard M. Stallman <rms@gnu.org>
parents: 13711
diff changeset
54 #define LIBXMU -Xlinker -Bstatic -lXmu -Xlinker -Bdynamic
12459
d1da7f16002c (LIBXMU): New definitions (two alternative ones).
Richard M. Stallman <rms@gnu.org>
parents: 11615
diff changeset
55 #else
13863
8b143e9a5394 (LIBXMU): Replace previous change.
Richard M. Stallman <rms@gnu.org>
parents: 13711
diff changeset
56 #define LIBXMU -Bstatic -lXmu -Bdynamic
12459
d1da7f16002c (LIBXMU): New definitions (two alternative ones).
Richard M. Stallman <rms@gnu.org>
parents: 11615
diff changeset
57 #endif
13863
8b143e9a5394 (LIBXMU): Replace previous change.
Richard M. Stallman <rms@gnu.org>
parents: 13711
diff changeset
58
8b143e9a5394 (LIBXMU): Replace previous change.
Richard M. Stallman <rms@gnu.org>
parents: 13711
diff changeset
59 #endif /* not HAVE_X11R6 */
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 21929
diff changeset
60
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 21929
diff changeset
61 /* arch-tag: cb54321a-ed45-4c17-a23e-1c157758da78
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 21929
diff changeset
62 (do not change this comment) */