Issue #126 - Selectively compile AI_ALL and AI_V4MAPPED

This commit is contained in:
Justin Ethier 2016-10-23 20:07:45 +00:00
parent 2d8014021c
commit 51577cbb60
2 changed files with 25 additions and 2 deletions

View file

@ -3,6 +3,10 @@
TODO: more performance improvements TODO: more performance improvements
TODO: SRFI 113 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 # 0.3 - October 22, 2016
Features: Features:

View file

@ -377,8 +377,27 @@
(make-const sock-dgram "SOCK_DGRAM" ) (make-const sock-dgram "SOCK_DGRAM" )
(make-const ai-canonname "AI_CANONNAME" ) (make-const ai-canonname "AI_CANONNAME" )
(make-const ai-numerichost "AI_NUMERICHOST") (make-const ai-numerichost "AI_NUMERICHOST")
(make-const ai-v4mapped "AI_V4MAPPED" ) ;; The next 2 are not defined on all platforms:
(make-const ai-all "AI_ALL" ) (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 ai-addrconfig "AI_ADDRCONFIG" )
(make-const msg-peek "MSG_PEEK" ) (make-const msg-peek "MSG_PEEK" )
(make-const msg-oob "MSG_OOB" ) (make-const msg-oob "MSG_OOB" )