This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/4] Add architecture specific socket.h header


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]