Use stdint.h instead of limits.h for UINT*_MAX definitions

While Solaris allows either one, C99 only requires them in stdint.h
and some platforms don't include them via limits.h

Corrects tinderbox reported errors on Fedora 11 build machine:

http://tinderbox.x.org/builds/2010-05-06-0019/logs/libXdmcp/#build

AA32.c: In function 'XdmcpAllocARRAY32':
AA32.c:47: error: 'UINT8_MAX' undeclared (first use in this function)

AA8.c: In function 'XdmcpAllocARRAY8':
AA8.c:47: error: 'UINT16_MAX' undeclared (first use in this function)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

Compiles clean on GNU/Linux AMD64
Tested-by: Gaetan Nadon <memsize@videotron.ca>
This commit is contained in:
Alan Coopersmith
2010-05-06 15:38:01 -07:00
parent 30e388a828
commit 1b22d07fc1
8 changed files with 8 additions and 8 deletions

2
AA16.c
View File

@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xmd.h> #include <X11/Xmd.h>
#include <X11/Xdmcp.h> #include <X11/Xdmcp.h>
#include <limits.h> #include <stdint.h>
int int
XdmcpAllocARRAY16 (ARRAY16Ptr array, int length) XdmcpAllocARRAY16 (ARRAY16Ptr array, int length)

2
AA32.c
View File

@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xmd.h> #include <X11/Xmd.h>
#include <X11/Xdmcp.h> #include <X11/Xdmcp.h>
#include <limits.h> #include <stdint.h>
int int
XdmcpAllocARRAY32 (ARRAY32Ptr array, int length) XdmcpAllocARRAY32 (ARRAY32Ptr array, int length)

2
AA8.c
View File

@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xmd.h> #include <X11/Xmd.h>
#include <X11/Xdmcp.h> #include <X11/Xdmcp.h>
#include <limits.h> #include <stdint.h>
int int
XdmcpAllocARRAY8 (ARRAY8Ptr array, int length) XdmcpAllocARRAY8 (ARRAY8Ptr array, int length)

View File

@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xmd.h> #include <X11/Xmd.h>
#include <X11/Xdmcp.h> #include <X11/Xdmcp.h>
#include <limits.h> #include <stdint.h>
int int
XdmcpAllocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length) XdmcpAllocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length)

View File

@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xmd.h> #include <X11/Xmd.h>
#include <X11/Xdmcp.h> #include <X11/Xdmcp.h>
#include <limits.h> #include <stdint.h>
int int
XdmcpReallocARRAY16 (ARRAY16Ptr array, int length) XdmcpReallocARRAY16 (ARRAY16Ptr array, int length)

View File

@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xmd.h> #include <X11/Xmd.h>
#include <X11/Xdmcp.h> #include <X11/Xdmcp.h>
#include <limits.h> #include <stdint.h>
int int
XdmcpReallocARRAY32 (ARRAY32Ptr array, int length) XdmcpReallocARRAY32 (ARRAY32Ptr array, int length)

2
RaA8.c
View File

@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xmd.h> #include <X11/Xmd.h>
#include <X11/Xdmcp.h> #include <X11/Xdmcp.h>
#include <limits.h> #include <stdint.h>
int int
XdmcpReallocARRAY8 (ARRAY8Ptr array, int length) XdmcpReallocARRAY8 (ARRAY8Ptr array, int length)

View File

@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xmd.h> #include <X11/Xmd.h>
#include <X11/Xdmcp.h> #include <X11/Xdmcp.h>
#include <limits.h> #include <stdint.h>
int int
XdmcpReallocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length) XdmcpReallocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length)