This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib 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]

INT_MAX and LONG_MAX used before defined in sys/config.h


After some discussion with Jeff Johnston as to how to best address
this problem, we ended up agreeing that it was best to include
<limits.h> instead of duplicating the relevant bits from gcc, and then
possibly clean up code that might needlessly define these macros in
sys/config.h as opportunities show up.  I'm checking this in.

Index: newlib/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* libc/include/sys/config.h: Include limits.h.

Index: newlib/libc/include/sys/config.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/config.h,v
retrieving revision 1.14
diff -u -p -r1.14 config.h
--- newlib/libc/include/sys/config.h 25 Feb 2002 23:51:10 -0000 1.14
+++ newlib/libc/include/sys/config.h 13 Apr 2002 10:03:42 -0000
@@ -129,6 +129,8 @@
 typedef short int __int16_t;
 typedef unsigned short int __uint16_t;
 
+#include <limits.h>
+
 #if INT_MAX == 32767
 typedef long int __int32_t;
 typedef unsigned long int __uint32_t;

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

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