Subject: Incomplete spec for preprocessor defines

From: "Jan Newmarch" <[email-masked]>
Date: Fri, 29 Jun 2007 14:25:03 +1000

Hi

Draft 14 of the API spec defines various preprocessor constants to
have value one if the implementation possesses a certain capability.
e.g.
    #define HAVE_SCTP_NOCONNECT 1
if it supports sending data to 1-1 socket without doing connect() first.

But apart from HAVE_SCTP_MULTIBUF, the value/existence of the constant
is not defined if the implementation does not possess the capability.
Some implementations will leave the constant undefined (Linux does not
define the constant HAVE_SCTP_SAT_NETWORK_CAPABILITY) while others
define the constant with a different value (BSD defines
HAVE_SCTP_NOCONNECT to be zero).

I would suggest that all constants with boolean value be either
defined/undefined, or 1/0 e,g

#define HAVE_SCTP_NOCONNECT
versus
#undef HAVE_SCTP_NOCONNECT

or

#define HAVE_SCTP_NOCONNECT 1
versus
#define HAVE_SCTP_NOCONNECT 0

 Jan
--