[distcc] distcc-2.12 on IRIX
Dimitri Papadopoulos-Orfanos
papadopo at shfj.DECOY.cea.NOSPAM.fr
Wed Jan 14 12:36:36 GMT 2004
Hi,
Martin Pool wrote:
>
> > By the way, about the accept() argument type (int, size_t, or
> > socklen_t) issue I had already reported in a previous post, an
> > autoconf macro is available after all. See:
> > http://www.gnu.org/software/ac-archive/htmldoc/ac_prototype_accept.html
> >
http://www.gnu.org/software/ac-archive/htmldoc/ac_func_accept_argtypes.html
> > It would be better to fix this specific issue, as I think it could
> > break 64-bit builds where the type of the argument is actually
> > important.
>
> Are there any such platforms that don't already have a socklen_t?
Probably not, you're right about that. I think socklen_t was introduced
partly for transitioning to 64-bit platforms, so I guess it is always
defined when building 64-bit targets.
> >From a bit more reading it looks like we should actually define
> socklen_t to int if it's not defined, rather than size_t. According
> to some documentation the size arguments were int * on most old
> systems.
Originally the argument was "int". Then for some reason it was made a
"size_t". Then "socklen_t" was introduced, at least partly for
supporting 64-bit computing.
I think most Unix machines still use "int" by default for 32-bit targets
(unless some macros are defined to enable recent APIs). On the other
hand recent Linux or BSD systems that care less about compatibility use
"socklen_t". There are still some systems using "size_t", not many of
them I must agree. For exampel AIX 4.1 uses "int", AIX 4.2 uses
"size_t", and AIX 4.3 uses "socklen_t".
I think it would be nice to use the autoconf macro. It's available and
it's robust. Why not use it? It'll save a few warnings on most Unix
platforms.
--
Dimitri
More information about the distcc
mailing list