[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
typedef compatibility
Does anyone know how to check at compile-time whether something has been
typedef'd or not?
In old versions of FreeBSD, getsockname() expects an int*. In new
versions of FreeBSD, it expects a socklen_t*, which is typedefed as
unsigned int.
So, we need to check at compile-time whether socklen_t is defined or not.
If it is, we make a variable of type socklen_t, otherwise we make a
variable of type int.
Anyone know how to do this?
thanks,
Erik