simplifications suggested by Yavor

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38011 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2014-07-25 10:54:52 +00:00
parent c5164239ef
commit b599e33ced
6 changed files with 551 additions and 182 deletions

View file

@ -1,3 +1,12 @@
2014-07-25 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac: Remove compiler charset options
* config.mak.in: Remove compiler charset options
* configure: regenerate:
Yavor pointed out that the gcc manual is wrong and gcc (all the
versions we support anyway) always uses utf-8 (as does clang),
so we can get rid of stuff intended to try to force it to use utf8
2014-07-13 Yavor Doganov <yavor@gnu.org> 2014-07-13 Yavor Doganov <yavor@gnu.org>
Add large file support (LFS) for NSData. Add large file support (LFS) for NSData.

View file

@ -60,11 +60,6 @@ ifeq ($(BASE_MAKE_LOADED),)
AUXILIARY_CFLAGS += -I$(GNUSTEP_HEADERS)/ObjectiveC2 AUXILIARY_CFLAGS += -I$(GNUSTEP_HEADERS)/ObjectiveC2
endif endif
# For literal string handling, base requires the compiler to store the
# string as UTF-8
AUXILIARY_OBJCFLAGS += @GS_EXEC_CHARSET@
# Now we have definitions to show whether important dependencies have # Now we have definitions to show whether important dependencies have
# been met ... if thse are 0 then some core functi0nailyt is missing. # been met ... if thse are 0 then some core functi0nailyt is missing.

View file

@ -42,11 +42,6 @@ GNUSTEP_BASE_HAVE_AVAHI=@HAVE_AVAHI@
GNUSTEP_BASE_HAVE_ICU=@HAVE_ICU@ GNUSTEP_BASE_HAVE_ICU=@HAVE_ICU@
GNUSTEP_BASE_HAVE_LIBDISPATCH=@HAVE_LIBDISPATCH@ GNUSTEP_BASE_HAVE_LIBDISPATCH=@HAVE_LIBDISPATCH@
# Futureproofing ... if we ever use non-ascii string constants in base,
# we need to make sure that anyone building base uses the expected input
# characterset
AUXILIARY_OBJCFLAGS += @GS_INPUT_CHARSET@
# Default to building only -baseadd # Default to building only -baseadd
# on non *-gnu-* library combos # on non *-gnu-* library combos
ifneq ($(FOUNDATION_LIB),gnu) ifneq ($(FOUNDATION_LIB),gnu)

View file

@ -1,20 +0,0 @@
/*
Copyright (C) 2011 Free Software Foundation
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
*/
int main ()
{
/* Check that latin1 pound sign in source is utf8 in executable
*/
const unsigned char *str = "£";
if (str[0] != 0xc2 || str[1] != 0xa3)
{
return 1;
}
return 0;
}

643
configure vendored
View file

@ -735,8 +735,6 @@ GS_WORDS_BIGENDIAN
OBJC_WITH_GC OBJC_WITH_GC
PKGCONFIG PKGCONFIG
WHOAMI WHOAMI
GS_INPUT_CHARSET
GS_EXEC_CHARSET
EGREP EGREP
GREP GREP
CPP CPP
@ -808,7 +806,7 @@ enable_environment_config_file
enable_importing_config_file enable_importing_config_file
with_default_config with_default_config
with_installation_domain with_installation_domain
enable_unicodeconstants enable_largefile
enable_nxconstantstring enable_nxconstantstring
enable_mixedabi enable_mixedabi
enable_bfd enable_bfd
@ -1501,9 +1499,7 @@ Optional Features:
--disable-importing-config-file --disable-importing-config-file
Disable importing of an existing GNUstep config Disable importing of an existing GNUstep config
file and use inbuilt defaults instead. file and use inbuilt defaults instead.
--disable-unicodeconstants --disable-largefile omit support for large files
Ignores the use of a compiler which does not support unicode
string constants.
--enable-nxconstantstring --enable-nxconstantstring
Enables the use of the NXConstantString class for old compilers. Enables the use of the NXConstantString class for old compilers.
--disable-mixedabi --disable-mixedabi
@ -5201,45 +5197,33 @@ $as_echo "$as_me: error: You are running configure with the compiler ($CC) set t
exit 1 exit 1
fi fi
#-------------------------------------------------------------------- # Large file support needed by NSData/NSFileHandle.
# Check wether the compiler supports UTF-8 constant strings # These macros must be called after AC_USE_SYSTEM_EXTENSIONS because
#-------------------------------------------------------------------- # the `fseeko' declaration may be hidden by default on some systems.
{ $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
GS_EXEC_CHARSET= $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
GS_INPUT_CHARSET= if test "${ac_cv_sys_largefile_source+set}" = set; then
# Check whether --enable-unicodeconstants was given. $as_echo_n "(cached) " >&6
if test "${enable_unicodeconstants+set}" = set; then
enableval=$enable_unicodeconstants;
fi
if test "$enable_unicodeconstants" != "no"; then
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:$LINENO: checking whether compiler supports UTF-8 constants in executable" >&5
$as_echo_n "checking whether compiler supports UTF-8 constants in executable... " >&6; }
saved_CFLAGS="$CFLAGS"
saved_LANG="$LANG"
saved_LC_ALL="$LC_ALL"
export LANG="en_US.ISO-8859-1"
export LC_ALL="en_US.ISO-8859-1"
# We are working in a latin1 locale so we can build a program containing
# a latin1 pound character, and see if the executable has a utf-8 literal.
if test "$cross_compiling" = yes; then
utf8literal_ok="$cross_utf8literal_ok"
else else
while :; do
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */ /* confdefs.h. */
_ACEOF _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include "$srcdir/config/config.constant-string-encoding.c" #include <sys/types.h> /* for off_t */
#include <stdio.h>
int
main ()
{
int (*fp) (FILE *, off_t, int) = fseeko;
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
;
return 0;
}
_ACEOF _ACEOF
rm -f conftest$ac_exeext rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link" if { (ac_try="$ac_link"
case "(($ac_try" in case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@ -5247,53 +5231,49 @@ case "(($ac_try" in
esac esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5 $as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5 (eval "$ac_link") 2>conftest.er1
ac_status=$? ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext' (exit $ac_status); } && {
{ (case "(($ac_try" in test -z "$ac_c_werror_flag" ||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; test ! -s conftest.err
*) ac_try_echo=$ac_try;; } && test -s conftest$ac_exeext && {
esac test "$cross_compiling" = yes ||
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_test_x conftest$ac_exeext
$as_echo "$ac_try_echo") >&5 }; then
(eval "$ac_try") 2>&5 ac_cv_sys_largefile_source=no; break
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
utf8literal_ok=yes
else else
$as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
utf8literal_ok=no
fi fi
rm -rf conftest.dSYM rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
fi conftest$ac_exeext conftest.$ac_ext
if test "$utf8literal_ok" = "yes"; then
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; };
else
# The compiler did not produce a utf-8 literal ... see if it does so when
# given the appropriate flags to tell it what charactersets to use.
CFLAGS="$CFLAGS -finput-charset=ISO-8859-1 -fexec-charset=UTF-8"
if test "$cross_compiling" = yes; then
utf8literal_ok="$cross_utf8literal_ok"
else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */ /* confdefs.h. */
_ACEOF _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include "$srcdir/config/config.constant-string-encoding.c" #define _LARGEFILE_SOURCE 1
#include <sys/types.h> /* for off_t */
#include <stdio.h>
int
main ()
{
int (*fp) (FILE *, off_t, int) = fseeko;
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
;
return 0;
}
_ACEOF _ACEOF
rm -f conftest$ac_exeext rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link" if { (ac_try="$ac_link"
case "(($ac_try" in case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@ -5301,57 +5281,518 @@ case "(($ac_try" in
esac esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5 $as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5 (eval "$ac_link") 2>conftest.er1
ac_status=$? ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext' (exit $ac_status); } && {
{ (case "(($ac_try" in test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
ac_cv_sys_largefile_source=1; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
ac_cv_sys_largefile_source=unknown
break
done
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
$as_echo "$ac_cv_sys_largefile_source" >&6; }
case $ac_cv_sys_largefile_source in #(
no | unknown) ;;
*)
cat >>confdefs.h <<_ACEOF
#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
_ACEOF
;;
esac
rm -rf conftest*
# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
# in glibc 2.1.3, but that breaks too many other things.
# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
if test $ac_cv_sys_largefile_source != unknown; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_FSEEKO 1
_ACEOF
fi
# Check whether --enable-largefile was given.
if test "${enable_largefile+set}" = set; then
enableval=$enable_largefile;
fi
if test "$enable_largefile" != no; then
{ $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
if test "${ac_cv_sys_largefile_CC+set}" = set; then
$as_echo_n "(cached) " >&6
else
ac_cv_sys_largefile_CC=no
if test "$GCC" != yes; then
ac_save_CC=$CC
while :; do
# IRIX 6.2 and later do not support large files by default,
# so use the C compiler's -n32 option if that helps.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;; *) ac_try_echo=$ac_try;;
esac esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5 $as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5 (eval "$ac_compile") 2>conftest.er1
ac_status=$? ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); } && {
utf8literal_ok=yes test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
break
else else
$as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
utf8literal_ok=no
fi
rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi fi
rm -f core conftest.err conftest.$ac_objext
CC="$CC -n32"
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_sys_largefile_CC=' -n32'; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
if test "$utf8literal_ok" = "yes"; then
{ $as_echo "$as_me:$LINENO: result: yes" >&5 fi
$as_echo "yes" >&6; };
GS_EXEC_CHARSET=-fexec-charset=UTF-8 rm -f core conftest.err conftest.$ac_objext
GS_INPUT_CHARSET=-finput-charset=UTF-8 break
else done
{ $as_echo "$as_me:$LINENO: result: no" >&5 CC=$ac_save_CC
$as_echo "no" >&6; }; rm -f conftest.$ac_ext
{ $as_echo "$as_me:$LINENO: WARNING: Your compiler does not appear to support locales or command line options to control handling of charactersets, so we cannot be sure that the compiled code will contain the UTF-8 string literals expected by gnustep-base. This means that using any source code code containing non US-ASCII text in string literals may give unexpected results (or crashes) at runtime. However, as long as any such literals only use the UTF-8 characterset, this is unlikely to be a problem (since old/faulty compilers are likely to pass the UTF-8 literals through to the compiled code). Please configure using --disable-unicodeconstants to avoid seeing this warning." >&5
$as_echo "$as_me: WARNING: Your compiler does not appear to support locales or command line options to control handling of charactersets, so we cannot be sure that the compiled code will contain the UTF-8 string literals expected by gnustep-base. This means that using any source code code containing non US-ASCII text in string literals may give unexpected results (or crashes) at runtime. However, as long as any such literals only use the UTF-8 characterset, this is unlikely to be a problem (since old/faulty compilers are likely to pass the UTF-8 literals through to the compiled code). Please configure using --disable-unicodeconstants to avoid seeing this warning." >&2;}
fi fi
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
$as_echo "$ac_cv_sys_largefile_CC" >&6; }
if test "$ac_cv_sys_largefile_CC" != no; then
CC=$CC$ac_cv_sys_largefile_CC
fi fi
export LANG="$saved_LANG"
export LC_ALL="$saved_LC_ALL" { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
CFLAGS="$saved_CFLAGS" $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
ac_ext=c if test "${ac_cv_sys_file_offset_bits+set}" = set; then
ac_cpp='$CPP $CPPFLAGS' $as_echo_n "(cached) " >&6
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' else
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' while :; do
ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_sys_file_offset_bits=no; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_sys_file_offset_bits=64; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_sys_file_offset_bits=unknown
break
done
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
case $ac_cv_sys_file_offset_bits in #(
no | unknown) ;;
*)
cat >>confdefs.h <<_ACEOF
#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
_ACEOF
;;
esac
rm -rf conftest*
if test $ac_cv_sys_file_offset_bits = unknown; then
{ $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
if test "${ac_cv_sys_large_files+set}" = set; then
$as_echo_n "(cached) " >&6
else
while :; do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_sys_large_files=no; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _LARGE_FILES 1
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_sys_large_files=1; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_sys_large_files=unknown
break
done
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
$as_echo "$ac_cv_sys_large_files" >&6; }
case $ac_cv_sys_large_files in #(
no | unknown) ;;
*)
cat >>confdefs.h <<_ACEOF
#define _LARGE_FILES $ac_cv_sys_large_files
_ACEOF
;;
esac
rm -rf conftest*
fi
fi
{ $as_echo "$as_me:$LINENO: checking for off_t" >&5
$as_echo_n "checking for off_t... " >&6; }
if test "${ac_cv_type_off_t+set}" = set; then
$as_echo_n "(cached) " >&6
else
ac_cv_type_off_t=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
if (sizeof (off_t))
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
if (sizeof ((off_t)))
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
:
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_type_off_t=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
$as_echo "$ac_cv_type_off_t" >&6; }
if test "x$ac_cv_type_off_t" = x""yes; then
:
else
cat >>confdefs.h <<_ACEOF
#define off_t long int
_ACEOF
fi
#-------------------------------------------------------------------- #--------------------------------------------------------------------

View file

@ -1082,57 +1082,6 @@ AH_BOTTOM([
AC_SYS_LARGEFILE AC_SYS_LARGEFILE
AC_TYPE_OFF_T AC_TYPE_OFF_T
#--------------------------------------------------------------------
# Check wether the compiler supports UTF-8 constant strings
#--------------------------------------------------------------------
GS_EXEC_CHARSET=
GS_INPUT_CHARSET=
AC_ARG_ENABLE(unicodeconstants,
[ --disable-unicodeconstants
Ignores the use of a compiler which does not support unicode
string constants.],,)
if test "$enable_unicodeconstants" != "no"; then
AC_LANG_PUSH(C)
AC_MSG_CHECKING(whether compiler supports UTF-8 constants in executable)
saved_CFLAGS="$CFLAGS"
saved_LANG="$LANG"
saved_LC_ALL="$LC_ALL"
export LANG="en_US.ISO-8859-1"
export LC_ALL="en_US.ISO-8859-1"
# We are working in a latin1 locale so we can build a program containing
# a latin1 pound character, and see if the executable has a utf-8 literal.
AC_TRY_RUN([#include "$srcdir/config/config.constant-string-encoding.c"],
utf8literal_ok=yes,
utf8literal_ok=no,
utf8literal_ok="$cross_utf8literal_ok")
if test "$utf8literal_ok" = "yes"; then
AC_MSG_RESULT([yes]);
else
# The compiler did not produce a utf-8 literal ... see if it does so when
# given the appropriate flags to tell it what charactersets to use.
CFLAGS="$CFLAGS -finput-charset=ISO-8859-1 -fexec-charset=UTF-8"
AC_TRY_RUN([#include "$srcdir/config/config.constant-string-encoding.c"],
utf8literal_ok=yes,
utf8literal_ok=no,
utf8literal_ok="$cross_utf8literal_ok")
if test "$utf8literal_ok" = "yes"; then
AC_MSG_RESULT([yes]);
GS_EXEC_CHARSET=-fexec-charset=UTF-8
GS_INPUT_CHARSET=-finput-charset=UTF-8
else
AC_MSG_RESULT([no]);
AC_MSG_WARN([Your compiler does not appear to support locales or command line options to control handling of charactersets, so we cannot be sure that the compiled code will contain the UTF-8 string literals expected by gnustep-base. This means that using any source code code containing non US-ASCII text in string literals may give unexpected results (or crashes) at runtime. However, as long as any such literals only use the UTF-8 characterset, this is unlikely to be a problem (since old/faulty compilers are likely to pass the UTF-8 literals through to the compiled code). Please configure using --disable-unicodeconstants to avoid seeing this warning.])
fi
fi
export LANG="$saved_LANG"
export LC_ALL="$saved_LC_ALL"
CFLAGS="$saved_CFLAGS"
AC_LANG_POP(C)
fi
AC_SUBST(GS_EXEC_CHARSET)
AC_SUBST(GS_INPUT_CHARSET)
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Check how to enable builtins for atomic operations # Check how to enable builtins for atomic operations
#-------------------------------------------------------------------- #--------------------------------------------------------------------