public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* bootstrap/4269: HAVE_NL_LANGINFO doesn't ensure that CODESET is available
@ 2001-09-08 13:46 bunk
  0 siblings, 0 replies; only message in thread
From: bunk @ 2001-09-08 13:46 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4269
>Category:       bootstrap
>Synopsis:       HAVE_NL_LANGINFO doesn't ensure that CODESET is available
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 08 13:46:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     bunk@fs.tum.de
>Release:        gcc-3.0.1
>Organization:
>Environment:
sparc-unknown-netbsdelf1.5 with the patch from
  http://gcc.gnu.org/ml/gcc-patches/2001-07/msg02242.html
>Description:
Some files include the following:

#ifdef HAVE_ICONV
#ifdef HAVE_LANGINFO_CODESET
  setlocale (LC_CTYPE, "");
  if (current_encoding == NULL)
    current_encoding = nl_langinfo (CODESET);
#endif /* HAVE_LANGINFO_CODESET */
#endif /* HAVE_ICONV */


The problem is that NetBSD/sparc-1.5 has a
/usr/include/langinfo.h that doesn't define CODESET.

>How-To-Repeat:
stage1/xgcc -Bstage1/ -B/usr/local/sparc-unknown-netbsdelf1.5/bin/ -c  -DIN_GCC 
   -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes   -D
HAVE_CONFIG_H    -I. -Ijava -I../../gcc -I../../gcc/java -I../../gcc/config -I..
/../gcc/../include ../../gcc/java/jcf-parse.c -o java/jcf-parse.o
../../gcc/java/jcf-parse.c: In function `parse_source_file_1':
../../gcc/java/jcf-parse.c:876: `CODESET' undeclared (first use in this function
)
../../gcc/java/jcf-parse.c:876: (Each undeclared identifier is reported only onc
e
../../gcc/java/jcf-parse.c:876: for each function it appears in.)
make[2]: *** [java/jcf-parse.o] Error 1
make[2]: Leaving directory `/aux.old/gcc-3.0.1/compile/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/aux.old/gcc-3.0.1/compile/gcc'
make: *** [bootstrap] Error 2
>Fix:
gcc must check whether /usr/include/langinfo.h defines
CODESET.

libiconv-1.7 includes the following macro:

AC_DEFUN(jm_LANGINFO_CODESET,
[
  AC_CHECK_HEADERS(langinfo.h)
  AC_CHECK_FUNCS(nl_langinfo)

  AC_CACHE_CHECK([for nl_langinfo and CODESET], jm_cv_langinfo_codeset,
    [AC_TRY_LINK([#include <langinfo.h>],
      [char* cs = nl_langinfo(CODESET);],
      jm_cv_langinfo_codeset=yes,
      jm_cv_langinfo_codeset=no)
    ])
  if test $jm_cv_langinfo_codeset = yes; then
    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
  fi
])
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-09-08 13:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-08 13:46 bootstrap/4269: HAVE_NL_LANGINFO doesn't ensure that CODESET is available bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).