This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/4] Add architecture specific socket.h header
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: <libc-alpha at sourceware dot org>
- Date: Mon, 21 Mar 2016 23:11:39 +0000
- Subject: Re: [PATCH 1/4] Add architecture specific socket.h header
- Authentication-results: sourceware.org; auth=none
- References: <1458592867-3057-1-git-send-email-adhemerval dot zanella at linaro dot org> <1458592867-3057-2-git-send-email-adhemerval dot zanella at linaro dot org>
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