Re: INT_MAX undeclared / limits.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2008-02-13 at 18:09 +0100, Till Maas wrote:
> On Wed February 13 2008, Till Maas wrote:
> 
> > Is this really a bug in aireplay-ng, i.e. does it have to include limits.h
> > where INT_MAX comes from, or is this a bug in some other package? Why was
> > it not needed to include limits.h earlier, any ideas?
> 
> In Fedora 7 and 8, INT_MAX is already declared when arpa/inet.h is included, 
> i.e. this compiles:
> 
> #include <arpa/inet.h>
> #include <stdio.h>
> 
> main() {
> printf("%i", INT_MAX);
> }
> 
> But I guess it won't compile in Rawhide. arpa/inet.h comes from glibc-headers 
> which is a subpackage of glibc, so is this a bug in glibc?
Nope. What you describe above simply is unreliable, undocumented
behavior - It might work somewhere, but it also might not work somewhere
else.

POSIX mandates code to include <limits.h> to reliably get INT_MAX.

So all that has happened is: glibc has changed its undocumented
behavior, which some applications had relied upon.
These apps now break, because their implementors missed they had been
relying upon undocumented behavior.

Ralf





-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux