]>
Commit | Line | Data |
---|---|---|
41abdfbd | 1 | /* Parameters for hosting on an RS6000, for GDB, the GNU debugger. |
6edd74ae | 2 | Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. |
41abdfbd JG |
3 | Contributed by IBM Corporation. |
4 | ||
5 | This file is part of GDB. | |
6 | ||
7 | This program 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 2 of the License, or | |
10 | (at your option) any later version. | |
11 | ||
12 | This program 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 this program; if not, write to the Free Software | |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
20 | ||
82eabd43 JG |
21 | /* The following text is taken from config/rs6000.mh: |
22 | * # The IBM version of /usr/include/rpc/rpc.h has a bug -- it says | |
23 | * # `extern fd_set svc_fdset;' without ever defining the type fd_set. | |
24 | * # Unfortunately this occurs in the vx-share code, which is not configured | |
25 | * # like the rest of GDB (e.g. it doesn't include "defs.h"). | |
26 | * # We circumvent this bug by #define-ing fd_set here, but undefining it in | |
27 | * # the xm-rs6000.h file before ordinary modules try to use it. FIXME, IBM! | |
28 | * MH_CFLAGS='-Dfd_set=int' | |
29 | * So, here we do the undefine...which has to occur before we include | |
30 | * <sys/select.h> below. | |
31 | */ | |
32 | #undef fd_set | |
33 | ||
0d6d92c7 ILT |
34 | #include <sys/select.h> |
35 | ||
41abdfbd JG |
36 | /* Big end is at the low address */ |
37 | ||
38 | #define HOST_BYTE_ORDER BIG_ENDIAN | |
39 | ||
40 | #define HAVE_TERMIO 1 | |
41 | #define USG 1 | |
42 | #define HAVE_SIGSETMASK 1 | |
43 | ||
6edd74ae JG |
44 | /* AIX declares the mem functions differently than defs.h does. AIX is |
45 | right, but defs.h works on more old systems. For now, override it. */ | |
37e2f5cb | 46 | |
37e2f5cb DZ |
47 | #define MEM_FNS_DECLARED 1 |
48 | ||
41abdfbd JG |
49 | /* This system requires that we open a terminal with O_NOCTTY for it to |
50 | not become our controlling terminal. */ | |
51 | ||
52 | #define USE_O_NOCTTY | |
53 | ||
54 | /* Get rid of any system-imposed stack limit if possible. */ | |
55 | ||
56 | #define SET_STACK_LIMIT_HUGE | |
57 | ||
58 | /* Brain death inherited from PC's pervades. */ | |
59 | #undef NULL | |
60 | #define NULL 0 | |
61 | ||
62 | /* The IBM compiler requires this in order to properly compile alloca(). */ | |
63 | #pragma alloca | |
64 | ||
9b280a7f JG |
65 | /* There is no vfork. */ |
66 | ||
41abdfbd JG |
67 | #define vfork fork |
68 | ||
41abdfbd JG |
69 | /* Setpgrp() takes arguments, unlike ordinary Sys V's. */ |
70 | ||
818de002 | 71 | #define SETPGRP_ARGS 1 |
41abdfbd | 72 | |
6c6afbb9 PB |
73 | /* /usr/include/stdlib.h always uses void* and void, |
74 | even when __STDC__ isn't defined. */ | |
75 | #define MALLOC_INCOMPATIBLE | |
9aa44833 SG |
76 | extern void *malloc PARAMS ((size_t size)); |
77 | extern void *realloc PARAMS ((void *ptr, size_t size)); | |
78 | extern void free PARAMS ((void *)); | |
6c6afbb9 | 79 | |
9aa44833 SG |
80 | /* AIX doesn't have strdup, so we need to declare it for libiberty */ |
81 | extern char *strdup PARAMS ((char *)); | |
6edd74ae JG |
82 | |
83 | /* Signal handler for SIGWINCH `window size changed'. */ | |
84 | ||
85 | #define SIGWINCH_HANDLER aix_resizewindow | |
86 | extern void aix_resizewindow (); | |
87 | ||
88 | /* `lines_per_page' and `chars_per_line' are local to utils.c. Rectify this. */ | |
89 | ||
90 | #define SIGWINCH_HANDLER_BODY \ | |
91 | \ | |
92 | /* Respond to SIGWINCH `window size changed' signal, and reset GDB's \ | |
93 | window settings approproatelt. */ \ | |
94 | \ | |
95 | void \ | |
96 | aix_resizewindow () \ | |
97 | { \ | |
98 | int fd = fileno (stdout); \ | |
99 | if (isatty (fd)) { \ | |
100 | int val; \ | |
101 | \ | |
102 | val = atoi (termdef (fd, 'l')); \ | |
103 | if (val > 0) \ | |
104 | lines_per_page = val; \ | |
105 | val = atoi (termdef (fd, 'c')); \ | |
106 | if (val > 0) \ | |
107 | chars_per_line = val; \ | |
108 | } \ | |
109 | } |