home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / emacs / src / m-ibmrt-aix.h < prev    next >
C/C++ Source or Header  |  1991-01-08  |  7KB  |  197 lines

  1. /* RTPC AIX machine/system dependent defines
  2.    Copyright (C) 1988 Free Software Foundation, Inc.
  3.  
  4. This file is part of GNU Emacs.
  5.  
  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 1, or (at your option)
  9. any later version.
  10.  
  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.
  15.  
  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.  */
  19.  
  20.  
  21. /* The following three symbols give information on
  22.  the size of various data types.  */
  23.  
  24. #define SHORTBITS 16        /* Number of bits in a short */
  25.  
  26. #define INTBITS 32        /* Number of bits in an int */
  27.  
  28. #define LONGBITS 32        /* Number of bits in a long */
  29.  
  30. /* Define BIG_ENDIAN iff lowest-numbered byte in a word
  31.    is the most significant byte.  */
  32.  
  33. #define BIG_ENDIAN
  34.  
  35. /* Define NO_ARG_ARRAY if you cannot take the address of the first of a
  36.  * group of arguments and treat it as an array of the arguments.  */
  37.  
  38. #define NO_ARG_ARRAY
  39.  
  40. /* Define how to take a char and sign-extend into an int.
  41.    On machines where char is signed, this is a no-op.  */
  42.  
  43. #define SIGN_EXTEND_CHAR(c) ((((int) (c)) << 24) >> 24)
  44.  
  45. /* Now define a symbol for the cpu type, if your compiler
  46.    does not define it automatically.  */
  47.  
  48. #define IBMRTAIX
  49.  
  50. #ifndef AIX
  51. #define AIX
  52. #endif
  53.  
  54. /* Use type int rather than a union, to represent Lisp_Object */
  55. /* This is desirable for most machines.  */
  56.  
  57. #define NO_UNION_TYPE
  58.  
  59. /* No load average information appears in the AIX kernel.  VRM has this
  60.    info, and if anyone desires they should fix fns.c to get it out of VRM */
  61.  
  62. /* Define CANNOT_DUMP on machines where unexec does not work.
  63.    Then the function dump-emacs will not be defined
  64.    and temacs will do (load "loadup") automatically unless told otherwise.  */
  65.  
  66. /* #define CANNOT_DUMP */
  67.  
  68. /* Define addresses, macros, change some setup for dump */
  69.  
  70. #undef COFF
  71. #define NO_REMAP
  72. #undef static
  73.   /* Since NO_REMAP, problem with statics doesn't exist */
  74.  
  75. #define TEXT_START 0x10000000
  76. #define TEXT_END 0
  77. #define DATA_START 0x20000000
  78. #define DATA_END 0
  79.  
  80. /* The data segment in this machine always starts at address 0x20000000.
  81.    An address of data cannot be stored correctly in a Lisp object;
  82.    we always lose the high bits.  We must tell XPNTR to add them back.  */
  83.  
  84. #define DATA_SEG_BITS 0x20000000
  85.  
  86. #define N_BADMAG(x) BADMAG(x)
  87. #define N_TXTOFF(x) A_TEXTPOS(x)
  88. #define N_SYMOFF(x) A_SYMPOS(x)
  89. #define A_TEXT_OFFSET(HDR) sizeof(HDR)
  90. #define ADJUST_EXEC_HEADER \
  91.     unexec_text_start += sizeof(hdr); \
  92.     unexec_data_start = ohdr.a_dbase
  93. #undef ADDR_CORRECT
  94. #define ADDR_CORRECT(x) ((int)(x))
  95.  
  96. /* Define C_ALLOCA if this machine does not support a true alloca
  97.    and the one written in C should be used instead.
  98.    Define HAVE_ALLOCA to say that the system provides a properly
  99.    working alloca function and it should be used.
  100.    Define neither one if an assembler-language alloca
  101.    in the file alloca.s should be used.  */
  102.  
  103. #define C_ALLOCA
  104. #define STACK_DIRECTION -1 /* tell alloca.c which way it grows */
  105.  
  106.  
  107. /* AIX has PTYs, so define here, along with defines needed to make them work. */
  108. /* AIX has one problem related to PTYs though: SIGHUP is seen by the parent   */
  109. /* along with SIGCHLD when the child dies.  Thus we need to ignore SIGHUP     */
  110. /* once a process is begun on a PTY.  EMACS may not go away when its tty      */
  111. /* goes away because of this -- if this is a problem, either comment out the  */
  112. /* def of HAVE_PTYS below, or set process-connection-type to nil in .emacs.   */
  113.  
  114. #define HAVE_PTYS
  115. #define PTY_ITERATION for (i=0; i<256; i++)
  116. #define PTY_NAME_SPRINTF sprintf (pty_name, "/dev/ptc%d", i);
  117. #define PTY_TTY_NAME_SPRINTF                                    \
  118.         /* Check that server side not already open */           \
  119.         if ((ioctl(fd, PTYSTATUS, 0) & 0xFFFF) != 0) {          \
  120.             close(fd);                                          \
  121.             continue;                                           \
  122.         }                                                       \
  123.         sprintf (pty_name, "/dev/pts%d", i);
  124.  
  125. /* TIOCNOTTY isn't needed on AIX, but the rest of the conditionalized code 
  126.    in process.c does properly begin a new process group if we fake this out.
  127.    On AIX 2.2 TIOCNOTTY is defined in termio.h, and this will be overriden 
  128.    by that definition appropriately.  */
  129.  
  130. #define TIOCNOTTY IOCTYPE
  131.  
  132. /* AIX has IPC. It also has sockets, and either can be used for client/server.
  133.    I would suggest the client/server code be changed to use HAVE_SOCKETS rather
  134.    than BSD as the conditional if sockets provide any advantages.  */
  135.  
  136. #define HAVE_SYSVIPC
  137.  
  138. /* AIX has sockets */
  139.  
  140. #define HAVE_SOCKETS
  141. /* #define SKTPAIR */ /* SKTPAIR works, but what is advantage over pipes? */
  142.  
  143. /* Specify the font for X to use.  */
  144.  
  145. #define X_DEFAULT_FONT "Rom14.500"
  146.  
  147. /* Here override various assumptions in ymakefile */
  148.  
  149. /* On AIX 2.2.1, use these definitions instead
  150. #define C_SWITCH_MACHINE -I/usr/include -Nn2000
  151. #define LIBS_MACHINE -lrts
  152. #define LIBX10_MACHINE -lrts
  153. #define LIBX11_MACHINE -lrts
  154. */
  155.  
  156. #define C_SWITCH_MACHINE -I/usr/include -I/usr/include/bsd -Nn2000
  157. /* need to duplicate -lsock -lbsd -lrts so refs in libX can be resolved   */
  158. /* order of lib specs in ymakefile should probably be changed.            */
  159. #define LIBS_MACHINE -lsock -lbsd -lrts
  160. #define LIBX10_MACHINE -lsock -lbsd -lrts
  161. #define LIBX11_MACHINE -lsock -lbsd -lrts
  162.  
  163. #define OBJECTS_MACHINE hftctl.o
  164. #define START_FILES /lib/crt0.o
  165. #define LD_SWITCH_MACHINE -n -T0x10000000 -K -e start
  166.  
  167. #if 0 /* I refuse to promulgate a recommendation that would make
  168.          users unable to debug - RMS.  */
  169. /* delete the following line to foil optimization, enable debugging */
  170. #define C_DEBUG_SWITCH -O
  171. #endif
  172.  
  173.  
  174. /* Setup to do some things BSD way - these won't work previous to AIX 2.1.2 */
  175.  
  176. #define bzero(t,s) (memset((t),(0),(s)))
  177. #define bcmp(f,t,s)     (memcmp((t),(f),(s)))
  178. #define vfork fork
  179. #define killpg( pgrp, sig )  (kill( -(pgrp), (sig) ))
  180.  
  181. #define BSTRING
  182. #define HAVE_DUP2
  183. #define HAVE_GETTIMEOFDAY
  184. #define HAVE_SELECT
  185. #define HAVE_TIMEVAL
  186. #define HAVE_VFORK
  187.  
  188. /* But don't use utimes() -- it causes SIGSEGV!  Use utime() instead. */
  189. #define USE_UTIME
  190.  
  191. /* getwd is in same object module as getcwd in AIX 2.2, but doesn't exist */
  192. /* at all in 2.1.2.  So, for compatibility, avoid name collision on 2.2 */
  193. #define getwd AIX_getwd
  194.  
  195. /* AIX defines FIONREAD, but it does not work.  */
  196. #define BROKEN_FIONREAD
  197.