[PATCH 1/4] Add architecture specific socket.h header
Joseph Myers
joseph@codesourcery.com
Mon Mar 21 23:11:00 GMT 2016
On Mon, 21 Mar 2016, Adhemerval Zanella wrote:
> To avoid namespace pollution socket.h can not include limits.h to
> get LONG_MAX and INT_MAX, so the option is either using compiler
> builtin defintions (__LONG_MAX__ and __INT_MAX__) or by creating
> archicteture specific headers. The first option has the downside
> of relying on existense of builtin, which might not be true for all
> current compilers.
The normal approach is to include <bits/wordsize.h>. That should avoid
any need for architecture-specific variants of socket.h.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list