Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2005-03-17 23:11:23 +0300
committerJeff Johnston <jjohnstn@redhat.com>2005-03-17 23:11:23 +0300
commitdd801fdabd7e6d80e69cbde473b723a6ef7cff86 (patch)
tree6927d01de5dcee48cb0966fd11a634b4ba399195 /newlib/configure.in
parent993317d0ed9a7bee9b461e63a762b6df249ef867 (diff)
2005-03-17 Jeff Johnston <jjohnstn@redhat.com>
* configure.in: Add new check to see if compiler supports aliasing of arrays and define _HAVE_ARRAY_ALIASING if true. * configure: Regenerated. * Makefile.in: Ditto. * newlib.hin: Add _HAVE_ARRAY_ALIASING. * libc/ctype/ctype_.c: Check for _HAVE_ARRAY_ALIASING before aliasing the _ctype_ array to _ctype_b. * libc/include/ctype.h: Change macros to use __ctype_ptr. Mark _ctype_ as deprecated.
Diffstat (limited to 'newlib/configure.in')
-rw-r--r--newlib/configure.in19
1 files changed, 19 insertions, 0 deletions
diff --git a/newlib/configure.in b/newlib/configure.in
index d666136a1..84e1f745a 100644
--- a/newlib/configure.in
+++ b/newlib/configure.in
@@ -354,6 +354,25 @@ if test $libc_cv_initfinit_array = yes; then
AC_DEFINE_UNQUOTED(HAVE_INITFINI_ARRAY)
fi
+AC_CACHE_CHECK(for array aliasing support,
+ libc_cv_array_aliasing, [dnl
+cat > conftest.c <<EOF
+char x[3] = { 'a', 'b', 'c' };
+extern char y[2] __attribute__((alias ("x+1")));
+EOF
+if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c conftest.c
+ 1>&AS_MESSAGE_LOG_FD])
+then
+ libc_cv_array_aliasing=yes
+else
+ libc_cv_array_aliasing=no
+fi
+rm -f conftest*])
+AC_SUBST(libc_cv_array_aliasing)
+if test $libc_cv_array_aliasing = yes; then
+ AC_DEFINE_UNQUOTED(_HAVE_ARRAY_ALIASING)
+fi
+
AC_OUTPUT(Makefile,
[if test -n "$CONFIG_FILES"; then
unset ac_file