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

Contents of /cparse/test3.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide 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 clynbech 1.1 (UNLESS (FIND-PACKAGE :OBEX) (DEFPACKAGE :OBEX (:SHADOW T)))
2    
3     (IN-PACKAGE :OBEX)
4    
5     (PROGN
6     (UFFI:DEF-FOREIGN-TYPE INT8-T :CHAR)
7     (UFFI:DEF-FOREIGN-TYPE INT16-T :SHORT)
8     (UFFI:DEF-FOREIGN-TYPE INT32-T :INT)
9     (UFFI:DEF-FOREIGN-TYPE INT64-T :LONG)
10     (UFFI:DEF-FOREIGN-TYPE UINT8-T :UNSIGNED-CHAR)
11     (UFFI:DEF-FOREIGN-TYPE UINT16-T :UNSIGNED-SHORT)
12     (UFFI:DEF-FOREIGN-TYPE UINT32-T :UNSIGNED-INT)
13     (UFFI:DEF-FOREIGN-TYPE UINT64-T :UNSIGNED-LONG)
14     (UFFI:DEF-FOREIGN-TYPE INT-LEAST8-T :CHAR)
15     (UFFI:DEF-FOREIGN-TYPE INT-LEAST16-T :SHORT)
16     (UFFI:DEF-FOREIGN-TYPE INT-LEAST32-T :INT)
17     (UFFI:DEF-FOREIGN-TYPE INT-LEAST64-T :LONG)
18     (UFFI:DEF-FOREIGN-TYPE UINT-LEAST8-T :UNSIGNED-CHAR)
19     (UFFI:DEF-FOREIGN-TYPE UINT-LEAST16-T :UNSIGNED-SHORT)
20     (UFFI:DEF-FOREIGN-TYPE UINT-LEAST32-T :UNSIGNED-INT)
21     (UFFI:DEF-FOREIGN-TYPE UINT-LEAST64-T :UNSIGNED-LONG)
22     (UFFI:DEF-FOREIGN-TYPE INT-FAST8-T :CHAR)
23     (UFFI:DEF-FOREIGN-TYPE INT-FAST16-T :INT)
24     (UFFI:DEF-FOREIGN-TYPE INT-FAST32-T :INT)
25     (UFFI:DEF-FOREIGN-TYPE INT-FAST64-T :LONG)
26     (UFFI:DEF-FOREIGN-TYPE UINT-FAST8-T :UNSIGNED-CHAR)
27     (UFFI:DEF-FOREIGN-TYPE UINT-FAST16-T :UNSIGNED-INT)
28     (UFFI:DEF-FOREIGN-TYPE UINT-FAST32-T :UNSIGNED-INT)
29     (UFFI:DEF-FOREIGN-TYPE UINT-FAST64-T :UNSIGNED-LONG)
30     (UFFI:DEF-FOREIGN-TYPE INTPTR-T :INT)
31     (UFFI:DEF-FOREIGN-TYPE UINTPTR-T :UNSIGNED-INT)
32     (UFFI:DEF-FOREIGN-TYPE INTMAX-T :LONG)
33     (UFFI:DEF-FOREIGN-TYPE UINTMAX-T :UNSIGNED-LONG)
34     (UFFI:DEF-FOREIGN-TYPE SIZE-T :UNSIGNED-INT)
35     (UFFI:DEF-FOREIGN-TYPE --U-CHAR :UNSIGNED-CHAR)
36     (UFFI:DEF-FOREIGN-TYPE --U-SHORT :UNSIGNED-SHORT)
37     (UFFI:DEF-FOREIGN-TYPE --U-INT :UNSIGNED-INT)
38     (UFFI:DEF-FOREIGN-TYPE --U-LONG :UNSIGNED-LONG)
39     (UFFI:DEF-FOREIGN-TYPE --INT8-T :CHAR)
40     (UFFI:DEF-FOREIGN-TYPE --UINT8-T :UNSIGNED-CHAR)
41     (UFFI:DEF-FOREIGN-TYPE --INT16-T :SHORT)
42     (UFFI:DEF-FOREIGN-TYPE --UINT16-T :UNSIGNED-SHORT)
43     (UFFI:DEF-FOREIGN-TYPE --INT32-T :INT)
44     (UFFI:DEF-FOREIGN-TYPE --UINT32-T :UNSIGNED-INT)
45     (UFFI:DEF-FOREIGN-TYPE --INT64-T :LONG)
46     (UFFI:DEF-FOREIGN-TYPE --UINT64-T :UNSIGNED-LONG)
47     (UFFI:DEF-FOREIGN-TYPE --QUAD-T :LONG)
48     (UFFI:DEF-FOREIGN-TYPE --U-QUAD-T :UNSIGNED-LONG)
49     (UFFI:DEF-FOREIGN-TYPE --DEV-T :UNSIGNED-LONG)
50     (UFFI:DEF-FOREIGN-TYPE --UID-T :UNSIGNED-INT)
51     (UFFI:DEF-FOREIGN-TYPE --GID-T :UNSIGNED-INT)
52     (UFFI:DEF-FOREIGN-TYPE --INO-T :UNSIGNED-LONG)
53     (UFFI:DEF-FOREIGN-TYPE --INO64-T :UNSIGNED-LONG)
54     (UFFI:DEF-FOREIGN-TYPE --MODE-T :UNSIGNED-INT)
55     (UFFI:DEF-FOREIGN-TYPE --NLINK-T :UNSIGNED-INT)
56     (UFFI:DEF-FOREIGN-TYPE --OFF-T :LONG)
57     (UFFI:DEF-FOREIGN-TYPE --OFF64-T :LONG)
58     (UFFI:DEF-FOREIGN-TYPE --PID-T :INT)
59     (UFFI:DEF-FOREIGN-TYPE --FSID-T (:STRUCT NIL (--VAL (:ARRAY :INT 2))))
60     (UFFI:DEF-FOREIGN-TYPE --CLOCK-T :LONG)
61     (UFFI:DEF-FOREIGN-TYPE --RLIM-T :UNSIGNED-LONG)
62     (UFFI:DEF-FOREIGN-TYPE --RLIM64-T :UNSIGNED-LONG)
63     (UFFI:DEF-FOREIGN-TYPE --ID-T :UNSIGNED-INT)
64     (UFFI:DEF-FOREIGN-TYPE --TIME-T :LONG)
65     (UFFI:DEF-FOREIGN-TYPE --USECONDS-T :UNSIGNED-INT)
66     (UFFI:DEF-FOREIGN-TYPE --SUSECONDS-T :LONG)
67     (UFFI:DEF-FOREIGN-TYPE --DADDR-T :INT)
68     (UFFI:DEF-FOREIGN-TYPE --SWBLK-T :LONG)
69     (UFFI:DEF-FOREIGN-TYPE --KEY-T :INT)
70     (UFFI:DEF-FOREIGN-TYPE --CLOCKID-T :INT)
71     (UFFI:DEF-FOREIGN-TYPE --TIMER-T :INT)
72     (UFFI:DEF-FOREIGN-TYPE --BLKSIZE-T :LONG)
73     (UFFI:DEF-FOREIGN-TYPE --BLKCNT-T :LONG)
74     (UFFI:DEF-FOREIGN-TYPE --BLKCNT64-T :LONG)
75     (UFFI:DEF-FOREIGN-TYPE --FSBLKCNT-T :UNSIGNED-LONG)
76     (UFFI:DEF-FOREIGN-TYPE --FSBLKCNT64-T :UNSIGNED-LONG)
77     (UFFI:DEF-FOREIGN-TYPE --FSFILCNT-T :UNSIGNED-LONG)
78     (UFFI:DEF-FOREIGN-TYPE --FSFILCNT64-T :UNSIGNED-LONG)
79     (UFFI:DEF-FOREIGN-TYPE --SSIZE-T :INT)
80     (UFFI:DEF-FOREIGN-TYPE --LOFF-T :LONG)
81     (UFFI:DEF-FOREIGN-TYPE --QADDR-T (* :LONG))
82     (UFFI:DEF-FOREIGN-TYPE --CADDR-T (* :CHAR))
83     (UFFI:DEF-FOREIGN-TYPE --INTPTR-T :INT)
84     (UFFI:DEF-FOREIGN-TYPE --SOCKLEN-T :UNSIGNED-INT)
85     (UFFI:DEF-FOREIGN-TYPE U-CHAR :UNSIGNED-CHAR)
86     (UFFI:DEF-FOREIGN-TYPE U-SHORT :UNSIGNED-SHORT)
87     (UFFI:DEF-FOREIGN-TYPE U-INT :UNSIGNED-INT)
88     (UFFI:DEF-FOREIGN-TYPE U-LONG :UNSIGNED-LONG)
89     (UFFI:DEF-FOREIGN-TYPE QUAD-T :LONG)
90     (UFFI:DEF-FOREIGN-TYPE U-QUAD-T :UNSIGNED-LONG)
91     (UFFI:DEF-FOREIGN-TYPE FSID-T (:STRUCT NIL (--VAL (:ARRAY :INT 2))))
92     (UFFI:DEF-FOREIGN-TYPE LOFF-T :LONG)
93     (UFFI:DEF-FOREIGN-TYPE INO-T :UNSIGNED-LONG)
94     (UFFI:DEF-FOREIGN-TYPE DEV-T :UNSIGNED-LONG)
95     (UFFI:DEF-FOREIGN-TYPE GID-T :UNSIGNED-INT)
96     (UFFI:DEF-FOREIGN-TYPE MODE-T :UNSIGNED-INT)
97     (UFFI:DEF-FOREIGN-TYPE NLINK-T :UNSIGNED-INT)
98     (UFFI:DEF-FOREIGN-TYPE UID-T :UNSIGNED-INT)
99     (UFFI:DEF-FOREIGN-TYPE OFF-T :LONG)
100     (UFFI:DEF-FOREIGN-TYPE PID-T :INT)
101     (UFFI:DEF-FOREIGN-TYPE ID-T :UNSIGNED-INT)
102     (UFFI:DEF-FOREIGN-TYPE SSIZE-T :INT)
103     (UFFI:DEF-FOREIGN-TYPE DADDR-T :INT)
104     (UFFI:DEF-FOREIGN-TYPE CADDR-T (* :CHAR))
105     (UFFI:DEF-FOREIGN-TYPE KEY-T :INT)
106     (UFFI:DEF-FOREIGN-TYPE TIME-T :LONG)
107     (UFFI:DEF-FOREIGN-TYPE CLOCKID-T :INT)
108     (UFFI:DEF-FOREIGN-TYPE TIMER-T :INT)
109     (UFFI:DEF-FOREIGN-TYPE ULONG :UNSIGNED-LONG)
110     (UFFI:DEF-FOREIGN-TYPE USHORT :UNSIGNED-SHORT)
111     (UFFI:DEF-FOREIGN-TYPE UINT :UNSIGNED-INT)
112     (UFFI:DEF-FOREIGN-TYPE U-INT8-T :UNSIGNED-INT)
113     (UFFI:DEF-FOREIGN-TYPE U-INT16-T :UNSIGNED-INT)
114     (UFFI:DEF-FOREIGN-TYPE U-INT32-T :UNSIGNED-INT)
115     (UFFI:DEF-FOREIGN-TYPE U-INT64-T :UNSIGNED-INT)
116     (UFFI:DEF-FOREIGN-TYPE REGISTER-T :INT)
117     (UFFI:DEF-FOREIGN-TYPE --SIG-ATOMIC-T :INT)
118     (UFFI:DEF-FOREIGN-TYPE --SIGSET-T
119     (:STRUCT NIL (--VAL (:ARRAY :UNSIGNED-LONG 32))))
120     (UFFI:DEF-FOREIGN-TYPE SIGSET-T
121     (:STRUCT NIL (--VAL (:ARRAY :UNSIGNED-LONG 32))))
122     (UFFI:DEF-FOREIGN-TYPE NIL (:STRUCT TIMESPEC (TV-SEC :LONG) (TV-NSEC :LONG)))
123     (UFFI:DEF-FOREIGN-TYPE NIL (:STRUCT TIMEVAL (TV-SEC :LONG) (TV-USEC :LONG)))
124     (UFFI:DEF-FOREIGN-TYPE SUSECONDS-T :LONG)
125     (UFFI:DEF-FOREIGN-TYPE --FD-MASK :LONG)
126     (UFFI:DEF-FOREIGN-TYPE FD-SET (:STRUCT NIL (--FDS-BITS (:ARRAY :LONG 32))))
127     (UFFI:DEF-FOREIGN-TYPE FD-MASK :LONG)
128     (PROGN
129     (DECLAIM (INLINE SELECT))
130     (UFFI:DEF-FUNCTION "select"
131     ((--NFDS :INT)
132     (--READFDS
133     (* (:STRUCT NIL (--FDS-BITS (:ARRAY :LONG 32)))))
134     (--WRITEFDS
135     (* (:STRUCT NIL (--FDS-BITS (:ARRAY :LONG 32)))))
136     (--EXCEPTFDS
137     (* (:STRUCT NIL (--FDS-BITS (:ARRAY :LONG 32)))))
138     (--TIMEOUT
139     (* (:STRUCT TIMEVAL (TV-SEC :LONG) (TV-USEC :LONG)))))
140     :RETURNING
141     :INT))
142     (UFFI:DEF-FOREIGN-TYPE BLKCNT-T :LONG)
143     (UFFI:DEF-FOREIGN-TYPE FSBLKCNT-T :UNSIGNED-LONG)
144     (UFFI:DEF-FOREIGN-TYPE FSFILCNT-T :UNSIGNED-LONG)
145     (UFFI:DEF-FOREIGN-TYPE NIL
146     (:STRUCT IOVEC (IOV-BASE :POINTER-VOID)
147     (IOV-LEN :UNSIGNED-INT)))
148     (PROGN
149     (DECLAIM (INLINE READV))
150     (UFFI:DEF-FUNCTION "readv"
151     ((--FD :INT)
152     (--VECTOR
153     (*
154     (:STRUCT IOVEC (IOV-BASE :POINTER-VOID)
155     (IOV-LEN :UNSIGNED-INT))))
156     (--COUNT :INT))
157     :RETURNING
158     :INT))
159     (PROGN
160     (DECLAIM (INLINE WRITEV))
161     (UFFI:DEF-FUNCTION "writev"
162     ((--FD :INT)
163     (--VECTOR
164     (*
165     (:STRUCT IOVEC (IOV-BASE :POINTER-VOID)
166     (IOV-LEN :UNSIGNED-INT))))
167     (--COUNT :INT))
168     :RETURNING
169     :INT))
170     (UFFI:DEF-FOREIGN-TYPE SOCKLEN-T :UNSIGNED-INT)
171     (UFFI:DEF-ENUM --SOCKET-TYPE
172     ((:SOCK-STREAM 1) (:SOCK-DGRAM 2) (:SOCK-RAW 3) (:SOCK-RDM 4)
173     (:SOCK-SEQPACKET 5) (:SOCK-PACKET 10)))
174     (UFFI:DEF-FOREIGN-TYPE SA-FAMILY-T :UNSIGNED-SHORT)
175     (UFFI:DEF-FOREIGN-TYPE NIL
176     (:STRUCT SOCKADDR (SA-FAMILY :UNSIGNED-SHORT)
177     (SA-DATA (:ARRAY :CHAR 14))))
178     (UFFI:DEF-FOREIGN-TYPE NIL
179     (:STRUCT SOCKADDR-STORAGE (SS-FAMILY :UNSIGNED-SHORT)
180     (--SS-ALIGN :UNSIGNED-INT)
181     (--SS-PADDING (:ARRAY :CHAR 120))))
182     (UFFI:DEF-ENUM UFFI-ALIEN::ENUM
183     ((:MSG-OOB 1) (:MSG-PEEK 2) (:MSG-DONTROUTE 4) (:MSG-CTRUNC 8)
184     (:MSG-PROXY 16) (:MSG-TRUNC 32) (:MSG-DONTWAIT 64)
185     (:MSG-EOR 128) (:MSG-WAITALL 256) (:MSG-FIN 512)
186     (:MSG-SYN 1024) (:MSG-CONFIRM 2048) (:MSG-RST 4096)
187     (:MSG-ERRQUEUE 8192) (:MSG-NOSIGNAL 16384) (:MSG-MORE 32768)))
188     (UFFI:DEF-FOREIGN-TYPE NIL
189     (:STRUCT MSGHDR (MSG-NAME :POINTER-VOID)
190     (MSG-NAMELEN :UNSIGNED-INT)
191     (MSG-IOV
192     (*
193     (:STRUCT IOVEC (IOV-BASE :POINTER-VOID)
194     (IOV-LEN :UNSIGNED-INT))))
195     (MSG-IOVLEN :UNSIGNED-INT) (MSG-CONTROL :POINTER-VOID)
196     (MSG-CONTROLLEN :UNSIGNED-INT) (MSG-FLAGS :INT)))
197     (UFFI:DEF-FOREIGN-TYPE NIL
198     (:STRUCT CMSGHDR (CMSG-LEN :UNSIGNED-INT)
199     (CMSG-LEVEL :INT) (CMSG-TYPE :INT)
200     (--CMSG-DATA (:ARRAY :UNSIGNED-CHAR 0))))
201     (PROGN
202     (DECLAIM (INLINE --CMSG-NXTHDR))
203     (UFFI:DEF-FUNCTION "__cmsg_nxthdr"
204     ((--MHDR
205     (*
206     (:STRUCT MSGHDR (MSG-NAME :POINTER-VOID)
207     (MSG-NAMELEN :UNSIGNED-INT)
208     (MSG-IOV
209     (*
210     (:STRUCT IOVEC (IOV-BASE :POINTER-VOID)
211     (IOV-LEN :UNSIGNED-INT))))
212     (MSG-IOVLEN :UNSIGNED-INT) (MSG-CONTROL :POINTER-VOID)
213     (MSG-CONTROLLEN :UNSIGNED-INT) (MSG-FLAGS :INT))))
214     (--CMSG
215     (*
216     (:STRUCT CMSGHDR (CMSG-LEN :UNSIGNED-INT)
217     (CMSG-LEVEL :INT) (CMSG-TYPE :INT)
218     (--CMSG-DATA (:ARRAY :UNSIGNED-CHAR 0))))))
219     :RETURNING
220     (*
221     (:STRUCT CMSGHDR (CMSG-LEN :UNSIGNED-INT)
222     (CMSG-LEVEL :INT) (CMSG-TYPE :INT)
223     (--CMSG-DATA (:ARRAY :UNSIGNED-CHAR 0))))))
224     (UFFI:DEF-ENUM UFFI-ALIEN::ENUM
225     ((:SCM-RIGHTS 1) (:SCM-CREDENTIALS 2) (:--SCM-CONNECT 3)))
226     (UFFI:DEF-FOREIGN-TYPE NIL
227     (:STRUCT UCRED (PID :INT) (UID :UNSIGNED-INT)
228     (GID :UNSIGNED-INT)))
229     (UFFI:DEF-FOREIGN-TYPE NIL (:STRUCT LINGER (L-ONOFF :INT) (L-LINGER :INT)))
230     (UFFI:DEF-FOREIGN-TYPE NIL
231     (:STRUCT OSOCKADDR (SA-FAMILY :UNSIGNED-SHORT)
232     (SA-DATA (:ARRAY :UNSIGNED-CHAR 14))))
233     (UFFI:DEF-ENUM UFFI-ALIEN::ENUM ((:SHUT-RD 0) (:SHUT-WR 1) (:SHUT-RDWR 2)))
234     (PROGN
235     (DECLAIM (INLINE SOCKET))
236     (UFFI:DEF-FUNCTION "socket"
237     ((--DOMAIN :INT) (--TYPE :INT) (--PROTOCOL :INT))
238     :RETURNING
239     :INT))
240     (PROGN
241     (DECLAIM (INLINE SOCKETPAIR))
242     (UFFI:DEF-FUNCTION "socketpair"
243     ((--DOMAIN :INT) (--TYPE :INT) (--PROTOCOL :INT)
244     (--FDS (:ARRAY :INT 2)))
245     :RETURNING
246     :INT))
247     (PROGN
248     (DECLAIM (INLINE BIND))
249     (UFFI:DEF-FUNCTION "bind"
250     ((--FD :INT)
251     (--ADDR
252     (*
253     (:STRUCT SOCKADDR (SA-FAMILY :UNSIGNED-SHORT)
254     (SA-DATA (:ARRAY :CHAR 14)))))
255     (--LEN :UNSIGNED-INT))
256     :RETURNING
257     :INT))
258     (PROGN
259     (DECLAIM (INLINE GETSOCKNAME))
260     (UFFI:DEF-FUNCTION "getsockname"
261     ((--FD :INT)
262     (--ADDR
263     (*
264     (:STRUCT SOCKADDR (SA-FAMILY :UNSIGNED-SHORT)
265     (SA-DATA (:ARRAY :CHAR 14)))))
266     (--LEN (* :UNSIGNED-INT)))
267     :RETURNING
268     :INT))
269     (PROGN
270     (DECLAIM (INLINE CONNECT))
271     (UFFI:DEF-FUNCTION "connect"
272     ((--FD :INT)
273     (--ADDR
274     (*
275     (:STRUCT SOCKADDR (SA-FAMILY :UNSIGNED-SHORT)
276     (SA-DATA (:ARRAY :CHAR 14)))))
277     (--LEN :UNSIGNED-INT))
278     :RETURNING
279     :INT))
280     (PROGN
281     (DECLAIM (INLINE GETPEERNAME))
282     (UFFI:DEF-FUNCTION "getpeername"
283     ((--FD :INT)
284     (--ADDR
285     (*
286     (:STRUCT SOCKADDR (SA-FAMILY :UNSIGNED-SHORT)
287     (SA-DATA (:ARRAY :CHAR 14)))))
288     (--LEN (* :UNSIGNED-INT)))
289     :RETURNING
290     :INT))
291     (PROGN
292     (DECLAIM (INLINE SEND))
293     (UFFI:DEF-FUNCTION "send"
294     ((--FD :INT) (--BUF :POINTER-VOID) (--N :UNSIGNED-INT)
295     (--FLAGS :INT))
296     :RETURNING
297     :INT))
298     (PROGN
299     (DECLAIM (INLINE RECV))
300     (UFFI:DEF-FUNCTION "recv"
301     ((--FD :INT) (--BUF :POINTER-VOID) (--N :UNSIGNED-INT)
302     (--FLAGS :INT))
303     :RETURNING
304     :INT))
305     (PROGN
306     (DECLAIM (INLINE SENDTO))
307     (UFFI:DEF-FUNCTION "sendto"
308     ((--FD :INT) (--BUF :POINTER-VOID) (--N :UNSIGNED-INT)
309     (--FLAGS :INT)
310     (--ADDR
311     (*
312     (:STRUCT SOCKADDR (SA-FAMILY :UNSIGNED-SHORT)
313     (SA-DATA (:ARRAY :CHAR 14)))))
314     (--ADDR-LEN :UNSIGNED-INT))
315     :RETURNING
316     :INT))
317     (PROGN
318     (DECLAIM (INLINE RECVFROM))
319     (UFFI:DEF-FUNCTION "recvfrom"
320     ((--FD :INT) (--BUF :POINTER-VOID) (--N :UNSIGNED-INT)
321     (--FLAGS :INT)
322     (--ADDR
323     (*
324     (:STRUCT SOCKADDR (SA-FAMILY :UNSIGNED-SHORT)
325     (SA-DATA (:ARRAY :CHAR 14)))))
326     (--ADDR-LEN (* :UNSIGNED-INT)))
327     :RETURNING
328     :INT))
329     (PROGN
330     (DECLAIM (INLINE SENDMSG))
331     (UFFI:DEF-FUNCTION "sendmsg"
332     ((--FD :INT)
333     (--MESSAGE
334     (*
335     (:STRUCT MSGHDR (MSG-NAME :POINTER-VOID)
336     (MSG-NAMELEN :UNSIGNED-INT)
337     (MSG-IOV
338     (*
339     (:STRUCT IOVEC (IOV-BASE :POINTER-VOID)
340     (IOV-LEN :UNSIGNED-INT))))
341     (MSG-IOVLEN :UNSIGNED-INT) (MSG-CONTROL :POINTER-VOID)
342     (MSG-CONTROLLEN :UNSIGNED-INT) (MSG-FLAGS :INT))))
343     (--FLAGS :INT))
344     :RETURNING
345     :INT))
346     (PROGN
347     (DECLAIM (INLINE RECVMSG))
348     (UFFI:DEF-FUNCTION "recvmsg"
349     ((--FD :INT)
350     (--MESSAGE
351     (*
352     (:STRUCT MSGHDR (MSG-NAME :POINTER-VOID)
353     (MSG-NAMELEN :UNSIGNED-INT)
354     (MSG-IOV
355     (*
356     (:STRUCT IOVEC (IOV-BASE :POINTER-VOID)
357     (IOV-LEN :UNSIGNED-INT))))
358     (MSG-IOVLEN :UNSIGNED-INT) (MSG-CONTROL :POINTER-VOID)
359     (MSG-CONTROLLEN :UNSIGNED-INT) (MSG-FLAGS :INT))))
360     (--FLAGS :INT))
361     :RETURNING
362     :INT))
363     (PROGN
364     (DECLAIM (INLINE GETSOCKOPT))
365     (UFFI:DEF-FUNCTION "getsockopt"
366     ((--FD :INT) (--LEVEL :INT) (--OPTNAME :INT)
367     (--OPTVAL :POINTER-VOID) (--OPTLEN (* :UNSIGNED-INT)))
368     :RETURNING
369     :INT))
370     (PROGN
371     (DECLAIM (INLINE SETSOCKOPT))
372     (UFFI:DEF-FUNCTION "setsockopt"
373     ((--FD :INT) (--LEVEL :INT) (--OPTNAME :INT)
374     (--OPTVAL :POINTER-VOID) (--OPTLEN :UNSIGNED-INT))
375     :RETURNING
376     :INT))
377     (PROGN
378     (DECLAIM (INLINE LISTEN))
379     (UFFI:DEF-FUNCTION "listen" ((--FD :INT) (--N :INT)) :RETURNING :INT))
380     (PROGN
381     (DECLAIM (INLINE ACCEPT))
382     (UFFI:DEF-FUNCTION "accept"
383     ((--FD :INT)
384     (--ADDR
385     (*
386     (:STRUCT SOCKADDR (SA-FAMILY :UNSIGNED-SHORT)
387     (SA-DATA (:ARRAY :CHAR 14)))))
388     (--ADDR-LEN (* :UNSIGNED-INT)))
389     :RETURNING
390     :INT))
391     (PROGN
392     (DECLAIM (INLINE SHUTDOWN))
393     (UFFI:DEF-FUNCTION "shutdown" ((--FD :INT) (--HOW :INT)) :RETURNING :INT))
394     (PROGN
395     (DECLAIM (INLINE ISFDTYPE))
396     (UFFI:DEF-FUNCTION "isfdtype" ((--FD :INT) (--FDTYPE :INT)) :RETURNING :INT))
397     (UFFI:DEF-FOREIGN-TYPE OBEX-T :POINTER-VOID)
398     (UFFI:DEF-FOREIGN-TYPE OBEX-OBJECT-T :POINTER-VOID)
399     (UFFI:DEF-FOREIGN-TYPE OBEX-EVENT-T
400     (*
401     (FUNCTION :VOID (HANDLE (* :POINTER-VOID))
402     (OBJ (* :POINTER-VOID)) (MODE :INT) (EVENT :INT)
403     (OBEX-CMD :INT) (OBEX-RSP :INT))))
404     (UFFI:DEF-FOREIGN-TYPE BDADDR-T (* :CHAR))
405     (UFFI:DEF-FOREIGN-TYPE OBEX-HEADERDATA-T
406     (:UNION NIL (BQ4 :UNSIGNED-INT) (BQ1 :UNSIGNED-CHAR)
407     (BS (* :UNSIGNED-CHAR))))
408     (UFFI:DEF-FOREIGN-TYPE OBEX-CTRANS-T
409     (:STRUCT NIL
410     (CONNECT
411     (*
412     (FUNCTION :INT (HANDLE (* :POINTER-VOID))
413     (CUSTOMDATA :POINTER-VOID))))
414     (DISCONNECT
415     (*
416     (FUNCTION :INT (HANDLE (* :POINTER-VOID))
417     (CUSTOMDATA :POINTER-VOID))))
418     (LISTEN
419     (*
420     (FUNCTION :INT (HANDLE (* :POINTER-VOID))
421     (CUSTOMDATA :POINTER-VOID))))
422     (WRITE
423     (*
424     (FUNCTION :INT (HANDLE (* :POINTER-VOID))
425     (CUSTOMDATA :POINTER-VOID) (BUF (* :UNSIGNED-CHAR))
426     (BUFLEN :INT))))
427     (HANDLEINPUT
428     (*
429     (FUNCTION :INT (HANDLE (* :POINTER-VOID))
430     (CUSTOMDATA :POINTER-VOID) (TIMEOUT :INT))))
431     (CUSTOMDATA :POINTER-VOID)))
432     (PROGN
433     (DECLAIM (INLINE OBEX-INIT))
434     (UFFI:DEF-FUNCTION "OBEX_Init"
435     ((TRANSPORT :INT)
436     (EVENTCB
437     (*
438     (FUNCTION :VOID (HANDLE (* :POINTER-VOID))
439     (OBJ (* :POINTER-VOID)) (MODE :INT) (EVENT :INT)
440     (OBEX-CMD :INT) (OBEX-RSP :INT))))
441     (FLAGS :UNSIGNED-INT))
442     :RETURNING
443     (* :POINTER-VOID)))
444     (PROGN
445     (DECLAIM (INLINE OBEX-CLEANUP))
446     (UFFI:DEF-FUNCTION "OBEX_Cleanup"
447     ((SELF (* :POINTER-VOID)))
448     :RETURNING
449     :VOID))
450     (PROGN
451     (DECLAIM (INLINE OBEX-SETUSERDATA))
452     (UFFI:DEF-FUNCTION "OBEX_SetUserData"
453     ((SELF (* :POINTER-VOID)) (DATA :POINTER-VOID))
454     :RETURNING
455     :VOID))
456     (PROGN
457     (DECLAIM (INLINE OBEX-GETUSERDATA))
458     (UFFI:DEF-FUNCTION "OBEX_GetUserData"
459     ((SELF (* :POINTER-VOID)))
460     :RETURNING
461     :POINTER-VOID))
462     (PROGN
463     (DECLAIM (INLINE OBEX-SETUSERCALLBACK))
464     (UFFI:DEF-FUNCTION "OBEX_SetUserCallBack"
465     ((SELF (* :POINTER-VOID))
466     (EVENTCB
467     (*
468     (FUNCTION :VOID (HANDLE (* :POINTER-VOID))
469     (OBJ (* :POINTER-VOID)) (MODE :INT) (EVENT :INT)
470     (OBEX-CMD :INT) (OBEX-RSP :INT))))
471     (DATA :POINTER-VOID))
472     :RETURNING
473     :VOID))
474     (PROGN
475     (DECLAIM (INLINE OBEX-SETTRANSPORTMTU))
476     (UFFI:DEF-FUNCTION "OBEX_SetTransportMTU"
477     ((SELF (* :POINTER-VOID)) (MTU-RX :UNSIGNED-SHORT)
478     (MTU-TX-MAX :UNSIGNED-SHORT))
479     :RETURNING
480     :INT))
481     (PROGN
482     (DECLAIM (INLINE OBEX-GETFD))
483     (UFFI:DEF-FUNCTION "OBEX_GetFD" ((SELF (* :POINTER-VOID))) :RETURNING :INT))
484     (PROGN
485     (DECLAIM (INLINE OBEX-REGISTERCTRANSPORT))
486     (UFFI:DEF-FUNCTION "OBEX_RegisterCTransport"
487     ((SELF (* :POINTER-VOID))
488     (CTRANS
489     (*
490     (:STRUCT NIL
491     (CONNECT
492     (*
493     (FUNCTION :INT (HANDLE (* :POINTER-VOID))
494     (CUSTOMDATA :POINTER-VOID))))
495     (DISCONNECT
496     (*
497     (FUNCTION :INT (HANDLE (* :POINTER-VOID))
498     (CUSTOMDATA :POINTER-VOID))))
499     (LISTEN
500     (*
501     (FUNCTION :INT (HANDLE (* :POINTER-VOID))
502     (CUSTOMDATA :POINTER-VOID))))
503     (WRITE
504     (*
505     (FUNCTION :INT (HANDLE (* :POINTER-VOID))
506     (CUSTOMDATA :POINTER-VOID) (BUF (* :UNSIGNED-CHAR))
507     (BUFLEN :INT))))
508     (HANDLEINPUT
509     (*
510     (FUNCTION :INT (HANDLE (* :POINTER-VOID))
511     (CUSTOMDATA :POINTER-VOID) (TIMEOUT :INT))))
512     (CUSTOMDATA :POINTER-VOID)))))
513     :RETURNING
514     :INT))
515     (PROGN
516     (DECLAIM (INLINE OBEX-SETCUSTOMDATA))
517     (UFFI:DEF-FUNCTION "OBEX_SetCustomData"
518     ((SELF (* :POINTER-VOID)) (DATA :POINTER-VOID))
519     :RETURNING
520     :VOID))
521     (PROGN
522     (DECLAIM (INLINE OBEX-GETCUSTOMDATA))
523     (UFFI:DEF-FUNCTION "OBEX_GetCustomData"
524     ((SELF (* :POINTER-VOID)))
525     :RETURNING
526     :POINTER-VOID))
527     (PROGN
528     (DECLAIM (INLINE OBEX-TRANSPORTCONNECT))
529     (UFFI:DEF-FUNCTION "OBEX_TransportConnect"
530     ((SELF (* :POINTER-VOID))
531     (SADDR
532     (*
533     (:STRUCT SOCKADDR (SA-FAMILY :UNSIGNED-SHORT)
534     (SA-DATA (:ARRAY :CHAR 14)))))
535     (ADDLEN :INT))
536     :RETURNING
537     :INT))
538     (PROGN
539     (DECLAIM (INLINE OBEX-TRANSPORTDISCONNECT))
540     (UFFI:DEF-FUNCTION "OBEX_TransportDisconnect"
541     ((SELF (* :POINTER-VOID)))
542     :RETURNING
543     :INT))
544     (PROGN
545     (DECLAIM (INLINE OBEX-CUSTOMDATAFEED))
546     (UFFI:DEF-FUNCTION "OBEX_CustomDataFeed"
547     ((SELF (* :POINTER-VOID)) (INPUTBUF (* :UNSIGNED-CHAR))
548     (ACTUAL :INT))
549     :RETURNING
550     :INT))
551     (PROGN
552     (DECLAIM (INLINE OBEX-HANDLEINPUT))
553     (UFFI:DEF-FUNCTION "OBEX_HandleInput"
554     ((SELF (* :POINTER-VOID)) (TIMEOUT :INT))
555     :RETURNING
556     :INT))
557     (PROGN
558     (DECLAIM (INLINE OBEX-SERVERREGISTER))
559     (UFFI:DEF-FUNCTION "OBEX_ServerRegister"
560     ((SELF (* :POINTER-VOID))
561     (SADDR
562     (*
563     (:STRUCT SOCKADDR (SA-FAMILY :UNSIGNED-SHORT)
564     (SA-DATA (:ARRAY :CHAR 14)))))
565     (ADDRLEN :INT))
566     :RETURNING
567     :INT))
568     (PROGN
569     (DECLAIM (INLINE OBEX-SERVERACCEPT))
570     (UFFI:DEF-FUNCTION "OBEX_ServerAccept"
571     ((SERVER (* :POINTER-VOID))
572     (EVENTCB
573     (*
574     (FUNCTION :VOID (HANDLE (* :POINTER-VOID))
575     (OBJ (* :POINTER-VOID)) (MODE :INT) (EVENT :INT)
576     (OBEX-CMD :INT) (OBEX-RSP :INT))))
577     (DATA :POINTER-VOID))
578     :RETURNING
579     (* :POINTER-VOID)))
580     (PROGN
581     (DECLAIM (INLINE OBEX-REQUEST))
582     (UFFI:DEF-FUNCTION "OBEX_Request"
583     ((SELF (* :POINTER-VOID)) (OBJECT (* :POINTER-VOID)))
584     :RETURNING
585     :INT))
586     (PROGN
587     (DECLAIM (INLINE OBEX-CANCELREQUEST))
588     (UFFI:DEF-FUNCTION "OBEX_CancelRequest"
589     ((SELF (* :POINTER-VOID)) (NICE :INT))
590     :RETURNING
591     :INT))
592     (PROGN
593     (DECLAIM (INLINE OBEX-OBJECTNEW))
594     (UFFI:DEF-FUNCTION "OBEX_ObjectNew"
595     ((SELF (* :POINTER-VOID)) (CMD :UNSIGNED-CHAR))
596     :RETURNING
597     (* :POINTER-VOID)))
598     (PROGN
599     (DECLAIM (INLINE OBEX-OBJECTDELETE))
600     (UFFI:DEF-FUNCTION "OBEX_ObjectDelete"
601     ((SELF (* :POINTER-VOID)) (OBJECT (* :POINTER-VOID)))
602     :RETURNING
603     :INT))
604     (PROGN
605     (DECLAIM (INLINE OBEX-OBJECTADDHEADER))
606     (UFFI:DEF-FUNCTION "OBEX_ObjectAddHeader"
607     ((SELF (* :POINTER-VOID)) (OBJECT (* :POINTER-VOID))
608     (HI :UNSIGNED-CHAR)
609     (HV
610     (:UNION NIL (BQ4 :UNSIGNED-INT) (BQ1 :UNSIGNED-CHAR)
611     (BS (* :UNSIGNED-CHAR))))
612     (HV-SIZE :UNSIGNED-INT) (FLAGS :UNSIGNED-INT))
613     :RETURNING
614     :INT))
615     (PROGN
616     (DECLAIM (INLINE OBEX-OBJECTGETNEXTHEADER))
617     (UFFI:DEF-FUNCTION "OBEX_ObjectGetNextHeader"
618     ((SELF (* :POINTER-VOID)) (OBJECT (* :POINTER-VOID))
619     (HI (* :UNSIGNED-CHAR))
620     (HV
621     (*
622     (:UNION NIL (BQ4 :UNSIGNED-INT) (BQ1 :UNSIGNED-CHAR)
623     (BS (* :UNSIGNED-CHAR)))))
624     (HV-SIZE (* :UNSIGNED-INT)))
625     :RETURNING
626     :INT))
627     (PROGN
628     (DECLAIM (INLINE OBEX-OBJECTREPARSEHEADERS))
629     (UFFI:DEF-FUNCTION "OBEX_ObjectReParseHeaders"
630     ((SELF (* :POINTER-VOID)) (OBJECT (* :POINTER-VOID)))
631     :RETURNING
632     :INT))
633     (PROGN
634     (DECLAIM (INLINE OBEX-OBJECTSETRSP))
635     (UFFI:DEF-FUNCTION "OBEX_ObjectSetRsp"
636     ((OBJECT (* :POINTER-VOID)) (RSP :UNSIGNED-CHAR)
637     (LASTRSP :UNSIGNED-CHAR))
638     :RETURNING
639     :INT))
640     (PROGN
641     (DECLAIM (INLINE OBEX-OBJECTGETNONHDRDATA))
642     (UFFI:DEF-FUNCTION "OBEX_ObjectGetNonHdrData"
643     ((OBJECT (* :POINTER-VOID))
644     (BUFFER (* (* :UNSIGNED-CHAR))))
645     :RETURNING
646     :INT))
647     (PROGN
648     (DECLAIM (INLINE OBEX-OBJECTSETNONHDRDATA))
649     (UFFI:DEF-FUNCTION "OBEX_ObjectSetNonHdrData"
650     ((OBJECT (* :POINTER-VOID)) (BUFFER (* :UNSIGNED-CHAR))
651     (LEN :UNSIGNED-INT))
652     :RETURNING
653     :INT))
654     (PROGN
655     (DECLAIM (INLINE OBEX-OBJECTSETHDROFFSET))
656     (UFFI:DEF-FUNCTION "OBEX_ObjectSetHdrOffset"
657     ((OBJECT (* :POINTER-VOID)) (OFFSET :UNSIGNED-INT))
658     :RETURNING
659     :INT))
660     (PROGN
661     (DECLAIM (INLINE OBEX-OBJECTREADSTREAM))
662     (UFFI:DEF-FUNCTION "OBEX_ObjectReadStream"
663     ((SELF (* :POINTER-VOID)) (OBJECT (* :POINTER-VOID))
664     (BUF (* (* :UNSIGNED-CHAR))))
665     :RETURNING
666     :INT))
667     (PROGN
668     (DECLAIM (INLINE OBEX-UNICODETOCHAR))
669     (UFFI:DEF-FUNCTION "OBEX_UnicodeToChar"
670     ((C (* :UNSIGNED-CHAR)) (UC (* :UNSIGNED-CHAR))
671     (SIZE :INT))
672     :RETURNING
673     :INT))
674     (PROGN
675     (DECLAIM (INLINE OBEX-CHARTOUNICODE))
676     (UFFI:DEF-FUNCTION "OBEX_CharToUnicode"
677     ((UC (* :UNSIGNED-CHAR)) (C (* :UNSIGNED-CHAR))
678     (SIZE :INT))
679     :RETURNING
680     :INT))
681     (PROGN
682     (DECLAIM (INLINE OBEX-RESPONSETOSTRING))
683     (UFFI:DEF-FUNCTION "OBEX_ResponseToString"
684     ((RSP :INT))
685     :RETURNING
686     (* :CHAR)))
687     (PROGN
688     (DECLAIM (INLINE OBEX-GETRESPONSEMESSAGE))
689     (UFFI:DEF-FUNCTION "OBEX_GetResponseMessage"
690     ((SELF (* :POINTER-VOID)) (RSP :INT))
691     :RETURNING
692     (* :CHAR)))
693     (PROGN
694     (DECLAIM (INLINE INOBEX-SERVERREGISTER))
695     (UFFI:DEF-FUNCTION "InOBEX_ServerRegister"
696     ((SELF (* :POINTER-VOID)))
697     :RETURNING
698     :INT))
699     (PROGN
700     (DECLAIM (INLINE INOBEX-TRANSPORTCONNECT))
701     (UFFI:DEF-FUNCTION "InOBEX_TransportConnect"
702     ((SELF (* :POINTER-VOID))
703     (SADDR
704     (*
705     (:STRUCT SOCKADDR (SA-FAMILY :UNSIGNED-SHORT)
706     (SA-DATA (:ARRAY :CHAR 14)))))
707     (ADDRLEN :INT))
708     :RETURNING
709     :INT))
710     (PROGN
711     (DECLAIM (INLINE IROBEX-SERVERREGISTER))
712     (UFFI:DEF-FUNCTION "IrOBEX_ServerRegister"
713     ((SELF (* :POINTER-VOID)) (SERVICE (* :CHAR)))
714     :RETURNING
715     :INT))
716     (PROGN
717     (DECLAIM (INLINE IROBEX-TRANSPORTCONNECT))
718     (UFFI:DEF-FUNCTION "IrOBEX_TransportConnect"
719     ((SELF (* :POINTER-VOID)) (SERVICE (* :CHAR)))
720     :RETURNING
721     :INT))
722     (PROGN
723     (DECLAIM (INLINE BTOBEX-SERVERREGISTER))
724     (UFFI:DEF-FUNCTION "BtOBEX_ServerRegister"
725     ((SELF (* :POINTER-VOID)) (SRC (* (* :CHAR)))
726     (CHANNEL :UNSIGNED-CHAR))
727     :RETURNING
728     :INT))
729     (PROGN
730     (DECLAIM (INLINE BTOBEX-TRANSPORTCONNECT))
731     (UFFI:DEF-FUNCTION "BtOBEX_TransportConnect"
732     ((SELF (* :POINTER-VOID)) (SRC (* (* :CHAR)))
733     (DST (* (* :CHAR))) (CHANNEL :UNSIGNED-CHAR))
734     :RETURNING
735     :INT))
736     (PROGN
737     (DECLAIM (INLINE FDOBEX-TRANSPORTSETUP))
738     (UFFI:DEF-FUNCTION "FdOBEX_TransportSetup"
739     ((SELF (* :POINTER-VOID)) (RFD :INT) (WFD :INT)
740     (MTU :INT))
741     :RETURNING
742     :INT)))

  ViewVC Help
Powered by ViewVC 1.1.5