From 4aef973c2eae349b95773374d2f8afd0dded3e56 Mon Sep 17 00:00:00 2001 From: Philippe De Muyter Date: Thu, 4 May 2000 17:40:25 +0200 Subject: [PATCH] sort.h (sys/types.h): File included unconditionnaly. * sort.h (sys/types.h): File included unconditionnaly. (stddef.h): File include only #ifdef __STDC__. * sort.c (UCHAR_MAX): Provide fallback definition. From-SVN: r33670 --- include/ChangeLog | 5 +++++ include/sort.h | 3 +++ libiberty/ChangeLog | 4 ++++ libiberty/sort.c | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/include/ChangeLog b/include/ChangeLog index 1329b0fce723..f448555417e1 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +Thu May 4 17:15:26 2000 Philippe De Muyter + + * sort.h (sys/types.h): File included unconditionnaly. + (stddef.h): File include only #ifdef __STDC__. + 2000-05-03 Zack Weinberg * symcat.h: Remove #endif label. diff --git a/include/sort.h b/include/sort.h index c20575707a0b..c8e1d5547d1b 100644 --- a/include/sort.h +++ b/include/sort.h @@ -22,7 +22,10 @@ Boston, MA 02111-1307, USA. */ #ifndef SORT_H #define SORT_H +#include /* For size_t */ +#ifdef __STDC__ #include +#endif /* __STDC__ */ #ifdef __cplusplus extern "C" { diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 77cbf4faa014..7dc83320d23e 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,7 @@ +Thu May 4 17:14:41 2000 Philippe De Muyter + + * sort.c (UCHAR_MAX): Provide fallback definition. + 2000-04-29 Alexandre Oliva * Makefile.in (maintainer-clean-subdir): Fix handling of empty diff --git a/libiberty/sort.c b/libiberty/sort.c index 4fd3ef9b98ee..b66a9e1e8567 100644 --- a/libiberty/sort.c +++ b/libiberty/sort.c @@ -29,6 +29,10 @@ Boston, MA 02111-1307, USA. */ #include #endif +#ifndef UCHAR_MAX +#define UCHAR_MAX ((unsigned char)(-1)) +#endif + /* POINTERS and WORK are both arrays of N pointers. When this function returns POINTERS will be sorted in ascending order. */