comparison src/s/sol2.h @ 157:6b37e6ddd302 r20-3b5

Import from CVS: tag r20-3b5
author cvs
date Mon, 13 Aug 2007 09:40:41 +0200
parents 59463afc5666
children 0132846995bd
comparison
equal deleted inserted replaced
156:60baf0b43294 157:6b37e6ddd302
16 /* This triggers a conditional in xfaces.c. */ 16 /* This triggers a conditional in xfaces.c. */
17 #define XOS_NEEDS_TIME_H 17 #define XOS_NEEDS_TIME_H
18 18
19 #define POSIX 19 #define POSIX
20 20
21 #ifndef NOT_C_CODE 21 #ifdef NOT_C_CODE
22 /* The standard Solaris library nsl has this function in it which is
23 supposed to only be in the BSD compat stuff. Yuck. Of course,
24 there isn't a prototype for it other than in /usr/ucbinclude. */
25 int gethostname (char *, size_t);
26 /* Another missing prototype, added in Solaris 2.5 */
27 extern void *__builtin_alloca(size_t);
28
29 /* Get non-ANSI functions from ANSI header files in cc -Xc mode.
30 Sun has promised to fix setjmp.h */
31 #if __STDC__ == 1
32 #ifndef __GNUC__
33 #define _POSIX_C_SOURCE 1
34 #include <setjmp.h>
35 #undef _POSIX_C_SOURCE
36 #endif /* __GNUC__ */
37 #endif /* __STDC__ */
38
39 /* XEmacs: Solaris include files miss this. */
40 struct timeval;
41 int utimes (char *file, struct timeval *tvp);
42
43 /* XEmacs addition: to this to avoid having problems when we later
44 define INT_MAX etc. */
45 #include <limits.h>
46 #endif /* C_CODE */
47 22
48 /* XEmacs change -- some Motif packages need -lgen to get regex and regcmp */ 23 /* XEmacs change -- some Motif packages need -lgen to get regex and regcmp */
49 24
50 #undef LIBS_SYSTEM 25 #undef LIBS_SYSTEM
51 #define LIBS_SYSTEM -lsocket -lnsl -lelf -lgen -ldl 26 #define LIBS_SYSTEM "-lsocket -lnsl -lelf -lgen -ldl"
52 27
53 /* SYSTEM_MALLOC must be defined if dbx/RTC is going to be used. dbx/RTC does 28 /* SYSTEM_MALLOC must be defined if dbx/RTC is going to be used. dbx/RTC does
54 not work with a static definition of malloc(). */ 29 not work with a static definition of malloc(). */
55 /* We want to be able to test out ralloc.c. */ 30 /* We want to be able to test out ralloc.c. */
56 /* #define SYSTEM_MALLOC */ 31 /* #define SYSTEM_MALLOC */
60 other SYSV R4 definitions except that it didn't 35 other SYSV R4 definitions except that it didn't
61 block SIGCHLD around the call to grantpt(). This 36 block SIGCHLD around the call to grantpt(). This
62 is *not* in 19.29 and is almost certainly incorrect. 37 is *not* in 19.29 and is almost certainly incorrect.
63 */ 38 */
64 39
65 /* XEmacs change from Georg.Nikodym@Canada.Sun.COM. */
66 #ifdef UNEXEC
67 #undef UNEXEC 40 #undef UNEXEC
68 #endif 41 #define UNEXEC "unexsol2.o"
69 #define UNEXEC unexsol2.o 42
43 #else /* C_CODE */
44 /* The standard Solaris library nsl has this function in it which is
45 supposed to only be in the BSD compat stuff. Yuck. Of course,
46 there isn't a prototype for it other than in /usr/ucbinclude. */
47 int gethostname (char *, size_t);
48 /* Another missing prototype, added in Solaris 2.5 */
49 extern void *__builtin_alloca(size_t);
50
51 /* XEmacs: Solaris include files miss this. */
52 struct timeval;
53 int utimes (char *file, struct timeval *tvp);
54
55 /* Get non-ANSI functions from ANSI header files in cc -Xc mode.
56 Sun has promised to fix setjmp.h */
57 #if __STDC__ == 1 && defined(__SUNPRO_C)
58 #define _POSIX_C_SOURCE 1
59 #include <setjmp.h>
60 #undef _POSIX_C_SOURCE
61 #endif /* cc -Xc */
70 62
71 /* XEmacs: Solaris has sigsetjmp but using it leads to core dumps at 63 /* XEmacs: Solaris has sigsetjmp but using it leads to core dumps at
72 least under 2.4 */ 64 least under 2.4 */
73 #undef _setjmp 65 #undef _setjmp
74 #define _setjmp setjmp 66 #define _setjmp setjmp
67 #endif /* C_CODE */