root/trunk/src/m/ibmrt-aix.h
| Revision 4220, 5.5 kB (checked in by miyoshi, 8 months ago) | |
|---|---|
| |
| Line | |
|---|---|
| 1 | /* RTPC AIX machine/system dependent defines |
| 2 | Copyright (C) 1988, 1999, 2001, 2002, 2003, 2004, |
| 3 | 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
| 4 | |
| 5 | This file is part of GNU Emacs. |
| 6 | |
| 7 | GNU Emacs is free software; you can redistribute it and/or modify |
| 8 | it under the terms of the GNU General Public License as published by |
| 9 | the Free Software Foundation; either version 3, or (at your option) |
| 10 | any later version. |
| 11 | |
| 12 | GNU Emacs is distributed in the hope that it will be useful, |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. |
| 16 | |
| 17 | You should have received a copy of the GNU General Public License |
| 18 | along with GNU Emacs; see the file COPYING. If not, write to |
| 19 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 20 | Boston, MA 02110-1301, USA. */ |
| 21 | |
| 22 | |
| 23 | /* The following line tells the configuration script what sort of |
| 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2-2" */ |
| 26 | |
| 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ |
| 29 | |
| 30 | #define WORDS_BIG_ENDIAN |
| 31 | |
| 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 | |
| 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 | |
| 90 | /* Define C_ALLOCA if this machine does not support a true alloca |
| 91 | and the one written in C should be used instead. |
| 92 | Define HAVE_ALLOCA to say that the system provides a properly |
| 93 | working alloca function and it should be used. |
| 94 | Define neither one if an assembler-language alloca |
| 95 | in the file alloca.s should be used. */ |
| 96 | |
| 97 | #define C_ALLOCA |
| 98 | #define STACK_DIRECTION -1 /* tell alloca.c which way it grows */ |
| 99 | |
| 100 | /* AIX has PTYs, so define here, along with macros needed to make them work. */ |
| 101 | |
| 102 | #define HAVE_PTYS |
| 103 | #define PTY_ITERATION for (i=0; i<256; i++) |
| 104 | #define PTY_NAME_SPRINTF sprintf (ptyname, "/dev/ptc%d", i); |
| 105 | |
| 106 | #define PTY_TTY_NAME_SPRINTF \ |
| 107 | { /* Check that server side not already open */ \ |
| 108 | if ((ioctl (*ptyv, PTYSTATUS, 0) & 0xFFFF) != 0) \ |
| 109 | { \ |
| 110 | emacs_close (*ptyv); \ |
| 111 | continue; \ |
| 112 | } \ |
| 113 | /* And finally to be sure we can open it later */ \ |
| 114 | sprintf (ptyname, "/dev/pts%d", i); \ |
| 115 | signal (SIGHUP,SIG_IGN); \ |
| 116 | } /* ignore hangup at process end */ |
| 117 | |
| 118 | /* TIOCNOTTY doesn't occur on AIX, but the rest |
| 119 | of the conditionalized code in process.c does |
| 120 | the right thing if we fake this out. */ |
| 121 | #define TIOCNOTTY IOCTYPE |
| 122 | |
| 123 | /* AIX has IPC. It also has sockets, and either can be used for client/server. |
| 124 | I would suggest the client/server code be changed to use HAVE_SOCKETS rather |
| 125 | than BSD_SYSTEM as the conditional if sockets provide any advantages. */ |
| 126 | |
| 127 | #define HAVE_SYSVIPC |
| 128 | |
| 129 | /* AIX has sockets */ |
| 130 | |
| 131 | #define HAVE_SOCKETS |
| 132 | /* #define SKTPAIR */ /* SKTPAIR works, but what is advantage over pipes? */ |
| 133 | |
| 134 | /* Specify the font for X to use. */ |
| 135 | |
| 136 | #define X_DEFAULT_FONT "Rom14.500" |
| 137 | |
| 138 | /* Here override various assumptions in ymakefile */ |
| 139 | |
| 140 | /* On AIX 2.2.1, use these definitions instead |
| 141 | #define C_SWITCH_MACHINE -I/usr/include -Nn2000 |
| 142 | #define LIBS_MACHINE -lX -lrts |
| 143 | */ |
| 144 | |
| 145 | #define C_SWITCH_MACHINE -I/usr/include -I/usr/include/bsd -Nn2000 |
| 146 | #define LIBS_MACHINE -lXMenu -lX -lsock -lbsd -lrts |
| 147 | |
| 148 | #define OBJECTS_MACHINE hftctl.o |
| 149 | #define START_FILES /lib/crt0.o |
| 150 | /* -lXMenu, -lX must precede -lsock, -lbsd */ |
| 151 | #define LD_SWITCH_MACHINE -n -T0x10000000 -K -e start |
| 152 | |
| 153 | #if 0 /* I refuse to promulgate a recommendation that would make |
| 154 | users unable to debug - RMS. */ |
| 155 | /* delete the following line to foil optimization, enable debugging */ |
| 156 | #define C_DEBUG_SWITCH -O |
| 157 | #endif |
| 158 | |
| 159 | |
| 160 | /* Setup to do some things BSD way - these won't work previous to AIX 2.1.2 */ |
| 161 | |
| 162 | #include </usr/include/bsd/BSDtoAIX.h> |
| 163 | #define BSTRING |
| 164 | |
| 165 | /* AIX utimes allegedly causes SIGSEGV. */ |
| 166 | #undef HAVE_UTIMES /* override configuration decision */ |
| 167 | |
| 168 | /* AIX defines FIONREAD, but it does not work. */ |
| 169 | #define BROKEN_FIONREAD |
| 170 | |
| 171 | /* rocky@watson.ibm.com says this is needed. */ |
| 172 | #define HAVE_FTIME |
Note: See TracBrowser for help on using the browser.
