]> code.delx.au - gnu-emacs/commitdiff
Sync with src/s/template.h. Don't include fcntl.h, time.h, or signal.h.
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Fri, 13 May 2005 08:48:45 +0000 (08:48 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Fri, 13 May 2005 08:48:45 +0000 (08:48 +0000)
(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.

mac/inc/s-mac.h

index 56f4df5941c10c9029a425ffac33820bf9953b4d..149d465f59fcbe2ee89c7bc4c505564bc77b8889 100644 (file)
@@ -53,8 +53,8 @@ Boston, MA 02111-1307, USA.  */
 
    Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
 
-   Emacs uses the presence or absence of the SIGIO macro to indicate
-   whether or not signal-driven I/O is possible.  It uses
+   Emacs uses the presence or absence of the SIGIO and BROKEN_SIGIO macros
+   to indicate whether or not signal-driven I/O is possible.  It uses
    INTERRUPT_INPUT to decide whether to use it by default.
 
    SIGIO can be used only on systems that implement it (4.2 and 4.3).
@@ -96,8 +96,6 @@ Boston, MA 02111-1307, USA.  */
 
 /* #define HAVE_PTYS */
 
-#define HAVE_PWD_H 1
-
 /*
  *     Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
  *      The 4.2 opendir, etc., library functions.
@@ -148,6 +146,9 @@ Boston, MA 02111-1307, USA.  */
    is not ':', #define this to be the appropriate character constant.  */
 /* #define SEPCHAR ':' */
 
+/* Define this if the system can use mmap for buffer text allocation.  */
+/* #define USE_MMAP_FOR_BUFFERS 1 */
+
 /* ============================================================ */
 
 /* Here, add any special hacks needed
@@ -164,6 +165,14 @@ Boston, MA 02111-1307, USA.  */
 
 /* #define static */
 
+/* If the system's imake configuration file defines `NeedWidePrototypes'
+   as `NO', we must define NARROWPROTO manually.  Such a define is
+   generated in the Makefile generated by `xmkmf'.  If we don't
+   define NARROWPROTO, we will see the wrong function prototypes
+   for X functions taking float or double parameters.  */
+
+/*  #define NARROWPROTO 1 */
+
 /* ============================================================ */
 
 /* After adding support for a new system, modify the large case
@@ -176,7 +185,12 @@ Boston, MA 02111-1307, USA.  */
    of known problems in that configuration should be updated.  */
 
 #ifdef __MRC__
-#define __signal_max SIGTERM /* largest one in signal.h */
+/* MrC predefines signal numbers as powers of 2.  */
+#define sigmask(no) (((no) & (no) - 1) ? 1L << ((no) - 1) : (no))
+#define __signal_max 8       /* There's enough room for the following
+                                signals between 8 and 16, and the
+                                maximum predefined one (32) is less
+                                than 8th power of 2.  */
 #endif
 
 #define SIGHUP (__signal_max+1)
@@ -185,7 +199,12 @@ Boston, MA 02111-1307, USA.  */
 #define SIGKILL (__signal_max+4)
 #define SIGALRM (__signal_max+5)
 #define SIGPIPE (__signal_max+6)
+
+#ifdef __MRC__
+#define NSIG SIGTERM  /* largest one in signal.h */
+#else
 #define NSIG (__signal_max+6)
+#endif
 
 #ifdef __MRC__
 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)
@@ -230,19 +249,11 @@ Boston, MA 02111-1307, USA.  */
 #define READ_BUF_SIZE (8 << 10)
 
 #include <utsname.h>
-void read_input_waiting ();
-
-/* #define GETTIMEOFDAY_ONE_ARGUMENT */
 
 #define SYSV_SYSTEM_DIR
 
 #define SYSTEM_MALLOC
 
-/* Constants such as O_RDONLY are defined in fcntl.h.  Best solution is
-   really to patch individual files to include it: callproc.c, doc.c,
-   fileio.c, getloadavg.c, lread.c, and termcap.c.  */
-#include <fcntl.h>
-
 #define _setjmp setjmp
 #define _longjmp longjmp
 
@@ -284,44 +295,10 @@ void read_input_waiting ();
 #define ctime sys_ctime
 #define time sys_time
 
-#ifndef bcmp
-#define bcmp(s1, s2, n)        memcmp ((s1), (s2), (n))
-#endif
-#ifndef bcopy
-#define bcopy(s, d, n) memcpy ((d), (s), (n))
-#endif
-#ifndef bzero
-#define bzero(s, n)    memset ((s), 0, (n))
-#endif
-
-extern char *index (const char *, int);
-
-/* MPW strftime broken for "%p" format */
-#ifdef __MRC__
-#define strftime sys_strftime
-#endif
-
-#include <time.h>
-/* Editfns.c includes types.h which indirectly includes time.h before config.h.
-   So gmtime (localtime) is defined and not sys_gmtime (sys_localtime).  Define
-   here explicitly.  */
-extern struct tm *sys_gmtime (const time_t *);
-extern struct tm *sys_localtime (const time_t *);
-extern char *sys_ctime (const time_t *);
-extern time_t sys_time (time_t *);
-
-/* Emacs.c includes signal.h before config.h.  Define this to make it happy.  */
-#ifdef __MRC__
-#include <signal.h>
-extern __sigfun sys_signal (int signal_num, __sigfun signal_func);
-#elif __MWERKS__
-#include <signal.h>
-extern __signal_func_ptr sys_signal (int signal_num, __signal_func_ptr signal_func);
-#endif
-
-extern double atof (const char *);
+#define index strchr
+#define rindex strrchr
 
-#define volatile
+#define PTR POINTER_TYPE *     /* For strftime.c.  */
 
 #define SYMS_SYSTEM syms_of_mac()