[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Constant values on unsupported platforms
- To: srfi-106@xxxxxxxxxxxxxxxxx
- Subject: Constant values on unsupported platforms
- From: Masanori Ogino <masanori.ogino@xxxxxxxxx>
- Date: Wed, 10 Jun 2015 22:53:56 +0900
- Delivered-to: srfi-106@xxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=5671BmcQtrWVPEHda7T/qt1k7/l9mNf/grNcUjg/YdI=; b=RCqkErGmqHT3pRoPk0ny6jsNC4kN/TeRN8z1KlRPf4u/BeSawKbTbrew6SmuoBARkl nyjFZuj8WqRU4dbcVOVfR9m+jczjYLmvnHmvJMwmZImizTICNxrLX6Jdqd1yoHIYpSWg 58PPnb5127NKiG5dZs4CrLX9H+XHDq4FtNBO0zQbT0Zt/9TLWEu3R8c+VWZFvgjbYNpj FAftXr5HAjyClxPQCBIaSFrrjR32GeUScxzQHPtcURpJMLzLnWoXEeHWBFf8rHFeTgKf nulOPocx7cZR3fAynm337f1PEK6eQYLxg/7SjLeGWs1pg6V56UTwS8ckFpQi6+Z+wGSd lxgw==
- Sender: masanoriogino@xxxxxxxxx
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