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