mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Detect broken PTR limits (notably solaris 8) and provide replacements
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37414 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0e287d4440
commit
961344bc89
4 changed files with 3342 additions and 18381 deletions
|
@ -1,3 +1,12 @@
|
|||
2013-11-26 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Headers/GNUstepBase/GSConfig.h.in
|
||||
* configure.ac
|
||||
Detect broken PTR limits (notably solaris 8) and provide replacements
|
||||
|
||||
* configure
|
||||
regenerated
|
||||
|
||||
2013-11-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GNUstepBase/GSConfig.h.in: temporarily redefine BOOL while
|
||||
|
|
|
@ -148,6 +148,19 @@ typedef gsuaddr gsaddr;
|
|||
#define GS_HAVE_I64 @GS_HAVE_I64@
|
||||
#define GS_HAVE_I128 @GS_HAVE_I128@
|
||||
|
||||
/*
|
||||
* PTR Limit information replacements for buggy headers
|
||||
*/
|
||||
#if @BUGGY_PTR_LIMITS@
|
||||
#undefine INTPTR_MAX
|
||||
#define INTPTR_MAX @GS_INTPTR_MAX@
|
||||
#undefine INTPTR_MIN
|
||||
#define INTPTR_MIN @GS_INTPTR_MIN@
|
||||
#undefine UINTPTR_MAX
|
||||
#define UINTPTR_MAX @GS_UINTPTR_MAX@
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Do we have zlib for file handle compression?
|
||||
*/
|
||||
|
|
43
configure.ac
43
configure.ac
|
@ -1627,6 +1627,49 @@ else
|
|||
fi
|
||||
AC_SUBST(_GSC_S_LNG_LNG)
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Limit information needed for foundation headers.
|
||||
#--------------------------------------------------------------------
|
||||
AC_LANG_PUSH(C)
|
||||
AC_MSG_CHECKING([for working INTPTR_MAX, INTPTR_MIN, UINTPTR_MAX]);
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <inttypes.h>]],
|
||||
[[int imax = INTPTR_MAX; int imin = INTPTR_MIN; unsigned umax = UINTPTR_MAX;]])],
|
||||
have_valid_ptr_limits=yes,
|
||||
have_valid_ptr_limits=no);
|
||||
if test "$have_valid_ptr_limits" = "yes"; then
|
||||
AC_MSG_RESULT([yes]);
|
||||
BUGGY_PTR_LIMITS=0
|
||||
else
|
||||
AC_MSG_RESULT([no]);
|
||||
BUGGY_PTR_LIMITS=1
|
||||
case "$target_os" in
|
||||
solaris*)
|
||||
case "$target_cpu" in
|
||||
sparc64*|x86_64*)
|
||||
GS_INTPTR_MAX="INT64_MAX"
|
||||
GS_INTPTR_MIN="INT64_MIN"
|
||||
GS_UINTPTR_MAX="UINT64_MAX"
|
||||
;;
|
||||
sparc*|i386*|i586*|i686*)
|
||||
GS_INTPTR_MAX="INT32_MAX"
|
||||
GS_INTPTR_MIN="INT32_MIN"
|
||||
GS_UINTPTR_MAX="UINT32_MAX"
|
||||
;;
|
||||
*) ;;
|
||||
esac ;;
|
||||
# support for other OS's with broken macros to be added here (HP-UX, IRIX being known)
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(GS_INTPTR_MAX)
|
||||
AC_SUBST(GS_INTPTR_MIN)
|
||||
AC_SUBST(GS_UINTPTR_MAX)
|
||||
fi
|
||||
AC_SUBST(BUGGY_PTR_LIMITS)
|
||||
AC_LANG_POP(C)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Setup dynamic linking
|
||||
#--------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue