Declare calloc like malloc.
[emacs.git] / src / m / ibmps2-aix.h
blob4ed45c2a0f01080fcb1a7b2e45ff0a74833a2258
1 /* machine description file for ibm ps/2 aix386.
2 Copyright (C) 1989 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)
9 any later version.
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, 675 Mass Ave, Cambridge, MA 02139, USA. */
21 /* The following line tells the configuration script what sort of
22 operating system this machine is likely to run.
23 USUAL-OPSYS="note"
25 NOTE-START
26 Use -opsystem=usg5-3 on AIX 1.2.
27 -opsystem=usg5-2-2 should work on either AIX 1.1 or 1.2, but may not
28 work with certain new X window managers, and may be suboptimal.
29 NOTE-END */
31 /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word
32 is the most significant byte. */
34 #undef WORDS_BIG_ENDIAN
36 /* Define NO_ARG_ARRAY if you cannot take the address of the first of a
37 * group of arguments and treat it as an array of the arguments. */
39 /* #define NO_ARG_ARRAY */
41 /* Define WORD_MACHINE if addresses and such have
42 * to be corrected before they can be used as byte counts. */
44 /* #define WORD_MACHINE */
46 /* Now define a symbol for the cpu type, if your compiler
47 does not define it automatically:
48 Ones defined so far include vax, m68000, ns16000, pyramid,
49 orion, tahoe, APOLLO and many others */
51 #define INTEL386
52 #define aix386
54 #define IBMAIX
56 /* Use type int rather than a union, to represent Lisp_Object */
58 #define NO_UNION_TYPE
60 /* crt0.c, if it is used, should use the i386-bsd style of entry.
61 with no extra dummy args. On USG and XENIX,
62 NO_REMAP says this isn't used. */
64 #define CRT0_DUMMIES bogus_fp,
66 /* crt0.c should define a symbol `start' and do .globl with a dot. */
68 #define DOT_GLOBAL_START
70 /* USG systems do not actually support the load average,
71 so disable it for them. */
73 /* Define CANNOT_DUMP on machines where unexec does not work.
74 Then the function dump-emacs will not be defined
75 and temacs will do (load "loadup") automatically unless told otherwise. */
77 /* #define CANNOT_DUMP */
79 /* Define VIRT_ADDR_VARIES if the virtual addresses of
80 pure and impure space as loaded can vary, and even their
81 relative order cannot be relied on.
83 Otherwise Emacs assumes that text space precedes data space,
84 numerically. */
86 /* #define VIRT_ADDR_VARIES */
88 /* Define addresses, macros, change some setup for dump */
90 #define NO_REMAP
91 #undef static
92 /* Since NO_REMAP, problem with statics doesn't exist */
94 #ifdef USG5_3
95 #define TEXT_START 0x00000000
96 #else
97 #define TEXT_START 0x00400000
98 #define TEXT_END 0
99 #define DATA_START 0x00800000
100 #define DATA_END 0
102 /* The data segment in this machine always starts at address 0x00800000.
103 An address of data cannot be stored correctly in a Lisp object;
104 we always lose the high bits. We must tell XPNTR to add them back. */
106 #define DATA_SEG_BITS 0x00800000
107 #endif
109 #if 0 /* I refuse to promulgate a recommendation that would make
110 users unable to debug - RMS. */
111 /* delete the following line to foil optimization, enable debugging */
112 #define C_DEBUG_SWITCH -O
113 #endif
115 #define BSTRING
116 #define HAVE_VFORK
117 #undef HAVE_TERMIO
118 #define HAVE_TERMIOS
120 /* Send signals to subprocesses by "typing" special chars at them. */
122 #define SIGNALS_VIA_CHARACTERS
125 * Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir
126 * library functions. Almost, but not quite the same as
127 * the 4.2 functions
129 #define SYSV_SYSTEM_DIR
132 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
133 * The 4.2 opendir, etc., library functions.
135 #undef NONSYSTEM_DIR_LIBRARY
137 /* AIX utimes allegedly causes SIGSEGV. */
138 #undef HAVE_UTIMES /* override configuration decision */
140 /* AIX defines FIONREAD, but it does not work. */
141 #define BROKEN_FIONREAD
143 /* Data type of load average, as read out of kmem. */
145 #define LOAD_AVE_TYPE long /* For AIX (sysV) */
147 /* Convert that into an integer that is 100 for a load average of 1.0 */
149 #define LOAD_AVE_CVT(x) (int) (((double) (x)/65535.0) * 100.0)
151 /* This page was added in June 1990. It may be incorrect for some versions
152 of aix, so delete it if it causes trouble. */
154 /* AIX has sigsetmask() */
155 #undef sigsetmask
157 /* AIX386 has BSD4.3 PTYs */
159 #define HAVE_PTYS
161 /* AIX has IPC. It also has sockets, and either can be used for client/server.
162 I would suggest the client/server code be changed to use HAVE_SOCKETS rather
163 than BSD as the conditional if sockets provide any advantages. */
165 #define HAVE_SYSVIPC
167 /* AIX has sockets */
169 #define HAVE_SOCKETS
170 /* #define SKTPAIR */ /* SKTPAIR works, but what is advantage over pipes? */
172 /* Specify the font for X to use. */
174 #define X_DEFAULT_FONT "8x13"
176 /* AIX has a wait.h. */
178 #define HAVE_WAIT_HEADER
180 /* sioctl.h should not be included, says bytheway@cs.utah.edu. */
181 #undef NEED_SIOCTL
182 /* I'm guessing that that means it doesn't want ptem.h either. */
183 #undef NEED_PTEM_H
185 /* aix has `union wait' */
186 #define HAVE_UNION_WAIT
188 /* Here override various assumptions in ymakefile */
190 /* Define C_ALLOCA if this machine does not support a true alloca
191 and the one written in C should be used instead.
192 Define HAVE_ALLOCA to say that the system provides a properly
193 working alloca function and it should be used.
194 Define neither one if an assembler-language alloca
195 in the file alloca.s should be used. */
197 #ifdef __GNUC__
198 #define HAVE_ALLOCA
199 #define alloca(n) __builtin_alloca(n)
200 #if __GNUC__ < 2
201 #define LIB_STANDARD /usr/local/lib/gcc-gnulib -lbsd -lrts -lc
202 #endif
203 /* -g fails to work, so it is omitted. */
204 /* tranle says that -fstrength-reduce does not help. */
205 #define C_DEBUG_SWITCH
206 #else
207 #define C_ALLOCA
208 #define STACK_DIRECTION -1 /* tell alloca.c which way it grows */
209 #define LIBS_MACHINE -lbsd -lrts
210 #endif
212 #define OBJECTS_MACHINE hftctl.o
213 #define LD_SWITCH_MACHINE -T0x00400000 -K -e start
214 #define LIBS_DEBUG /* no -lg on aix ps/2 */
216 #ifdef USG5_3
217 #define XICCC
218 #define HAVE_GETWD
219 #undef LD_SWITCH_MACHINE
220 #define LD_SWITCH_MACHINE -T0x0 -K -e start
222 /* Things defined in s-usg5-3.h that need to be overridden. */
223 #undef NOMULTIPLEJOBS
224 #undef BROKEN_TIOCGETC
225 #undef BROKEN_TIOCGWINSZ
226 #undef LIBX10_SYSTEM
227 #undef LIBX11_SYSTEM
228 #undef LIB_X11_LIB
229 #endif
231 /* Shared libraries are supported in a patch release of ps/2 1.2.1.
232 If the system has them, the user can turn them on, and this code
233 will make them work. */
234 #define USG_SHARED_LIBRARIES /* Assume that by 19's release everyone has this. */
236 #ifdef USG_SHARED_LIBRARIES
237 #define ORDINARY_LINK
238 #undef LIB_STANDARD
239 #undef LD_SWITCH_MACHINE
240 #if __GNUC__ > 1
241 #define LD_SWITCH_MACHINE -shlib
242 #endif
243 #endif