Hi,

currently libiberty will compile strncmp while building a cross compiler.  This 
is due to the fact that the test for strncmp is a TRY_RUN test.

My issue is that VMS doesn't like a redefinition of a standard function, 
because it always uses a shared library for C and doesn't support symbol 
preemption.

I'd like to reverse the decision for strncmp in cross-case.  I understand that 
there is no ideal solution as both decision may fail on different setup.  But:
* according to the comment, the test was made for SunOS4 (at least), which is 
not anymore supported by gcc
* defining a standard ANSI-C function in user code is not valid (as far as I 
understand from the standard)

Ok for trunk ?

Tristan.

libiberty/
2011-12-19  Tristan Gingold  <ging...@adacore.com>

        * aclocal.m4: Assume strncmp works in cross case.
        * configure: Regenerate.

diff --git a/libiberty/aclocal.m4 b/libiberty/aclocal.m4
index a528604..bf8a907 100644
--- a/libiberty/aclocal.m4
+++ b/libiberty/aclocal.m4
@@ -72,7 +72,7 @@ main ()
   exit (0);
 }
 ], ac_cv_func_strncmp_works=yes, ac_cv_func_strncmp_works=no,
-  ac_cv_func_strncmp_works=no)
+  ac_cv_func_strncmp_works=yes)
 rm -f core core.* *.core])
 if test $ac_cv_func_strncmp_works = no ; then
   AC_LIBOBJ([strncmp])

Reply via email to