Liste des Groupes | Revenir à cl c |
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:[...]Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:>
[...]For context, here's the entire file from my system (Ubuntu 24.0.4,[...]
package libc6-dev:amd64 2.35-0ubuntu3.6). I get the impression that the
author(s) decided not to use memset to avoid the required #include,
which might increase compilation times for code that indirectly includes
this header. (I offer no opinion on whether that's a good tradeoff.)
>
An older version did use memset(). It was changed to use a loop in
1997, with a commit message that included:
"Don't use memset to prevent prototype trouble, use simple loop."
It may have been to avoid problems with pre-ANSI C compilers that didn't
support prototypes. That's still speculation on my part.
Here's the full fc20 version:
$ rpm -q -f /usr/include/bits/select.h
glibc-headers-2.18-19.fc20.x86_64
>
>
#if defined __GNUC__ && __GNUC__ >= 2[...]
#else /* ! GNU CC */[...]
#endif /* GNU CC */[...]
Les messages affichés proviennent d'usenet.