aboutsummaryrefslogtreecommitdiffstats
path: root/mac
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2005-05-13 08:48:45 +0000
committerYAMAMOTO Mitsuharu2005-05-13 08:48:45 +0000
commit58f3150e5d226dea583a79c40c84c6741d80bd2d (patch)
tree02236817ef6b8cb967c52e3a1069ff4ba77ae52c /mac
parentbfd3cbc4773edf4110eb751d44596214e825c99c (diff)
downloademacs-58f3150e5d226dea583a79c40c84c6741d80bd2d.tar.gz
emacs-58f3150e5d226dea583a79c40c84c6741d80bd2d.zip
Sync with src/s/template.h. Don't include fcntl.h, time.h, or signal.h.
(index, rindex): New macros. [__MRC__] (sigmask, __signal_max, NSIG): Adjust signal numbers for compatibility with predefined ones. (PTR): Move from s-mac.h. (HAVE_PWD_H): Move to config.h. (volatile): Remove macro. [__MRC__] (strftime): Likewise. (read_input_waiting, sys_gmtime, sys_localtime, sys_ctime) (sys_time, sys_signal, atof): Remove declarations.
Diffstat (limited to 'mac')
-rw-r--r--mac/inc/s-mac.h77
1 files changed, 27 insertions, 50 deletions
diff --git a/mac/inc/s-mac.h b/mac/inc/s-mac.h
index 56f4df5941c..149d465f59f 100644
--- a/mac/inc/s-mac.h
+++ b/mac/inc/s-mac.h
@@ -53,8 +53,8 @@ Boston, MA 02111-1307, USA. */
53 53
54 Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO) 54 Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
55 55
56 Emacs uses the presence or absence of the SIGIO macro to indicate 56 Emacs uses the presence or absence of the SIGIO and BROKEN_SIGIO macros
57 whether or not signal-driven I/O is possible. It uses 57 to indicate whether or not signal-driven I/O is possible. It uses
58 INTERRUPT_INPUT to decide whether to use it by default. 58 INTERRUPT_INPUT to decide whether to use it by default.
59 59
60 SIGIO can be used only on systems that implement it (4.2 and 4.3). 60 SIGIO can be used only on systems that implement it (4.2 and 4.3).
@@ -96,8 +96,6 @@ Boston, MA 02111-1307, USA. */
96 96
97/* #define HAVE_PTYS */ 97/* #define HAVE_PTYS */
98 98
99#define HAVE_PWD_H 1
100
101/* 99/*
102 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate 100 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
103 * The 4.2 opendir, etc., library functions. 101 * The 4.2 opendir, etc., library functions.
@@ -148,6 +146,9 @@ Boston, MA 02111-1307, USA. */
148 is not ':', #define this to be the appropriate character constant. */ 146 is not ':', #define this to be the appropriate character constant. */
149/* #define SEPCHAR ':' */ 147/* #define SEPCHAR ':' */
150 148
149/* Define this if the system can use mmap for buffer text allocation. */
150/* #define USE_MMAP_FOR_BUFFERS 1 */
151
151/* ============================================================ */ 152/* ============================================================ */
152 153
153/* Here, add any special hacks needed 154/* Here, add any special hacks needed
@@ -164,6 +165,14 @@ Boston, MA 02111-1307, USA. */
164 165
165/* #define static */ 166/* #define static */
166 167
168/* If the system's imake configuration file defines `NeedWidePrototypes'
169 as `NO', we must define NARROWPROTO manually. Such a define is
170 generated in the Makefile generated by `xmkmf'. If we don't
171 define NARROWPROTO, we will see the wrong function prototypes
172 for X functions taking float or double parameters. */
173
174/* #define NARROWPROTO 1 */
175
167/* ============================================================ */ 176/* ============================================================ */
168 177
169/* After adding support for a new system, modify the large case 178/* After adding support for a new system, modify the large case
@@ -176,7 +185,12 @@ Boston, MA 02111-1307, USA. */
176 of known problems in that configuration should be updated. */ 185 of known problems in that configuration should be updated. */
177 186
178#ifdef __MRC__ 187#ifdef __MRC__
179#define __signal_max SIGTERM /* largest one in signal.h */ 188/* MrC predefines signal numbers as powers of 2. */
189#define sigmask(no) (((no) & (no) - 1) ? 1L << ((no) - 1) : (no))
190#define __signal_max 8 /* There's enough room for the following
191 signals between 8 and 16, and the
192 maximum predefined one (32) is less
193 than 8th power of 2. */
180#endif 194#endif
181 195
182#define SIGHUP (__signal_max+1) 196#define SIGHUP (__signal_max+1)
@@ -185,7 +199,12 @@ Boston, MA 02111-1307, USA. */
185#define SIGKILL (__signal_max+4) 199#define SIGKILL (__signal_max+4)
186#define SIGALRM (__signal_max+5) 200#define SIGALRM (__signal_max+5)
187#define SIGPIPE (__signal_max+6) 201#define SIGPIPE (__signal_max+6)
202
203#ifdef __MRC__
204#define NSIG SIGTERM /* largest one in signal.h */
205#else
188#define NSIG (__signal_max+6) 206#define NSIG (__signal_max+6)
207#endif
189 208
190#ifdef __MRC__ 209#ifdef __MRC__
191#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base) 210#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)
@@ -230,19 +249,11 @@ Boston, MA 02111-1307, USA. */
230#define READ_BUF_SIZE (8 << 10) 249#define READ_BUF_SIZE (8 << 10)
231 250
232#include <utsname.h> 251#include <utsname.h>
233void read_input_waiting ();
234
235/* #define GETTIMEOFDAY_ONE_ARGUMENT */
236 252
237#define SYSV_SYSTEM_DIR 253#define SYSV_SYSTEM_DIR
238 254
239#define SYSTEM_MALLOC 255#define SYSTEM_MALLOC
240 256
241/* Constants such as O_RDONLY are defined in fcntl.h. Best solution is
242 really to patch individual files to include it: callproc.c, doc.c,
243 fileio.c, getloadavg.c, lread.c, and termcap.c. */
244#include <fcntl.h>
245
246#define _setjmp setjmp 257#define _setjmp setjmp
247#define _longjmp longjmp 258#define _longjmp longjmp
248 259
@@ -284,44 +295,10 @@ void read_input_waiting ();
284#define ctime sys_ctime 295#define ctime sys_ctime
285#define time sys_time 296#define time sys_time
286 297
287#ifndef bcmp 298#define index strchr
288#define bcmp(s1, s2, n) memcmp ((s1), (s2), (n)) 299#define rindex strrchr
289#endif
290#ifndef bcopy
291#define bcopy(s, d, n) memcpy ((d), (s), (n))
292#endif
293#ifndef bzero
294#define bzero(s, n) memset ((s), 0, (n))
295#endif
296
297extern char *index (const char *, int);
298
299/* MPW strftime broken for "%p" format */
300#ifdef __MRC__
301#define strftime sys_strftime
302#endif
303
304#include <time.h>
305/* Editfns.c includes types.h which indirectly includes time.h before config.h.
306 So gmtime (localtime) is defined and not sys_gmtime (sys_localtime). Define
307 here explicitly. */
308extern struct tm *sys_gmtime (const time_t *);
309extern struct tm *sys_localtime (const time_t *);
310extern char *sys_ctime (const time_t *);
311extern time_t sys_time (time_t *);
312
313/* Emacs.c includes signal.h before config.h. Define this to make it happy. */
314#ifdef __MRC__
315#include <signal.h>
316extern __sigfun sys_signal (int signal_num, __sigfun signal_func);
317#elif __MWERKS__
318#include <signal.h>
319extern __signal_func_ptr sys_signal (int signal_num, __signal_func_ptr signal_func);
320#endif
321
322extern double atof (const char *);
323 300
324#define volatile 301#define PTR POINTER_TYPE * /* For strftime.c. */
325 302
326#define SYMS_SYSTEM syms_of_mac() 303#define SYMS_SYSTEM syms_of_mac()
327 304