Commit | Line | Data |
---|---|---|
ea936fd7 SS |
1 | /* Macro definitions for running GDB on Apple Macintoshes. |
2 | Copyright (C) 1994 Free Software Foundation, Inc. | |
3 | ||
4 | This file is part of GDB. | |
5 | ||
6 | This program 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 of the License, or | |
9 | (at your option) any later version. | |
10 | ||
11 | This program 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 this program; if not, write to the Free Software | |
6c9638b4 | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
ea936fd7 SS |
19 | |
20 | #include "m68k/xm-m68k.h" | |
21 | ||
22 | #include "fopen-bin.h" | |
23 | ||
a2905ef8 SS |
24 | #include "spin.h" |
25 | ||
ea936fd7 SS |
26 | #define CANT_FORK |
27 | ||
a2905ef8 SS |
28 | #ifdef MPW_C |
29 | ||
ea936fd7 SS |
30 | /* MPW C is basically ANSI, but doesn't actually enable __STDC__, |
31 | nor does it allow __STDC__ to be #defined. */ | |
32 | ||
33 | #ifndef ALMOST_STDC | |
34 | #define ALMOST_STDC | |
35 | #endif | |
36 | ||
a2905ef8 SS |
37 | #endif /* MPW_C */ |
38 | ||
ea936fd7 SS |
39 | #ifdef BFD_TRUE_FALSE |
40 | #ifndef false | |
41 | #define false mpw_false | |
42 | #endif | |
43 | #ifndef true | |
44 | #define true mpw_true | |
45 | #endif | |
46 | #endif | |
47 | ||
48 | #ifdef MPW_C | |
49 | ||
50 | #undef __PTR_TO_INT | |
51 | #define __PTR_TO_INT(P) ((int)(P)) | |
52 | #undef __INT_TO_PTR | |
53 | #define __INT_TO_PTR(P) ((char *)(P)) | |
54 | ||
55 | #endif | |
56 | ||
57 | #include <stdio.h> | |
58 | ||
59 | FILE *mpw_fopen (); | |
60 | int mpw_fseek (); | |
61 | void mpw_abort (); | |
62 | ||
63 | /* Map these standard functions to improved versions in libiberty. */ | |
64 | ||
65 | #define fopen mpw_fopen | |
66 | #define open mpw_open | |
67 | #define fseek mpw_fseek | |
68 | #define abort mpw_abort | |
69 | ||
b8ec8d4a SS |
70 | /* Map these standard functions to versions that can do I/O in a console |
71 | window. */ | |
72 | ||
a6b26c44 SS |
73 | #define printf hacked_printf |
74 | #define fprintf hacked_fprintf | |
75 | #define vprintf hacked_vfprintf | |
76 | #define fputs hacked_fputs | |
77 | #define fputc hacked_fputc | |
78 | #undef putc | |
79 | #define putc hacked_putc | |
80 | #define fflush hacked_fflush | |
81 | ||
b8ec8d4a SS |
82 | #define fgetc hacked_fgetc |
83 | ||
ea936fd7 SS |
84 | /* Define as macros so as to mask the previous enum. */ |
85 | ||
86 | #ifndef BFD_TRUE_FALSE | |
87 | #ifndef false | |
88 | #define false ffalse | |
89 | #endif | |
90 | #ifndef true | |
91 | #define true ttrue | |
92 | #endif | |
93 | #endif | |
94 | ||
95 | #ifndef TRUE_FALSE_ALREADY_DEFINED | |
96 | #define TRUE_FALSE_ALREADY_DEFINED | |
97 | #endif | |
98 | ||
99 | #define POSIX_UTIME | |
100 | ||
101 | /* No declaration of strdup in MPW's string.h, oddly enough. */ | |
102 | ||
103 | char *strdup (char *s1); | |
104 | ||
105 | /* '.' indicates drivers on the Mac, so we need a different filename. */ | |
106 | ||
107 | #define GDBINIT_FILENAME "_gdbinit" | |
108 | ||
939baabe | 109 | /* Commas are more common to separate dirnames in a path on Macs. */ |
ea936fd7 | 110 | |
939baabe | 111 | #define DIRNAME_SEPARATOR ',' |
ea936fd7 SS |
112 | |
113 | /* This is a real crufty hack. */ | |
114 | ||
115 | #define HAVE_TERMIO | |
939baabe SS |
116 | |
117 | /* Addons to the basic MPW-supported signal list. */ | |
118 | ||
119 | #ifndef SIGQUIT | |
120 | #define SIGQUIT (1<<6) | |
121 | #endif | |
122 | #ifndef SIGHUP | |
123 | #define SIGHUP (1<<7) | |
124 | #endif | |
125 | ||
126 | /* If __STDC__ is on, then this definition will be missing. */ | |
127 | ||
128 | #ifndef fileno | |
129 | #define fileno(p) (p)->_file | |
130 | #endif | |
131 | ||
132 | #ifndef R_OK | |
133 | #define R_OK 4 | |
134 | #endif | |
a6b26c44 SS |
135 | |
136 | extern int StandAlone; | |
137 | ||
138 | extern int mac_app; |