0
|
1 /* Synched up with: FSF 19.31. */
|
|
2
|
|
3 /* For building XEmacs under SunOS 4.1.* with static libraries. */
|
|
4
|
|
5 #ifndef _S_SUNOS4_H_
|
|
6 #define _S_SUNOS4_H_
|
|
7
|
|
8 #include "bsd4-2.h"
|
|
9
|
|
10 #ifndef SUNOS4
|
|
11 #define SUNOS4
|
|
12 #endif
|
|
13
|
|
14 /* XEmacs addition: */
|
|
15 #ifndef HAVE_SYS_TIME_H
|
|
16 #define HAVE_SYS_TIME_H
|
|
17 #endif
|
|
18
|
|
19 #if 0 /* This may have been needed for an earlier version of Sun OS 4.
|
|
20 It seems to cause warnings in 4.0.3 and 4.1. */
|
|
21 #define O_NDELAY FNDELAY /* Non-blocking I/O (4.2 style) */
|
|
22 #endif
|
|
23
|
|
24 #ifdef NOT_C_CODE
|
|
25 /* The new sunOS unexec eliminates the need for a custom crt0.o, so we
|
|
26 can just let the compiler invoke the linker and don't have to guess
|
|
27 what options it might have passed it. */
|
|
28 # define ORDINARY_LINK
|
|
29 # define START_FILES
|
|
30 # define LD_CMD $(CC)
|
|
31 # ifndef LD_SWITCH_SYSTEM
|
|
32 # ifdef USE_GCC
|
|
33 /* of course gcc has to take different args than the rest of the universe */
|
157
|
34 # define LD_SWITCH_SYSTEM "-static"
|
0
|
35 # else
|
157
|
36 # define LD_SWITCH_SYSTEM "-Bstatic"
|
0
|
37 # endif
|
|
38 # endif
|
157
|
39 # define UNEXEC "unexsunos4.o"
|
0
|
40 #endif
|
|
41
|
|
42 #define RUN_TIME_REMAP
|
|
43
|
|
44 /* these don't matter, but we have to define something to keep
|
|
45 sysdep.c from introducing bogus symbols */
|
|
46 #define TEXT_START 0
|
|
47 #define DATA_START 0
|
|
48
|
|
49 /* XEmacs change -- Sun CC needs this to default to ANSI */
|
|
50 #if __SUNPRO_C
|
157
|
51 #define C_SWITCH_SYSTEM "-Xa"
|
0
|
52 #endif
|
|
53
|
|
54 /* #### XEmacs: #define of SYSTEM_MALLOC removed. Is this OK? FSF says:
|
|
55
|
|
56 In SunOS 4.1, a static function called by tzsetwall reportedly
|
|
57 clears the byte just past an eight byte region it mallocs, corrupting
|
|
58 GNU malloc's memory pool. But Sun's malloc doesn't seem to mind. */
|
|
59
|
|
60 /* XEmacs: additions for proper prototyping. */
|
|
61 #ifndef NOT_C_CODE
|
|
62 #ifdef __STDC__
|
|
63 /* Sun's headers are categorically losing.
|
|
64 Mly uses broken-sun.h to get the protos for this, but lcc provides all
|
|
65 of the prototypes for the ANSI routines. So I'm just going to put the
|
|
66 protos of the non-ANSI routines that we use here (I guess that would
|
|
67 be things that are Posix but not ANSI?) You're in a maze of twisty
|
|
68 little standards, all alike...
|
|
69 */
|
|
70 /* Since lcc is not going to be heavily used anymore if it ever was, I'm
|
|
71 putting broken-sun.h back in. */
|
157
|
72 #include "../broken-sun.h"
|
0
|
73 extern char *strdup ();
|
|
74 extern char *ttyname (int);
|
|
75 extern void tzsetwall (void);
|
|
76 extern int getpagesize (void);
|
|
77
|
|
78 #ifndef __SUNPRO_C
|
|
79 /* Bother! Sun can't even get the arg types right. */
|
|
80 #include <string.h> /* But we need to include this first because
|
|
81 *sometimes* (i.e. when using SparcWorks) the
|
|
82 correct prototypes are provided. */
|
|
83 #define memset(ptr, val, size) memset ((char *) ptr, val, size)
|
|
84 #define memcpy(dest, src, size) \
|
|
85 memcpy ((char *) dest, (CONST char *) src, size)
|
|
86 #define memcmp(src1, src2, size) \
|
|
87 memcmp ((CONST char *) src1, (CONST char *) src2, size)
|
|
88 #endif /* !__SUNPRO_C */
|
|
89
|
|
90 #endif /* __STDC__ */
|
|
91
|
|
92 # ifdef __GNUC__
|
|
93 /* XEmacs addition: */
|
2
|
94 /* gcc has the bug that it claims to conform to the ANSI C standard
|
0
|
95 (which is what setting __STDC__ to 1 means) but does not necessarily
|
|
96 provide all of the library routines which the standard requires of a
|
|
97 conforming compiler -- such as memmove. The other Sun ANSI compilers
|
|
98 (Sun's acc and Lucid's lcc) do not have this bug. */
|
|
99 # define memmove(to, from, size) bcopy ((char *) (from), (char *) (to), (size))
|
|
100 /* We must define mkdir with this arg prototype
|
|
101 to match GCC's fixed stat.h. */
|
|
102 # define MKDIR_PROTOTYPE \
|
|
103 int mkdir (const char *dpath, unsigned short dmode)
|
|
104 # endif /* __GNUC__ */
|
|
105
|
|
106 #endif /* !NOT_C_CODE */
|
|
107
|
|
108 #endif /* _S_SUNOS4_H_ */
|