Mercurial > hg > xemacs-beta
annotate src/s/sol2.h @ 5488:1e544fd7be12
Import looking-back from GNU Emacs.
-------------------- ChangeLog entries follow: --------------------
lisp/ChangeLog addition:
2011-04-30 Didier Verna <didier@xemacs.org>
* subr.el (looking-back): New function.
author | Didier Verna <didier@lrde.epita.fr> |
---|---|
date | Sat, 30 Apr 2011 17:38:35 +0200 |
parents | 8c406331e77e |
children | 1f0b15040456 |
rev | line source |
---|---|
5450
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
1 /* Copyright (C) 2000, 2003 Martin Buchholz |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
2 |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
3 This file is part of XEmacs. |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
4 |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
5 XEmacs is free software: you can redistribute it and/or modify it |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
6 under the terms of the GNU General Public License as published by the |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
7 Free Software Foundation, either version 3 of the License, or (at your |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
8 option) any later version. |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
9 |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
10 XEmacs is distributed in the hope that it will be useful, but WITHOUT |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
13 for more details. |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
14 |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
15 You should have received a copy of the GNU General Public License |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
16 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
17 |
8c406331e77e
Copyright and license to src/s/sol2.h.
Mats Lidell <matsl@xemacs.org>
parents:
4122
diff
changeset
|
18 |
428 | 19 /* Synched up with: Completely divergent from FSF. */ |
20 #define SOLARIS2 1 | |
21 #define POSIX 1 | |
22 | |
23 #ifndef USG | |
24 #define USG | |
25 #endif | |
26 | |
27 #ifndef USG5_4 | |
28 #define USG5_4 | |
29 #endif | |
30 | |
31 /* Fix understandable GCC lossage on Solaris 2.6 */ | |
4122 | 32 #if defined(__GNUC__) && OS_RELEASE >= 506 && OS_RELEASE < 510 && !defined(NOT_C_CODE) |
428 | 33 |
34 /* GCC va_list munging is a little messed up */ | |
35 #define __GNUC_VA_LIST | |
36 #define _VA_LIST_ | |
37 #define _VA_LIST va_list | |
38 typedef void *__gnuc_va_list; | |
39 typedef __gnuc_va_list va_list; | |
40 | |
41 /* Missing prototypes for functions added in Solaris 2.6 */ | |
42 #include <sys/types.h> | |
43 struct msghdr; | |
44 struct sockaddr; | |
45 extern int __xnet_bind (int, const struct sockaddr *, size_t); | |
46 extern int __xnet_listen (int, int); | |
47 extern int __xnet_connect (int, const struct sockaddr *, size_t); | |
48 extern ssize_t __xnet_recvmsg (int, struct msghdr *, int); | |
49 extern ssize_t __xnet_sendmsg (int, const struct msghdr *, int); | |
50 extern ssize_t __xnet_sendto (int, const void *, size_t, int, const struct sockaddr *, size_t); | |
51 extern int __xnet_socket (int, int, int); | |
52 extern int __xnet_socketpair (int, int, int, int *); | |
53 extern int __xnet_getsockopt (int, int, int, void *, size_t *); | |
54 #endif /* GCC && >= Solaris 2.6 && C code */ | |
55 | |
56 #include "usg5-4-2.h" /* XEmacs change from 5-4 to 5-4-2 */ | |
57 #undef PC /* Defined in x86 /usr/include/sys/reg.h */ | |
58 | |
59 /* SIGIO seems to be working under Solaris and it makes ^G work better... */ | |
60 #undef BROKEN_SIGIO | |
61 | |
62 /* eggert@twinsun.com said these work in Solaris. | |
63 Perhaps they work in all kinds of SVR4, but this is more conservative. */ | |
64 #undef BROKEN_TIOCGETC | |
65 #undef BROKEN_TIOCGWINSZ | |
66 | |
67 #ifdef NOT_C_CODE | |
68 #define ORDINARY_LINK | |
69 /* XEmacs change -- some Motif packages need -lgen to get regex and regcmp */ | |
70 | |
71 #undef LIBS_SYSTEM | |
72 #define LIBS_SYSTEM "-lsocket -lnsl -lelf -lgen -ldl" | |
73 | |
74 /* SYSTEM_MALLOC must be defined if dbx/RTC is going to be used. dbx/RTC does | |
75 not work with a static definition of malloc(). */ | |
76 /* We want to be able to test out ralloc.c. */ | |
77 /* #define SYSTEM_MALLOC */ | |
78 | |
79 /* XEmacs: there used to be a special definition of | |
80 PTY_TTY_NAME_SPRINTF here that was identical to the | |
81 other SYSV R4 definitions except that it didn't | |
82 block SIGCHLD around the call to grantpt(). This | |
83 is *not* in 19.29 and is almost certainly incorrect. | |
84 */ | |
85 | |
86 #undef UNEXEC | |
1692 | 87 #if OS_RELEASE < 506 |
428 | 88 #define UNEXEC "unexsol2.o" |
89 #else | |
90 #define UNEXEC "unexsol2-6.o" | |
91 #endif | |
92 | |
93 #else /* C_CODE */ | |
94 | |
1692 | 95 #if OS_RELEASE <= 503 |
428 | 96 /* Solaris 2.3 has a bug in XListFontsWithInfo. */ |
97 #define BROKEN_XLISTFONTSWITHINFO | |
98 #endif | |
99 | |
100 /* XEmacs addition: Raymond Toy says XEmacs completely misses SIGCHLD | |
101 when compiled with GCC 2.7.0 (but not, apparently, with SunPro C?), | |
102 X11R6, and Solaris 2.4. | |
103 | |
104 Someone else submitted a simple test program that duplicates this | |
105 behavior, and says it has something to do with the fact that X11R6 | |
106 links with the threads library. */ | |
107 | |
108 #ifdef THIS_IS_X11R6 | |
109 #define BROKEN_SIGCHLD | |
110 #endif | |
111 | |
1692 | 112 #if OS_RELEASE < 505 |
428 | 113 |
114 #if __STDC__ == 1 && defined(__SUNPRO_C) | |
115 #define _POSIX_C_SOURCE 1 | |
116 #include <setjmp.h> | |
117 #undef _POSIX_C_SOURCE | |
118 #endif /* cc -Xc */ | |
119 | |
120 /* Missing prototype, added in Solaris 2.5 */ | |
121 extern void *__builtin_alloca (size_t); | |
122 #endif /* before SunOS 5.5 */ | |
123 | |
1692 | 124 #if OS_RELEASE == 505 |
428 | 125 /* The following functions were added in Solaris 2.5, |
126 but they forgot to add prototypes to the system header files. */ | |
127 int getpagesize (void); | |
128 long random (void); | |
129 void srandom (unsigned int seed); | |
130 int usleep (unsigned int useconds); | |
131 #endif /* SunOS 5.5 */ | |
132 | |
133 /* 2.5 now has `random' back in libc but we don't want to use it. */ | |
1692 | 134 #if OS_RELEASE >= 505 |
428 | 135 #undef HAVE_RANDOM |
136 /* Apparently not necessary here, and it causes 10% CPU chewage. */ | |
137 #undef BROKEN_SIGCHLD | |
138 #endif /* >= SunOS 5.5 */ | |
139 | |
1692 | 140 #if OS_RELEASE < 506 |
428 | 141 /* Missing prototypes, added in Solaris 2.6 */ |
142 struct timeval; | |
143 int utimes (char *file, struct timeval *tvp); | |
144 int gethostname (char *name, int namelen); | |
145 #endif /* before SunOS 5.6 */ | |
146 | |
147 #include <sys/utsname.h> /* warning: macro redefined: SYS_NMLN */ | |
148 | |
149 /* XEmacs: Solaris has sigsetjmp but using it leads to core dumps at | |
150 least under 2.4 */ | |
151 #undef _setjmp | |
152 #define _setjmp setjmp | |
153 | |
154 #endif /* C_CODE */ |