[PATCH: libXdmcp] Use stdint.h instead of limits.h for UINT*_MAX definitions

Alan Coopersmith alan.coopersmith at oracle.com
Thu May 6 15:40:37 PDT 2010


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 at oracle.com>
---
 AA16.c   |    2 +-
 AA32.c   |    2 +-
 AA8.c    |    2 +-
 AofA8.c  |    2 +-
 RaA16.c  |    2 +-
 RaA32.c  |    2 +-
 RaA8.c   |    2 +-
 RaAoA8.c |    2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/AA16.c b/AA16.c
index 049a24a..5e40dae 100644
--- a/AA16.c
+++ b/AA16.c
@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
 #include <X11/X.h>
 #include <X11/Xmd.h>
 #include <X11/Xdmcp.h>
-#include <limits.h>
+#include <stdint.h>
 
 int
 XdmcpAllocARRAY16 (ARRAY16Ptr array, int length)
diff --git a/AA32.c b/AA32.c
index 5687a9a..020061c 100644
--- a/AA32.c
+++ b/AA32.c
@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
 #include <X11/X.h>
 #include <X11/Xmd.h>
 #include <X11/Xdmcp.h>
-#include <limits.h>
+#include <stdint.h>
 
 int
 XdmcpAllocARRAY32 (ARRAY32Ptr array, int length)
diff --git a/AA8.c b/AA8.c
index 1cb29d4..0b0e09d 100644
--- a/AA8.c
+++ b/AA8.c
@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
 #include <X11/X.h>
 #include <X11/Xmd.h>
 #include <X11/Xdmcp.h>
-#include <limits.h>
+#include <stdint.h>
 
 int
 XdmcpAllocARRAY8 (ARRAY8Ptr array, int length)
diff --git a/AofA8.c b/AofA8.c
index 93cf4e6..8c751a7 100644
--- a/AofA8.c
+++ b/AofA8.c
@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
 #include <X11/X.h>
 #include <X11/Xmd.h>
 #include <X11/Xdmcp.h>
-#include <limits.h>
+#include <stdint.h>
 
 int
 XdmcpAllocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length)
diff --git a/RaA16.c b/RaA16.c
index 96f87b5..44bc1bb 100644
--- a/RaA16.c
+++ b/RaA16.c
@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
 #include <X11/X.h>
 #include <X11/Xmd.h>
 #include <X11/Xdmcp.h>
-#include <limits.h>
+#include <stdint.h>
 
 int
 XdmcpReallocARRAY16 (ARRAY16Ptr array, int length)
diff --git a/RaA32.c b/RaA32.c
index 93037e3..0c10641 100644
--- a/RaA32.c
+++ b/RaA32.c
@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
 #include <X11/X.h>
 #include <X11/Xmd.h>
 #include <X11/Xdmcp.h>
-#include <limits.h>
+#include <stdint.h>
 
 int
 XdmcpReallocARRAY32 (ARRAY32Ptr array, int length)
diff --git a/RaA8.c b/RaA8.c
index ac85ae7..fa4de49 100644
--- a/RaA8.c
+++ b/RaA8.c
@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
 #include <X11/X.h>
 #include <X11/Xmd.h>
 #include <X11/Xdmcp.h>
-#include <limits.h>
+#include <stdint.h>
 
 int
 XdmcpReallocARRAY8 (ARRAY8Ptr array, int length)
diff --git a/RaAoA8.c b/RaAoA8.c
index 6ef5a09..0d186db 100644
--- a/RaAoA8.c
+++ b/RaAoA8.c
@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
 #include <X11/X.h>
 #include <X11/Xmd.h>
 #include <X11/Xdmcp.h>
-#include <limits.h>
+#include <stdint.h>
 
 int
 XdmcpReallocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length)
-- 
1.5.6.5



More information about the xorg-devel mailing list