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