0
|
1 /* Synched up with: FSF 19.31. */
|
|
2
|
163
|
3 #define SOLARIS2 1
|
|
4 #define POSIX 1
|
169
|
5
|
163
|
6 #ifndef USG
|
|
7 #define USG
|
|
8 #endif
|
169
|
9
|
163
|
10 #ifndef USG5_4
|
|
11 #define USG5_4
|
|
12 #endif
|
169
|
13
|
|
14 #define __EXTENSIONS__ 1
|
|
15
|
163
|
16 #undef _POSIX_C_SOURCE
|
169
|
17
|
|
18 /* Solaris 2.4 math.h doesn't respect __EXTENSIONS__ */
|
|
19 #ifndef NOT_C_CODE
|
|
20
|
|
21 #if OS_RELEASE <= 54
|
|
22 #include <math.h>
|
|
23 #endif /* <= Solaris 2.4 */
|
|
24
|
|
25 /* Fix understandable GCC lossage on Solaris 2.6 */
|
|
26 #if OS_RELEASE >= 56
|
|
27 #ifdef __GNUC__
|
|
28 #define __GNUC_VA_LIST
|
|
29 #define _VA_LIST_
|
|
30 #define _VA_LIST va_list
|
|
31 typedef void *__gnuc_va_list;
|
|
32 typedef __gnuc_va_list va_list;
|
|
33 #endif /* GCC */
|
|
34 #endif /* >= Solaris 2.6 */
|
|
35
|
|
36 #endif /* C code */
|
|
37
|
163
|
38 #undef _XOPEN_SOURCE
|
169
|
39 #define _XOPEN_SOURCE 1
|
|
40
|
167
|
41 #undef _XOPEN_SOURCE_EXTENDED
|
163
|
42 #define _XOPEN_SOURCE_EXTENDED 1
|
0
|
43
|
163
|
44 #include "usg5-4-2.h" /* XEmacs change from 5-4 to 5-4-2 */
|
169
|
45 #undef PC /* Defined in x86 /usr/include/sys/reg.h */
|
0
|
46
|
|
47 /* SIGIO seems to be working under Solaris and it makes ^G work better... */
|
|
48 #undef BROKEN_SIGIO
|
|
49
|
|
50 /* eggert@twinsun.com said these work in Solaris.
|
|
51 Perhaps they work in all kinds of SVR4, but this is more conservative. */
|
|
52 #undef BROKEN_TIOCGETC
|
|
53 #undef BROKEN_TIOCGWINSZ
|
|
54
|
157
|
55 #ifdef NOT_C_CODE
|
163
|
56 #define ORDINARY_LINK
|
151
|
57 /* XEmacs change -- some Motif packages need -lgen to get regex and regcmp */
|
0
|
58
|
|
59 #undef LIBS_SYSTEM
|
157
|
60 #define LIBS_SYSTEM "-lsocket -lnsl -lelf -lgen -ldl"
|
0
|
61
|
|
62 /* SYSTEM_MALLOC must be defined if dbx/RTC is going to be used. dbx/RTC does
|
|
63 not work with a static definition of malloc(). */
|
|
64 /* We want to be able to test out ralloc.c. */
|
|
65 /* #define SYSTEM_MALLOC */
|
|
66
|
|
67 /* XEmacs: there used to be a special definition of
|
|
68 PTY_TTY_NAME_SPRINTF here that was identical to the
|
|
69 other SYSV R4 definitions except that it didn't
|
|
70 block SIGCHLD around the call to grantpt(). This
|
|
71 is *not* in 19.29 and is almost certainly incorrect.
|
|
72 */
|
|
73
|
151
|
74 #undef UNEXEC
|
163
|
75 #if OS_RELEASE < 56
|
157
|
76 #define UNEXEC "unexsol2.o"
|
163
|
77 #else
|
|
78 #define UNEXEC "unexsol2-6.o"
|
|
79 #endif
|
157
|
80
|
|
81 #else /* C_CODE */
|
163
|
82
|
|
83 #if OS_RELEASE <= 53
|
|
84 /* Solaris 2.3 has a bug in XListFontsWithInfo. */
|
|
85 #define BROKEN_XLISTFONTSWITHINFO
|
|
86 #endif
|
|
87
|
|
88 /* 2.5 now has random back in libc but we don't want to use it. */
|
|
89 #if OS_RELEASE >= 55
|
|
90 #undef HAVE_RANDOM
|
|
91 /* Apparently not necessary here, and it causes 10% CPU chewage. */
|
|
92 #undef BROKEN_SIGCHLD
|
|
93 #endif /* >= SunOS 5.5 */
|
|
94
|
|
95 /* XEmacs addition: Raymond Toy says XEmacs completely misses SIGCHLD
|
|
96 when compiled with GCC 2.7.0 (but not, apparently, with SunPro C?),
|
|
97 X11R6, and Solaris 2.4.
|
|
98
|
|
99 Someone else submitted a simple test program that duplicates this
|
|
100 behavior, and says it has something to do with the fact that X11R6
|
|
101 links with the threads library. */
|
|
102
|
|
103 #ifdef THIS_IS_X11R6
|
|
104 #define BROKEN_SIGCHLD
|
|
105 #endif
|
|
106
|
|
107 #if OS_RELEASE < 55
|
167
|
108 /* Missing prototype, added in Solaris 2.5 */
|
157
|
109 extern void *__builtin_alloca(size_t);
|
163
|
110 #endif /* before SunOS 5.5 */
|
157
|
111
|
169
|
112 #if OS_RELEASE == 55
|
|
113 /* The following functions were added in Solaris 2.5,
|
|
114 but they forgot to add prototypes to the system header files. */
|
|
115 int getpagesize (void);
|
|
116 long random (void);
|
|
117 void srandom (unsigned int seed);
|
|
118 int usleep(unsigned int useconds);
|
|
119 #endif /* SunOS 5.5 */
|
|
120
|
163
|
121 #if OS_RELEASE < 56
|
167
|
122 /* Missing prototypes, added in Solaris 2.6 */
|
157
|
123 struct timeval;
|
|
124 int utimes (char *file, struct timeval *tvp);
|
167
|
125 int gethostname(char *name, int namelen);
|
163
|
126 #endif /* before SunOS 5.6 */
|
|
127
|
169
|
128 #if defined(__GNUC__) && OS_RELEASE >= 56
|
|
129 /* Missing prototypes for functions added in Solaris 2.6 */
|
|
130 struct msghdr;
|
|
131 struct sockaddr;
|
|
132 extern int __xnet_bind(int, const struct sockaddr *, size_t);
|
|
133 extern int __xnet_listen(int, int);
|
|
134 extern int __xnet_connect(int, const struct sockaddr *, size_t);
|
|
135 extern ssize_t __xnet_recvmsg(int, struct msghdr *, int);
|
|
136 extern ssize_t __xnet_sendmsg(int, const struct msghdr *, int);
|
|
137 extern ssize_t __xnet_sendto(int, const void *, size_t, int, const struct sockaddr *, size_t);
|
|
138 extern int __xnet_socket(int, int, int);
|
|
139 extern int __xnet_socketpair(int, int, int, int *);
|
|
140 extern int __xnet_getsockopt(int, int, int, void *, size_t *);
|
|
141 #endif /* GCC && >= SunOS 5.6 */
|
|
142
|
163
|
143 #include <sys/utsname.h> /* warning: macro redefined: SYS_NMLN */
|
157
|
144
|
|
145 /* Get non-ANSI functions from ANSI header files in cc -Xc mode.
|
|
146 Sun has promised to fix setjmp.h */
|
|
147 #if __STDC__ == 1 && defined(__SUNPRO_C)
|
|
148 #define _POSIX_C_SOURCE 1
|
|
149 #include <setjmp.h>
|
|
150 #undef _POSIX_C_SOURCE
|
|
151 #endif /* cc -Xc */
|
0
|
152
|
|
153 /* XEmacs: Solaris has sigsetjmp but using it leads to core dumps at
|
|
154 least under 2.4 */
|
|
155 #undef _setjmp
|
|
156 #define _setjmp setjmp
|
163
|
157
|
157
|
158 #endif /* C_CODE */
|