1 /* RTPC AIX machine/system dependent defines
2 Copyright (C) 1988, 1999, 2002 Free Software Foundation, Inc.
4 This file is part of GNU Emacs.
6 GNU Emacs is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Emacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Emacs; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
22 /* The following line tells the configuration script what sort of
23 operating system this machine is likely to run.
24 USUAL-OPSYS="usg5-2-2" */
26 /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word
27 is the most significant byte. */
29 #define WORDS_BIG_ENDIAN
31 /* Define NO_ARG_ARRAY if you cannot take the address of the first of a
32 * group of arguments and treat it as an array of the arguments. */
36 /* Now define a symbol for the cpu type, if your compiler
37 does not define it automatically. */
43 /* Use type int rather than a union, to represent Lisp_Object */
44 /* This is desirable for most machines. */
48 /* No load average information appears in the AIX kernel. VRM has this
49 info, and if anyone desires they should fix fns.c to get it out of VRM */
51 /* Define CANNOT_DUMP on machines where unexec does not work.
52 Then the function dump-emacs will not be defined
53 and temacs will do (load "loadup") automatically unless told otherwise. */
55 /* #define CANNOT_DUMP */
57 /* Define addresses, macros, change some setup for dump */
62 /* Since NO_REMAP, problem with statics doesn't exist */
64 #define TEXT_START 0x10000000
66 #define DATA_START 0x20000000
69 /* The data segment in this machine always starts at address 0x20000000.
70 An address of data cannot be stored correctly in a Lisp object;
71 we always lose the high bits. We must tell XPNTR to add them back. */
73 #define DATA_SEG_BITS 0x20000000
75 #define N_BADMAG(x) BADMAG(x)
76 #define N_TXTOFF(x) A_TEXTPOS(x)
77 #define N_SYMOFF(x) A_SYMPOS(x)
78 #define A_TEXT_OFFSET(HDR) sizeof(HDR)
79 #define ADJUST_EXEC_HEADER \
80 unexec_text_start += sizeof(hdr); \
81 unexec_data_start = ohdr.a_dbase
83 #define ADDR_CORRECT(x) ((int)(x))
85 /* This is the offset of the executable's text, from the start of the file. */
87 #define A_TEXT_SEEK(HDR) (N_TXTOFF (hdr) + sizeof (hdr))
89 /* AIX has PTYs, so define here, along with macros needed to make them work. */
92 #define PTY_ITERATION for (i=0; i<256; i++)
93 #define PTY_NAME_SPRINTF sprintf (ptyname, "/dev/ptc%d", i);
95 #define PTY_TTY_NAME_SPRINTF \
96 { /* Check that server side not already open */ \
97 if ((ioctl (*ptyv, PTYSTATUS, 0) & 0xFFFF) != 0) \
99 emacs_close (*ptyv); \
102 /* And finally to be sure we can open it later */ \
103 sprintf (ptyname, "/dev/pts%d", i); \
104 signal (SIGHUP,SIG_IGN); \
105 } /* ignore hangup at process end */
107 /* TIOCNOTTY doesn't occur on AIX, but the rest
108 of the conditionalized code in process.c does
109 the right thing if we fake this out. */
110 #define TIOCNOTTY IOCTYPE
112 /* AIX has IPC. It also has sockets, and either can be used for client/server.
113 I would suggest the client/server code be changed to use HAVE_SOCKETS rather
114 than BSD_SYSTEM as the conditional if sockets provide any advantages. */
118 /* AIX has sockets */
121 /* #define SKTPAIR */ /* SKTPAIR works, but what is advantage over pipes? */
123 /* Specify the font for X to use. */
125 #define X_DEFAULT_FONT "Rom14.500"
127 /* Here override various assumptions in ymakefile */
129 /* On AIX 2.2.1, use these definitions instead
130 #define C_SWITCH_MACHINE -I/usr/include -Nn2000
131 #define LIBS_MACHINE -lX -lrts
134 #define C_SWITCH_MACHINE -I/usr/include -I/usr/include/bsd -Nn2000
135 #define LIBS_MACHINE -lXMenu -lX -lsock -lbsd -lrts
137 #define OBJECTS_MACHINE hftctl.o
138 #define START_FILES /lib/crt0.o
139 /* -lXMenu, -lX must precede -lsock, -lbsd */
140 #define LD_SWITCH_MACHINE -n -T0x10000000 -K -e start
142 #if 0 /* I refuse to promulgate a recommendation that would make
143 users unable to debug - RMS. */
144 /* delete the following line to foil optimization, enable debugging */
145 #define C_DEBUG_SWITCH -O
149 /* Setup to do some things BSD way - these won't work previous to AIX 2.1.2 */
151 #include </usr/include/bsd/BSDtoAIX.h>
154 /* AIX utimes allegedly causes SIGSEGV. */
155 #undef HAVE_UTIMES /* override configuration decision */
157 /* AIX defines FIONREAD, but it does not work. */
158 #define BROKEN_FIONREAD
160 /* rocky@watson.ibm.com says this is needed. */
163 /* arch-tag: eea85307-0ca9-4a9c-a4f6-89fad7591d28
164 (do not change this comment) */