Update years in copyright notice; nfc.
[bpt/emacs.git] / src / m / ibmrt-aix.h
CommitLineData
30fe07a6 1/* RTPC AIX machine/system dependent defines
b908093d 2 Copyright (C) 1988, 1999, 2002, 2003, 2004,
aaef169d 3 2005, 2006 Free Software Foundation, Inc.
30fe07a6
JB
4
5This file is part of GNU Emacs.
6
7GNU Emacs is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
17385adc 9the Free Software Foundation; either version 2, or (at your option)
30fe07a6
JB
10any later version.
11
12GNU Emacs is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GNU Emacs; see the file COPYING. If not, write to
364c38d3
LK
19the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20Boston, MA 02110-1301, USA. */
30fe07a6
JB
21
22
177c0ea7 23/* The following line tells the configuration script what sort of
30fe07a6
JB
24 operating system this machine is likely to run.
25 USUAL-OPSYS="usg5-2-2" */
26
74d3f806
KH
27/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word
28 is the most significant byte. */
29
30#define WORDS_BIG_ENDIAN
31
30fe07a6
JB
32/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
33 * group of arguments and treat it as an array of the arguments. */
34
35#define NO_ARG_ARRAY
36
30fe07a6
JB
37/* Now define a symbol for the cpu type, if your compiler
38 does not define it automatically. */
39
40#ifndef IBMAIX
41#define IBMAIX
42#endif
43
44/* Use type int rather than a union, to represent Lisp_Object */
45/* This is desirable for most machines. */
46
47#define NO_UNION_TYPE
48
49/* No load average information appears in the AIX kernel. VRM has this
50 info, and if anyone desires they should fix fns.c to get it out of VRM */
51
52/* Define CANNOT_DUMP on machines where unexec does not work.
53 Then the function dump-emacs will not be defined
54 and temacs will do (load "loadup") automatically unless told otherwise. */
55
56/* #define CANNOT_DUMP */
57
58/* Define addresses, macros, change some setup for dump */
59
60#undef COFF
61#define NO_REMAP
62#undef static
63 /* Since NO_REMAP, problem with statics doesn't exist */
64
65#define TEXT_START 0x10000000
66#define TEXT_END 0
67#define DATA_START 0x20000000
68#define DATA_END 0
69
70/* The data segment in this machine always starts at address 0x20000000.
71 An address of data cannot be stored correctly in a Lisp object;
72 we always lose the high bits. We must tell XPNTR to add them back. */
73
74#define DATA_SEG_BITS 0x20000000
75
76#define N_BADMAG(x) BADMAG(x)
77#define N_TXTOFF(x) A_TEXTPOS(x)
78#define N_SYMOFF(x) A_SYMPOS(x)
79#define A_TEXT_OFFSET(HDR) sizeof(HDR)
80#define ADJUST_EXEC_HEADER \
81 unexec_text_start += sizeof(hdr); \
82 unexec_data_start = ohdr.a_dbase
83#undef ADDR_CORRECT
84#define ADDR_CORRECT(x) ((int)(x))
85
86/* This is the offset of the executable's text, from the start of the file. */
87
88#define A_TEXT_SEEK(HDR) (N_TXTOFF (hdr) + sizeof (hdr))
89
30fe07a6
JB
90/* AIX has PTYs, so define here, along with macros needed to make them work. */
91
92#define HAVE_PTYS
93#define PTY_ITERATION for (i=0; i<256; i++)
94#define PTY_NAME_SPRINTF sprintf (ptyname, "/dev/ptc%d", i);
95
96#define PTY_TTY_NAME_SPRINTF \
97{ /* Check that server side not already open */ \
98 if ((ioctl (*ptyv, PTYSTATUS, 0) & 0xFFFF) != 0) \
99 { \
332d98c7 100 emacs_close (*ptyv); \
30fe07a6
JB
101 continue; \
102 } \
103 /* And finally to be sure we can open it later */ \
104 sprintf (ptyname, "/dev/pts%d", i); \
105 signal (SIGHUP,SIG_IGN); \
106} /* ignore hangup at process end */
107
108/* TIOCNOTTY doesn't occur on AIX, but the rest
109 of the conditionalized code in process.c does
110 the right thing if we fake this out. */
111#define TIOCNOTTY IOCTYPE
112
113/* AIX has IPC. It also has sockets, and either can be used for client/server.
114 I would suggest the client/server code be changed to use HAVE_SOCKETS rather
8e4c450d 115 than BSD_SYSTEM as the conditional if sockets provide any advantages. */
30fe07a6
JB
116
117#define HAVE_SYSVIPC
118
119/* AIX has sockets */
120
121#define HAVE_SOCKETS
122/* #define SKTPAIR */ /* SKTPAIR works, but what is advantage over pipes? */
123
124/* Specify the font for X to use. */
125
126#define X_DEFAULT_FONT "Rom14.500"
127
128/* Here override various assumptions in ymakefile */
129
130/* On AIX 2.2.1, use these definitions instead
131#define C_SWITCH_MACHINE -I/usr/include -Nn2000
132#define LIBS_MACHINE -lX -lrts
133*/
134
135#define C_SWITCH_MACHINE -I/usr/include -I/usr/include/bsd -Nn2000
136#define LIBS_MACHINE -lXMenu -lX -lsock -lbsd -lrts
137
138#define OBJECTS_MACHINE hftctl.o
139#define START_FILES /lib/crt0.o
140/* -lXMenu, -lX must precede -lsock, -lbsd */
141#define LD_SWITCH_MACHINE -n -T0x10000000 -K -e start
142
143#if 0 /* I refuse to promulgate a recommendation that would make
144 users unable to debug - RMS. */
145/* delete the following line to foil optimization, enable debugging */
146#define C_DEBUG_SWITCH -O
147#endif
148
149
150/* Setup to do some things BSD way - these won't work previous to AIX 2.1.2 */
151
152#include </usr/include/bsd/BSDtoAIX.h>
153#define BSTRING
30fe07a6 154
5df58331
KH
155/* AIX utimes allegedly causes SIGSEGV. */
156#undef HAVE_UTIMES /* override configuration decision */
30fe07a6
JB
157
158/* AIX defines FIONREAD, but it does not work. */
159#define BROKEN_FIONREAD
2e388a26
RS
160
161/* rocky@watson.ibm.com says this is needed. */
162#define HAVE_FTIME
ab5796a9
MB
163
164/* arch-tag: eea85307-0ca9-4a9c-a4f6-89fad7591d28
165 (do not change this comment) */