mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-09 14:07:34 +02:00
Issue #126 - Selectively compile AI_ALL and AI_V4MAPPED
This commit is contained in:
parent
2d8014021c
commit
51577cbb60
2 changed files with 25 additions and 2 deletions
|
@ -3,6 +3,10 @@
|
|||
TODO: more performance improvements
|
||||
TODO: SRFI 113
|
||||
|
||||
Bug Fixes
|
||||
|
||||
- Modified SRFI 106 to be smarter about compiling `AI_V4MAPPED` and `AI_ALL`, which are not defined on OpenBSD.
|
||||
|
||||
# 0.3 - October 22, 2016
|
||||
|
||||
Features:
|
||||
|
|
23
srfi/106.sld
23
srfi/106.sld
|
@ -377,8 +377,27 @@
|
|||
(make-const sock-dgram "SOCK_DGRAM" )
|
||||
(make-const ai-canonname "AI_CANONNAME" )
|
||||
(make-const ai-numerichost "AI_NUMERICHOST")
|
||||
(make-const ai-v4mapped "AI_V4MAPPED" )
|
||||
(make-const ai-all "AI_ALL" )
|
||||
;; The next 2 are not defined on all platforms:
|
||||
(define *ai-v4mapped* (ai-v4mapped))
|
||||
(define-c ai-v4mapped
|
||||
"(void *data, int argc, closure _, object k)"
|
||||
"
|
||||
#ifdef AI_V4MAPPED
|
||||
return_closcall1(data, k, obj_int2obj(AI_V4MAPPED));
|
||||
#else
|
||||
Cyc_rt_raise_msg(data, \"AI_V4MAPPED is not available on this platform\");
|
||||
#endif
|
||||
")
|
||||
(define *ai-all* (ai-all))
|
||||
(define-c ai-all
|
||||
"(void *data, int argc, closure _, object k)"
|
||||
"
|
||||
#ifdef AI_ALL
|
||||
return_closcall1(data, k, obj_int2obj(AI_ALL));
|
||||
#else
|
||||
Cyc_rt_raise_msg(data, \"AI_ALL is not available on this platform\");
|
||||
#endif
|
||||
")
|
||||
(make-const ai-addrconfig "AI_ADDRCONFIG" )
|
||||
(make-const msg-peek "MSG_PEEK" )
|
||||
(make-const msg-oob "MSG_OOB" )
|
||||
|
|
Loading…
Add table
Reference in a new issue