i18n with Solaris 2.5.1



I compiled gtk+-0.99.0 and got error.

my system is (uname -a)
	SunOS arch 5.5.1 Generic_103640-05 sun4u sparc SUNW,Ultra-1
I'm using localy compiled X11R6.3.


% configure --with-locale=ja --disable-static
[...]
checking for <wchar.h> or <wcstr.h>... yes
checking need -DX_LOCALE... no
[...]
checking for <wchar.h> or <wcstr.h>... checking for <wctype.h>... yes
updating cache .././config.cache
creating ./config.status
creating Makefile
creating glibconfig.h

% make
[...]
Making all in gdk
make[2]: Entering directory `/home/matsu/.temporary/tmp/gtk/gtk+-0.99.0/gdk'
../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../glib  -I/usr/X11R6/include   -O3 -DNDEBUG -Wall -DUSE_XIM -c gdk.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../glib -I/usr/X11R6/include -O3 -DNDEBUG -Wall -DUSE_XIM -c -fPIC -DPIC gdk.c
In file included from gdki18n.h:39,
                 from gdk.c:54:
/usr/include/wchar.h:60: arguments given to macro `getwchar'
make[2]: *** [gdk.lo] Error 1
make[2]: Leaving directory `/home/matsu/.temporary/tmp/gtk/gtk+-0.99.0/gdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/matsu/.temporary/tmp/gtk/gtk+-0.99.0'
make: *** [all-recursive-am] Error 2

I read gdk/gdki18n.h and found that gdki18n.h include both wctype.h
and wchar.h.

In wctype.h
	#include <widec.h>
and in widec.h
	#define getwchar()      getwc(stdin)

In wchar.h
	extern wint_t getwchar(void);

wchar.h contains iswxx functions and i/o functions and string conversion
functions.
In the other hand, wctype.h contains only iswxx function, and
widec.h contains other functions which wctype.h does not include.

At least in Solaris 2.5.1, wctype.h and wchar.h seems exclusive.
With following patch, I could compile.
(This assumes iswalnum is provided by wctype.h, wchar.h, or wcstr.h)


                                  -Takashi Matsuda
                                   matsu@arch.comp.kyutech.ac.jp

*** gtk+-0.99.0/gdk/gdki18n.h   Mon Dec  8 01:36:35 1997
--- gtk+-0.99.0.new/gdk/gdki18n.h       Mon Dec 15 12:49:51 1997
***************
*** 27,47 ****
  
  #include <stdlib.h>
  
- #if defined(HAVE_WCTYPE_H) && !defined(X_LOCALE)
- #  include <wctype.h>
- #else 
- #  define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
- #endif /* HAVE_WCTYPE_H || !X_LOCALE */
- 
  #ifndef X_LOCALE
! 
! #ifdef HAVE_WCHAR_H
! #  include <wchar.h>
! #else 
! #  ifdef HAVE_WCSTR_H
  #    include <wcstr.h>
! #  endif 
! #endif 
  
  #else  /* X_LOCALE */
  #include <X11/Xfuncproto.h>
--- 27,44 ----
  
  #include <stdlib.h>
  
  #ifndef X_LOCALE
! # ifdef HAVE_WCTYPE_H
! #  include <wctype.h>
! # else 
! #  ifdef HAVE_WCHAR_H
! #   include <wchar.h>
! #  else
! #   ifdef HAVE_WCSTR_H
  #    include <wcstr.h>
! #   endif /* HAVE_WCSTR_H */
! #  endif  /* HAVE_WCHAR_H */
! # endif   /* HAVE_WCTYPE_H */
  
  #else  /* X_LOCALE */
  #include <X11/Xfuncproto.h>
***************
*** 50,55 ****
--- 47,54 ----
  #ifdef  __cplusplus
  extern "C" {
  #endif
+ 
+ #define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
  
  _XFUNCPROTOBEGIN
  extern int _Xmblen (



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