/[cparse]/cparse/test4.lisp
ViewVC logotype

Contents of /cparse/test4.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Tue Aug 29 20:31:54 2006 UTC (7 years, 7 months ago) by clynbech
Branch: MAIN
CVS Tags: HEAD
2006-08-29  Christian Lynbech  <christian@defun.dk>

	* test3.lisp: New file.
	* test4.lisp: New file.

	* uffi-alien.lisp (*cpp-args-defaults*): Removed "-D_BITS_PTHREADTYPES_H"
	and docstring instead.
	(make-alien-defs): Updated docstring.

	* cparse.system: Added CLC require for UFFI. Changed from defsystem to
	asdf. Added warning for the CMUCL hash fill bug.

	* 00debug.lisp: Added case for uffi-1.5.5 and uffi-1.5.15.
	Changed from defsystem to asdf.
	(*uffi*): changed to allow quicker switching.
1 (UNLESS (FIND-PACKAGE :DIR-TEST) (DEFPACKAGE :DIR-TEST (:SHADOW T)))
2
3 (IN-PACKAGE :DIR-TEST)
4
5 (PROGN
6 (UFFI:DEF-FOREIGN-TYPE SIZE-T :UNSIGNED-INT)
7 (UFFI:DEF-FOREIGN-TYPE --U-CHAR :UNSIGNED-CHAR)
8 (UFFI:DEF-FOREIGN-TYPE --U-SHORT :UNSIGNED-SHORT)
9 (UFFI:DEF-FOREIGN-TYPE --U-INT :UNSIGNED-INT)
10 (UFFI:DEF-FOREIGN-TYPE --U-LONG :UNSIGNED-LONG)
11 (UFFI:DEF-FOREIGN-TYPE --INT8-T :CHAR)
12 (UFFI:DEF-FOREIGN-TYPE --UINT8-T :UNSIGNED-CHAR)
13 (UFFI:DEF-FOREIGN-TYPE --INT16-T :SHORT)
14 (UFFI:DEF-FOREIGN-TYPE --UINT16-T :UNSIGNED-SHORT)
15 (UFFI:DEF-FOREIGN-TYPE --INT32-T :INT)
16 (UFFI:DEF-FOREIGN-TYPE --UINT32-T :UNSIGNED-INT)
17 (UFFI:DEF-FOREIGN-TYPE --INT64-T :LONG)
18 (UFFI:DEF-FOREIGN-TYPE --UINT64-T :UNSIGNED-LONG)
19 (UFFI:DEF-FOREIGN-TYPE --QUAD-T :LONG)
20 (UFFI:DEF-FOREIGN-TYPE --U-QUAD-T :UNSIGNED-LONG)
21 (UFFI:DEF-FOREIGN-TYPE --DEV-T :UNSIGNED-LONG)
22 (UFFI:DEF-FOREIGN-TYPE --UID-T :UNSIGNED-INT)
23 (UFFI:DEF-FOREIGN-TYPE --GID-T :UNSIGNED-INT)
24 (UFFI:DEF-FOREIGN-TYPE --INO-T :UNSIGNED-LONG)
25 (UFFI:DEF-FOREIGN-TYPE --INO64-T :UNSIGNED-LONG)
26 (UFFI:DEF-FOREIGN-TYPE --MODE-T :UNSIGNED-INT)
27 (UFFI:DEF-FOREIGN-TYPE --NLINK-T :UNSIGNED-INT)
28 (UFFI:DEF-FOREIGN-TYPE --OFF-T :LONG)
29 (UFFI:DEF-FOREIGN-TYPE --OFF64-T :LONG)
30 (UFFI:DEF-FOREIGN-TYPE --PID-T :INT)
31 (UFFI:DEF-FOREIGN-TYPE --FSID-T (:STRUCT NIL (--VAL (:ARRAY :INT 2))))
32 (UFFI:DEF-FOREIGN-TYPE --CLOCK-T :LONG)
33 (UFFI:DEF-FOREIGN-TYPE --RLIM-T :UNSIGNED-LONG)
34 (UFFI:DEF-FOREIGN-TYPE --RLIM64-T :UNSIGNED-LONG)
35 (UFFI:DEF-FOREIGN-TYPE --ID-T :UNSIGNED-INT)
36 (UFFI:DEF-FOREIGN-TYPE --TIME-T :LONG)
37 (UFFI:DEF-FOREIGN-TYPE --USECONDS-T :UNSIGNED-INT)
38 (UFFI:DEF-FOREIGN-TYPE --SUSECONDS-T :LONG)
39 (UFFI:DEF-FOREIGN-TYPE --DADDR-T :INT)
40 (UFFI:DEF-FOREIGN-TYPE --SWBLK-T :LONG)
41 (UFFI:DEF-FOREIGN-TYPE --KEY-T :INT)
42 (UFFI:DEF-FOREIGN-TYPE --CLOCKID-T :INT)
43 (UFFI:DEF-FOREIGN-TYPE --TIMER-T :INT)
44 (UFFI:DEF-FOREIGN-TYPE --BLKSIZE-T :LONG)
45 (UFFI:DEF-FOREIGN-TYPE --BLKCNT-T :LONG)
46 (UFFI:DEF-FOREIGN-TYPE --BLKCNT64-T :LONG)
47 (UFFI:DEF-FOREIGN-TYPE --FSBLKCNT-T :UNSIGNED-LONG)
48 (UFFI:DEF-FOREIGN-TYPE --FSBLKCNT64-T :UNSIGNED-LONG)
49 (UFFI:DEF-FOREIGN-TYPE --FSFILCNT-T :UNSIGNED-LONG)
50 (UFFI:DEF-FOREIGN-TYPE --FSFILCNT64-T :UNSIGNED-LONG)
51 (UFFI:DEF-FOREIGN-TYPE --SSIZE-T :INT)
52 (UFFI:DEF-FOREIGN-TYPE --LOFF-T :LONG)
53 (UFFI:DEF-FOREIGN-TYPE --QADDR-T (* :LONG))
54 (UFFI:DEF-FOREIGN-TYPE --CADDR-T (* :CHAR))
55 (UFFI:DEF-FOREIGN-TYPE --INTPTR-T :INT)
56 (UFFI:DEF-FOREIGN-TYPE --SOCKLEN-T :UNSIGNED-INT)
57 (UFFI:DEF-FOREIGN-TYPE U-CHAR :UNSIGNED-CHAR)
58 (UFFI:DEF-FOREIGN-TYPE U-SHORT :UNSIGNED-SHORT)
59 (UFFI:DEF-FOREIGN-TYPE U-INT :UNSIGNED-INT)
60 (UFFI:DEF-FOREIGN-TYPE U-LONG :UNSIGNED-LONG)
61 (UFFI:DEF-FOREIGN-TYPE QUAD-T :LONG)
62 (UFFI:DEF-FOREIGN-TYPE U-QUAD-T :UNSIGNED-LONG)
63 (UFFI:DEF-FOREIGN-TYPE FSID-T (:STRUCT NIL (--VAL (:ARRAY :INT 2))))
64 (UFFI:DEF-FOREIGN-TYPE LOFF-T :LONG)
65 (UFFI:DEF-FOREIGN-TYPE INO-T :UNSIGNED-LONG)
66 (UFFI:DEF-FOREIGN-TYPE DEV-T :UNSIGNED-LONG)
67 (UFFI:DEF-FOREIGN-TYPE GID-T :UNSIGNED-INT)
68 (UFFI:DEF-FOREIGN-TYPE MODE-T :UNSIGNED-INT)
69 (UFFI:DEF-FOREIGN-TYPE NLINK-T :UNSIGNED-INT)
70 (UFFI:DEF-FOREIGN-TYPE UID-T :UNSIGNED-INT)
71 (UFFI:DEF-FOREIGN-TYPE OFF-T :LONG)
72 (UFFI:DEF-FOREIGN-TYPE PID-T :INT)
73 (UFFI:DEF-FOREIGN-TYPE ID-T :UNSIGNED-INT)
74 (UFFI:DEF-FOREIGN-TYPE SSIZE-T :INT)
75 (UFFI:DEF-FOREIGN-TYPE DADDR-T :INT)
76 (UFFI:DEF-FOREIGN-TYPE CADDR-T (* :CHAR))
77 (UFFI:DEF-FOREIGN-TYPE KEY-T :INT)
78 (UFFI:DEF-FOREIGN-TYPE TIME-T :LONG)
79 (UFFI:DEF-FOREIGN-TYPE CLOCKID-T :INT)
80 (UFFI:DEF-FOREIGN-TYPE TIMER-T :INT)
81 (UFFI:DEF-FOREIGN-TYPE ULONG :UNSIGNED-LONG)
82 (UFFI:DEF-FOREIGN-TYPE USHORT :UNSIGNED-SHORT)
83 (UFFI:DEF-FOREIGN-TYPE UINT :UNSIGNED-INT)
84 (UFFI:DEF-FOREIGN-TYPE INT8-T :INT)
85 (UFFI:DEF-FOREIGN-TYPE INT16-T :INT)
86 (UFFI:DEF-FOREIGN-TYPE INT32-T :INT)
87 (UFFI:DEF-FOREIGN-TYPE INT64-T :INT)
88 (UFFI:DEF-FOREIGN-TYPE U-INT8-T :UNSIGNED-INT)
89 (UFFI:DEF-FOREIGN-TYPE U-INT16-T :UNSIGNED-INT)
90 (UFFI:DEF-FOREIGN-TYPE U-INT32-T :UNSIGNED-INT)
91 (UFFI:DEF-FOREIGN-TYPE U-INT64-T :UNSIGNED-INT)
92 (UFFI:DEF-FOREIGN-TYPE REGISTER-T :INT)
93 (UFFI:DEF-FOREIGN-TYPE --SIG-ATOMIC-T :INT)
94 (UFFI:DEF-FOREIGN-TYPE --SIGSET-T
95 (:STRUCT NIL (--VAL (:ARRAY :UNSIGNED-LONG 32))))
96 (UFFI:DEF-FOREIGN-TYPE SIGSET-T
97 (:STRUCT NIL (--VAL (:ARRAY :UNSIGNED-LONG 32))))
98 (UFFI:DEF-FOREIGN-TYPE NIL (:STRUCT TIMESPEC (TV-SEC :LONG) (TV-NSEC :LONG)))
99 (UFFI:DEF-FOREIGN-TYPE NIL (:STRUCT TIMEVAL (TV-SEC :LONG) (TV-USEC :LONG)))
100 (UFFI:DEF-FOREIGN-TYPE SUSECONDS-T :LONG)
101 (UFFI:DEF-FOREIGN-TYPE --FD-MASK :LONG)
102 (UFFI:DEF-FOREIGN-TYPE FD-SET (:STRUCT NIL (--FDS-BITS (:ARRAY :LONG 32))))
103 (UFFI:DEF-FOREIGN-TYPE FD-MASK :LONG)
104 (PROGN
105 (DECLAIM (INLINE SELECT))
106 (UFFI:DEF-FUNCTION "select"
107 ((--NFDS :INT)
108 (--READFDS
109 (* (:STRUCT NIL (--FDS-BITS (:ARRAY :LONG 32)))))
110 (--WRITEFDS
111 (* (:STRUCT NIL (--FDS-BITS (:ARRAY :LONG 32)))))
112 (--EXCEPTFDS
113 (* (:STRUCT NIL (--FDS-BITS (:ARRAY :LONG 32)))))
114 (--TIMEOUT
115 (* (:STRUCT TIMEVAL (TV-SEC :LONG) (TV-USEC :LONG)))))
116 :RETURNING
117 :INT))
118 (UFFI:DEF-FOREIGN-TYPE BLKCNT-T :LONG)
119 (UFFI:DEF-FOREIGN-TYPE FSBLKCNT-T :UNSIGNED-LONG)
120 (UFFI:DEF-FOREIGN-TYPE FSFILCNT-T :UNSIGNED-LONG))
121 (PROGN
122 (UFFI:DEF-FOREIGN-TYPE SIZE-T :UNSIGNED-INT)
123 (UFFI:DEF-FOREIGN-TYPE --U-CHAR :UNSIGNED-CHAR)
124 (UFFI:DEF-FOREIGN-TYPE --U-SHORT :UNSIGNED-SHORT)
125 (UFFI:DEF-FOREIGN-TYPE --U-INT :UNSIGNED-INT)
126 (UFFI:DEF-FOREIGN-TYPE --U-LONG :UNSIGNED-LONG)
127 (UFFI:DEF-FOREIGN-TYPE --INT8-T :CHAR)
128 (UFFI:DEF-FOREIGN-TYPE --UINT8-T :UNSIGNED-CHAR)
129 (UFFI:DEF-FOREIGN-TYPE --INT16-T :SHORT)
130 (UFFI:DEF-FOREIGN-TYPE --UINT16-T :UNSIGNED-SHORT)
131 (UFFI:DEF-FOREIGN-TYPE --INT32-T :INT)
132 (UFFI:DEF-FOREIGN-TYPE --UINT32-T :UNSIGNED-INT)
133 (UFFI:DEF-FOREIGN-TYPE --INT64-T :LONG)
134 (UFFI:DEF-FOREIGN-TYPE --UINT64-T :UNSIGNED-LONG)
135 (UFFI:DEF-FOREIGN-TYPE --QUAD-T :LONG)
136 (UFFI:DEF-FOREIGN-TYPE --U-QUAD-T :UNSIGNED-LONG)
137 (UFFI:DEF-FOREIGN-TYPE --DEV-T :UNSIGNED-LONG)
138 (UFFI:DEF-FOREIGN-TYPE --UID-T :UNSIGNED-INT)
139 (UFFI:DEF-FOREIGN-TYPE --GID-T :UNSIGNED-INT)
140 (UFFI:DEF-FOREIGN-TYPE --INO-T :UNSIGNED-LONG)
141 (UFFI:DEF-FOREIGN-TYPE --INO64-T :UNSIGNED-LONG)
142 (UFFI:DEF-FOREIGN-TYPE --MODE-T :UNSIGNED-INT)
143 (UFFI:DEF-FOREIGN-TYPE --NLINK-T :UNSIGNED-INT)
144 (UFFI:DEF-FOREIGN-TYPE --OFF-T :LONG)
145 (UFFI:DEF-FOREIGN-TYPE --OFF64-T :LONG)
146 (UFFI:DEF-FOREIGN-TYPE --PID-T :INT)
147 (UFFI:DEF-FOREIGN-TYPE --FSID-T (:STRUCT NIL (--VAL (:ARRAY :INT 2))))
148 (UFFI:DEF-FOREIGN-TYPE --CLOCK-T :LONG)
149 (UFFI:DEF-FOREIGN-TYPE --RLIM-T :UNSIGNED-LONG)
150 (UFFI:DEF-FOREIGN-TYPE --RLIM64-T :UNSIGNED-LONG)
151 (UFFI:DEF-FOREIGN-TYPE --ID-T :UNSIGNED-INT)
152 (UFFI:DEF-FOREIGN-TYPE --TIME-T :LONG)
153 (UFFI:DEF-FOREIGN-TYPE --USECONDS-T :UNSIGNED-INT)
154 (UFFI:DEF-FOREIGN-TYPE --SUSECONDS-T :LONG)
155 (UFFI:DEF-FOREIGN-TYPE --DADDR-T :INT)
156 (UFFI:DEF-FOREIGN-TYPE --SWBLK-T :LONG)
157 (UFFI:DEF-FOREIGN-TYPE --KEY-T :INT)
158 (UFFI:DEF-FOREIGN-TYPE --CLOCKID-T :INT)
159 (UFFI:DEF-FOREIGN-TYPE --TIMER-T :INT)
160 (UFFI:DEF-FOREIGN-TYPE --BLKSIZE-T :LONG)
161 (UFFI:DEF-FOREIGN-TYPE --BLKCNT-T :LONG)
162 (UFFI:DEF-FOREIGN-TYPE --BLKCNT64-T :LONG)
163 (UFFI:DEF-FOREIGN-TYPE --FSBLKCNT-T :UNSIGNED-LONG)
164 (UFFI:DEF-FOREIGN-TYPE --FSBLKCNT64-T :UNSIGNED-LONG)
165 (UFFI:DEF-FOREIGN-TYPE --FSFILCNT-T :UNSIGNED-LONG)
166 (UFFI:DEF-FOREIGN-TYPE --FSFILCNT64-T :UNSIGNED-LONG)
167 (UFFI:DEF-FOREIGN-TYPE --SSIZE-T :INT)
168 (UFFI:DEF-FOREIGN-TYPE --LOFF-T :LONG)
169 (UFFI:DEF-FOREIGN-TYPE --QADDR-T (* :LONG))
170 (UFFI:DEF-FOREIGN-TYPE --CADDR-T (* :CHAR))
171 (UFFI:DEF-FOREIGN-TYPE --INTPTR-T :INT)
172 (UFFI:DEF-FOREIGN-TYPE --SOCKLEN-T :UNSIGNED-INT)
173 (UFFI:DEF-FOREIGN-TYPE dirent
174 (:STRUCT DIRENT (D-INO :UNSIGNED-LONG) (D-OFF :LONG)
175 (D-RECLEN :UNSIGNED-SHORT) (D-TYPE :UNSIGNED-CHAR)
176 (D-NAME (:ARRAY :CHAR 256))))
177 (UFFI:DEF-ENUM UFFI-ALIEN::ENUM
178 ((:DT-UNKNOWN 0) (:DT-FIFO 1) (:DT-CHR 2) (:DT-DIR 4)
179 (:DT-BLK 6) (:DT-REG 8) (:DT-LNK 10) (:DT-SOCK 12)
180 (:DT-WHT 14)))
181 (UFFI:DEF-FOREIGN-TYPE DIR (:STRUCT --DIRSTREAM))
182 (PROGN
183 (DECLAIM (INLINE OPENDIR))
184 (UFFI:DEF-FUNCTION "opendir"
185 ((--NAME (* :CHAR)))
186 :RETURNING
187 (* (:STRUCT --DIRSTREAM))))
188 (PROGN
189 (DECLAIM (INLINE CLOSEDIR))
190 (UFFI:DEF-FUNCTION "closedir"
191 ((--DIRP (* (:STRUCT --DIRSTREAM))))
192 :RETURNING
193 :INT))
194 (PROGN
195 (DECLAIM (INLINE READDIR))
196 (UFFI:DEF-FUNCTION "readdir"
197 ((--DIRP (* (:STRUCT --DIRSTREAM))))
198 :RETURNING
199 (*
200 (:STRUCT DIRENT (D-INO :UNSIGNED-LONG) (D-OFF :LONG)
201 (D-RECLEN :UNSIGNED-SHORT) (D-TYPE :UNSIGNED-CHAR)
202 (D-NAME (:ARRAY :CHAR 256))))))
203 (PROGN
204 (DECLAIM (INLINE READDIR-R))
205 (UFFI:DEF-FUNCTION "readdir_r"
206 ((--DIRP (* (:STRUCT --DIRSTREAM)))
207 (--ENTRY
208 (*
209 (:STRUCT DIRENT (D-INO :UNSIGNED-LONG) (D-OFF :LONG)
210 (D-RECLEN :UNSIGNED-SHORT) (D-TYPE :UNSIGNED-CHAR)
211 (D-NAME (:ARRAY :CHAR 256)))))
212 (--RESULT
213 (*
214 (*
215 (:STRUCT DIRENT (D-INO :UNSIGNED-LONG) (D-OFF :LONG)
216 (D-RECLEN :UNSIGNED-SHORT) (D-TYPE :UNSIGNED-CHAR)
217 (D-NAME (:ARRAY :CHAR 256)))))))
218 :RETURNING
219 :INT))
220 (PROGN
221 (DECLAIM (INLINE REWINDDIR))
222 (UFFI:DEF-FUNCTION "rewinddir"
223 ((--DIRP (* (:STRUCT --DIRSTREAM))))
224 :RETURNING
225 :VOID))
226 (PROGN
227 (DECLAIM (INLINE SEEKDIR))
228 (UFFI:DEF-FUNCTION "seekdir"
229 ((--DIRP (* (:STRUCT --DIRSTREAM))) (--POS :LONG))
230 :RETURNING
231 :VOID))
232 (PROGN
233 (DECLAIM (INLINE TELLDIR))
234 (UFFI:DEF-FUNCTION "telldir"
235 ((--DIRP (* (:STRUCT --DIRSTREAM))))
236 :RETURNING
237 :LONG))
238 (PROGN
239 (DECLAIM (INLINE DIRFD))
240 (UFFI:DEF-FUNCTION "dirfd"
241 ((--DIRP (* (:STRUCT --DIRSTREAM))))
242 :RETURNING
243 :INT))
244 (PROGN
245 (DECLAIM (INLINE SCANDIR))
246 (UFFI:DEF-FUNCTION "scandir"
247 ((--DIR (* :CHAR))
248 (--NAMELIST
249 (*
250 (*
251 (*
252 (:STRUCT DIRENT (D-INO :UNSIGNED-LONG) (D-OFF :LONG)
253 (D-RECLEN :UNSIGNED-SHORT) (D-TYPE :UNSIGNED-CHAR)
254 (D-NAME (:ARRAY :CHAR 256)))))))
255 (--SELECTOR
256 (*
257 (FUNCTION :INT
258 (NIL
259 (*
260 (:STRUCT DIRENT (D-INO :UNSIGNED-LONG) (D-OFF :LONG)
261 (D-RECLEN :UNSIGNED-SHORT) (D-TYPE :UNSIGNED-CHAR)
262 (D-NAME (:ARRAY :CHAR 256))))))))
263 (--CMP
264 (*
265 (FUNCTION :INT (NIL :POINTER-VOID)
266 (NIL :POINTER-VOID)))))
267 :RETURNING
268 :INT))
269 (PROGN
270 (DECLAIM (INLINE ALPHASORT))
271 (UFFI:DEF-FUNCTION "alphasort"
272 ((|--E1| :POINTER-VOID) (|--E2| :POINTER-VOID))
273 :RETURNING
274 :INT))
275 (PROGN
276 (DECLAIM (INLINE GETDIRENTRIES))
277 (UFFI:DEF-FUNCTION "getdirentries"
278 ((--FD :INT) (--BUF (* :CHAR)) (--NBYTES :UNSIGNED-INT)
279 (--BASEP (* :LONG)))
280 :RETURNING
281 :INT)))

  ViewVC Help
Powered by ViewVC 1.1.5