Mercurial > hg > xemacs-beta
comparison src/s/sol2.h @ 163:0132846995bd r20-3b8
Import from CVS: tag r20-3b8
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:43:35 +0200 |
parents | 6b37e6ddd302 |
children | 85ec50267440 |
comparison
equal
deleted
inserted
replaced
162:4de2936b4e77 | 163:0132846995bd |
---|---|
1 /* Synched up with: FSF 19.31. */ | 1 /* Synched up with: FSF 19.31. */ |
2 | 2 |
3 #define __EXTENSIONS__ | 3 #define __EXTENSIONS__ 1 |
4 #include "usg5-4-2.h" /* XEmacs change from 5-4 to 5-4-2 */ | 4 #define SOLARIS2 1 |
5 #define POSIX 1 | |
6 #if 1 | |
7 #ifndef USG | |
8 #define USG | |
9 #endif | |
10 #ifndef USG5_4 | |
11 #define USG5_4 | |
12 #endif | |
13 #if 0 | |
14 #undef SYSTEM_TYPE | |
15 #define SYSTEM_TYPE "solaris" | |
16 #endif | |
17 #undef _POSIX_C_SOURCE | |
18 #if 0 | |
19 #define _POSIX_C_SOURCE 199506L | |
20 #endif | |
21 #undef _XOPEN_SOURCE | |
22 #define _XOPEN_SOURCE 1 | |
23 #undef _XOPEN_SOURCE_EXTENDED | |
24 #define _XOPEN_SOURCE_EXTENDED 1 | |
25 #endif | |
5 | 26 |
6 #define SOLARIS2 | 27 #if 1 /* mrb */ |
28 #include "usg5-4-2.h" /* XEmacs change from 5-4 to 5-4-2 */ | |
29 #endif | |
7 | 30 |
8 /* SIGIO seems to be working under Solaris and it makes ^G work better... */ | 31 /* SIGIO seems to be working under Solaris and it makes ^G work better... */ |
9 #undef BROKEN_SIGIO | 32 #undef BROKEN_SIGIO |
10 | 33 |
11 /* eggert@twinsun.com said these work in Solaris. | 34 /* eggert@twinsun.com said these work in Solaris. |
12 Perhaps they work in all kinds of SVR4, but this is more conservative. */ | 35 Perhaps they work in all kinds of SVR4, but this is more conservative. */ |
13 #undef BROKEN_TIOCGETC | 36 #undef BROKEN_TIOCGETC |
14 #undef BROKEN_TIOCGWINSZ | 37 #undef BROKEN_TIOCGWINSZ |
15 | 38 |
16 /* This triggers a conditional in xfaces.c. */ | |
17 #define XOS_NEEDS_TIME_H | |
18 | |
19 #define POSIX | |
20 | |
21 #ifdef NOT_C_CODE | 39 #ifdef NOT_C_CODE |
22 | 40 #define ORDINARY_LINK |
23 /* XEmacs change -- some Motif packages need -lgen to get regex and regcmp */ | 41 /* XEmacs change -- some Motif packages need -lgen to get regex and regcmp */ |
24 | 42 |
25 #undef LIBS_SYSTEM | 43 #undef LIBS_SYSTEM |
26 #define LIBS_SYSTEM "-lsocket -lnsl -lelf -lgen -ldl" | 44 #define LIBS_SYSTEM "-lsocket -lnsl -lelf -lgen -ldl" |
27 | 45 |
36 block SIGCHLD around the call to grantpt(). This | 54 block SIGCHLD around the call to grantpt(). This |
37 is *not* in 19.29 and is almost certainly incorrect. | 55 is *not* in 19.29 and is almost certainly incorrect. |
38 */ | 56 */ |
39 | 57 |
40 #undef UNEXEC | 58 #undef UNEXEC |
59 #if OS_RELEASE < 56 | |
41 #define UNEXEC "unexsol2.o" | 60 #define UNEXEC "unexsol2.o" |
61 #else | |
62 #define UNEXEC "unexsol2-6.o" | |
63 #endif | |
42 | 64 |
43 #else /* C_CODE */ | 65 #else /* C_CODE */ |
44 /* The standard Solaris library nsl has this function in it which is | 66 |
45 supposed to only be in the BSD compat stuff. Yuck. Of course, | 67 #if OS_RELEASE <= 53 |
46 there isn't a prototype for it other than in /usr/ucbinclude. */ | 68 /* Solaris 2.3 has a bug in XListFontsWithInfo. */ |
47 int gethostname (char *, size_t); | 69 #define BROKEN_XLISTFONTSWITHINFO |
70 #endif | |
71 | |
72 /* 2.5 now has random back in libc but we don't want to use it. */ | |
73 #if OS_RELEASE >= 55 | |
74 #undef HAVE_RANDOM | |
75 /* Apparently not necessary here, and it causes 10% CPU chewage. */ | |
76 #undef BROKEN_SIGCHLD | |
77 #endif /* >= SunOS 5.5 */ | |
78 | |
79 /* XEmacs addition: Raymond Toy says XEmacs completely misses SIGCHLD | |
80 when compiled with GCC 2.7.0 (but not, apparently, with SunPro C?), | |
81 X11R6, and Solaris 2.4. | |
82 | |
83 Someone else submitted a simple test program that duplicates this | |
84 behavior, and says it has something to do with the fact that X11R6 | |
85 links with the threads library. */ | |
86 | |
87 #ifdef THIS_IS_X11R6 | |
88 #define BROKEN_SIGCHLD | |
89 #endif | |
90 | |
91 #if OS_RELEASE == 55 | |
92 /* Solaris 2.5 is the first Solaris that has getpagesize(), srandom() | |
93 and random(), but they forgot to add prototypes to the header | |
94 files. */ | |
95 int getpagesize (void); | |
96 long random (void); | |
97 void srandom (unsigned int seed); | |
98 #endif /* SunOS 5.5 */ | |
99 | |
100 #if OS_RELEASE < 55 | |
48 /* Another missing prototype, added in Solaris 2.5 */ | 101 /* Another missing prototype, added in Solaris 2.5 */ |
49 extern void *__builtin_alloca(size_t); | 102 extern void *__builtin_alloca(size_t); |
103 #endif /* before SunOS 5.5 */ | |
50 | 104 |
105 #if OS_RELEASE < 56 | |
51 /* XEmacs: Solaris include files miss this. */ | 106 /* XEmacs: Solaris include files miss this. */ |
52 struct timeval; | 107 struct timeval; |
53 int utimes (char *file, struct timeval *tvp); | 108 int utimes (char *file, struct timeval *tvp); |
109 extern int gethostname(char *, unsigned); | |
110 #endif /* before SunOS 5.6 */ | |
111 | |
112 #include <sys/utsname.h> /* warning: macro redefined: SYS_NMLN */ | |
54 | 113 |
55 /* Get non-ANSI functions from ANSI header files in cc -Xc mode. | 114 /* Get non-ANSI functions from ANSI header files in cc -Xc mode. |
56 Sun has promised to fix setjmp.h */ | 115 Sun has promised to fix setjmp.h */ |
57 #if __STDC__ == 1 && defined(__SUNPRO_C) | 116 #if __STDC__ == 1 && defined(__SUNPRO_C) |
58 #define _POSIX_C_SOURCE 1 | 117 #define _POSIX_C_SOURCE 1 |
62 | 121 |
63 /* XEmacs: Solaris has sigsetjmp but using it leads to core dumps at | 122 /* XEmacs: Solaris has sigsetjmp but using it leads to core dumps at |
64 least under 2.4 */ | 123 least under 2.4 */ |
65 #undef _setjmp | 124 #undef _setjmp |
66 #define _setjmp setjmp | 125 #define _setjmp setjmp |
126 | |
67 #endif /* C_CODE */ | 127 #endif /* C_CODE */ |