Re: Compiling 4.3.3 on Tru64 V5.1b

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Didier Godefroy wrote:

You should first look the line 43 in :

/srv/build/obj/alphaev56-dec-osf5.1b/libstdc++-v3/include/tr1_impl/cctype

cctype there has this:

#if _GLIBCXX_USE_C99_CTYPE_TR1

#undef isblank

namespace std
{
_GLIBCXX_BEGIN_NAMESPACE_TR1

  using ::isblank;

_GLIBCXX_END_NAMESPACE_TR1
}
#endif


And the line 43 is of course the one with isblank

because the problem is there... My thought (by the sources) is that
somehow the '_GLIBCXX_USE_C99_CTYPE_TR1' (in
'libstdc++-v3/include/tr1/cctype'), is defined by the configure... What
it means and why could be investigated from the possible 'config.h' in
libstdc++-v3 build directory....

Ok, it is definitely defining it:

/* Define if C99 functions in <ctype.h> should be imported in <tr1/cctype>
in
   namespace std::tr1. */
#define _GLIBCXX_USE_C99_CTYPE_TR1 1

I would simply comment this away. After configuring for Linux there
was a '/* #undef _GLIBCXX_USE_C99_CTYPE_TR1 */' instead of this...

After the fix it may happen that 'make' rebuilds everything in the
'$target/libstdc++-v3' using the fixed 'config.h'.

And in config.log:

configure:39006: checking for ISO C99 support to TR1 in <ctype.h>
configure:39031:  /srv/build/obj/./gcc/xgcc -shared-libgcc
-B/srv/build/obj/./gcc -nostdinc++
-L/srv/build/obj/alphaev56-dec-osf5.1b/libstdc++-v3/src -L/sr$
configure:39037: $? = 0
configure:39041: test -z
                         || test ! -s conftest.err
configure:39044: $? = 0
configure:39047: test -s conftest.o
configure:39050: $? = 0
configure:39063: result: yes


And so GLIBCXX_USE_C99_CTYPE_TR1 is defined after that.
So something isn't working right in this test and it returns a wrong result.

Hmmm, searching the check in 'configure' gives :

echo "$as_me:$LINENO: checking for ISO C99 support to TR1 in <ctype.h>" >&5 echo $ECHO_N "checking for ISO C99 support to TR1 in <ctype.h>... $ECHO_C" >&6
  if test "${ac_c99_ctype_tr1+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ctype.h>
int
main ()
{
int ch;
                  int ret;
                  ret = isblank(ch);

  ;
  return 0;
}

So it seems that maybe 'isblank()' was found in the system C libraries
(in 'libc') but there was no prototype for it anywhere... This seems
to be a bug in 'fixinc' which should fix the "buggy" target headers...

Solaris 10 has in 'include/iso/ctype_c99.h' :

/*
 * The following have been added as a result of the ISO/IEC 9899:1999
 * standard. For a strictly conforming C application, visibility is
 * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
 * For non-strictly conforming C applications, there are no restrictions
 * on the C namespace.
 */

#if defined(__STDC__)

#if (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
        defined(_XPG6) || defined(_STDC_C99) || defined(__EXTENSIONS__)
extern int isblank(int);
#endif

The Tru64 V5.1b headers maybe should have something equivalent if there
is this function implemented...


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux