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