annotate src/m/ibmrt-aix.h @ 400:a86b2b5e0111 r21-2-30

Import from CVS: tag r21-2-30
author cvs
date Mon, 13 Aug 2007 11:14:34 +0200
parents 0132846995bd
children 697ef44129c6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 /* RTPC AIX machine/system dependent defines
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 Copyright (C) 1988 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 This file is part of GNU Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 GNU Emacs is free software; you can redistribute it and/or modify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 GNU Emacs is distributed in the hope that it will be useful,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 GNU General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 /* Synched up with: FSF 19.31. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 /* The following line tells the configuration script what sort of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 operating system this machine is likely to run.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 USUAL-OPSYS="usg5-2-2" */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 /* Now define a symbol for the cpu type, if your compiler
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 does not define it automatically. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 #ifndef IBMAIX
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 #define IBMAIX
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 /* No load average information appears in the AIX kernel. VRM has this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 info, and if anyone desires they should fix fns.c to get it out of VRM */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 /* Define CANNOT_DUMP on machines where unexec does not work.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 Then the function dump-emacs will not be defined
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 and temacs will do (load "loadup") automatically unless told otherwise. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 /* #define CANNOT_DUMP */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 /* Define addresses, macros, change some setup for dump */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 #undef COFF
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 #define NO_REMAP
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 #define TEXT_START 0x10000000
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 #define TEXT_END 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 #define DATA_START 0x20000000
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 #define DATA_END 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 #define N_BADMAG(x) BADMAG(x)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 #define N_TXTOFF(x) A_TEXTPOS(x)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 #define N_SYMOFF(x) A_SYMPOS(x)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 #define A_TEXT_OFFSET(HDR) sizeof(HDR)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 #define ADJUST_EXEC_HEADER \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 unexec_text_start += sizeof(hdr); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 unexec_data_start = ohdr.a_dbase
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 #undef ADDR_CORRECT
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 #define ADDR_CORRECT(x) ((int)(x))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 /* This is the offset of the executable's text, from the start of the file. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 #define A_TEXT_SEEK(HDR) (N_TXTOFF (hdr) + sizeof (hdr))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 /* Define C_ALLOCA if this machine does not support a true alloca
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 and the one written in C should be used instead.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 Define HAVE_ALLOCA to say that the system provides a properly
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 working alloca function and it should be used.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 Define neither one if an assembler-language alloca
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 in the file alloca.s should be used. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 #define C_ALLOCA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 #define STACK_DIRECTION -1 /* tell alloca.c which way it grows */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 /* AIX has PTYs, so define here, along with macros needed to make them work. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 #define HAVE_PTYS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 #define PTY_ITERATION for (i=0; i<256; i++)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 #define PTY_NAME_SPRINTF sprintf (ptyname, "/dev/ptc%d", i);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 #define PTY_TTY_NAME_SPRINTF \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 { /* Check that server side not already open */ \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 if ((ioctl (*ptyv, PTYSTATUS, 0) & 0xFFFF) != 0) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 { \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 close (*ptyv); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 continue; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 } \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 /* And finally to be sure we can open it later */ \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 sprintf (ptyname, "/dev/pts%d", i); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 signal (SIGHUP,SIG_IGN); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 } /* ignore hangup at process end */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 /* TIOCNOTTY doesn't occur on AIX, but the rest
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 of the conditionalized code in process.c does
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 the right thing if we fake this out. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 #define TIOCNOTTY IOCTYPE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 /* #define SKTPAIR */ /* SKTPAIR works, but what is advantage over pipes? */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 /* Specify the font for X to use. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 #define X_DEFAULT_FONT "Rom14.500"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 /* Here override various assumptions in ymakefile */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 /* On AIX 2.2.1, use these definitions instead
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 0
diff changeset
109 #define C_SWITCH_MACHINE "-I/usr/include -Nn2000"
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 0
diff changeset
110 #define LIBS_MACHINE "-lX -lrts"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 0
diff changeset
113 #define C_SWITCH_MACHINE "-I/usr/include -I/usr/include/bsd -Nn2000"
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 0
diff changeset
114 #define LIBS_MACHINE "-lXMenu -lX -lsock -lbsd -lrts"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 0
diff changeset
116 #define OBJECTS_MACHINE "hftctl.o"
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 0
diff changeset
117 #define START_FILES "/lib/crt0.o"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 /* -lXMenu, -lX must precede -lsock, -lbsd */
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 0
diff changeset
119 #define LD_SWITCH_MACHINE "-n -T0x10000000 -K -e start"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 #if 0 /* I refuse to promulgate a recommendation that would make
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 users unable to debug - RMS. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 /* delete the following line to foil optimization, enable debugging */
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 0
diff changeset
124 #define C_DEBUG_SWITCH "-O"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 /* Setup to do some things BSD way - these won't work previous to AIX 2.1.2 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 #include </usr/include/bsd/BSDtoAIX.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 /* AIX utimes allegedly causes SIGSEGV. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 #undef HAVE_UTIMES /* override configuration decision */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 /* rocky@watson.ibm.com says this is needed. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 #define HAVE_FTIME