[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Constant values on unsupported platforms



Hello.

I have a question about the constant values defined in SRFI 106,
"Constants" section. How should I treat a value if a platform have no
support for the value?

Specifically, FreeBSD and some other *BSD variants have no support for
flags of IPv4-mapped addresses, AI_V4MAPPED and AI_ALL, even though
they defines the constants. If you pass the flags you will get an
error.

I came up with three solutions:
1. not defining unsupported constants (I guess it's non-conformant to the SRFI),
2. defining them as dummy values (0, #f, the `undefined` value, etc.), or
3. defining them as the platform's values and masking them in make-*-socket.

Which solution is permitted and/or recommended?
I'm sorry if the problem has already been discussed.

-- 
Masanori Ogino <masanori.ogino@xxxxxxxxx>
http://twitter.com/omasanori
http://gplus.to/omasanori