This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH/RFA] Internationalize ctype functionality


> Date: Tue, 31 Mar 2009 11:31:50 +0200
> From: Corinna Vinschen <vinschen@redhat.com>

> Thanks, applied.

With the ChangeLog entry that starts with

2009-03-31  Corinna Vinschen  <corinna@vinschen.de>

	* libc/ctype/Makefile.am: Remove _tolower.c and _toupper.c
	source files.  Add a dependency rule for ctype_o to note

I get, for cris-elf:

/tmp/hpautotest-gcc43/cris-elf/gccobj/./gcc/xgcc -B/tmp/hpautotest-gcc43/cris-elf/gccobj/./gcc/ -nostdinc -B/tmp/hpautotest-gcc43/cris-elf/gccobj/cris-elf/v10/newlib/ -isystem /tmp/hpautotest-gcc43/cris-elf/gccobj/cris-elf/v10/newlib/targ-include -isystem /tmp/hpautotest-gcc43/gcc/newlib/libc/include -B/tmp/hpautotest-gcc43/cris-elf/gccobj/cris-elf/v10/libgloss/cris -L/tmp/hpautotest-gcc43/cris-elf/gccobj/cris-elf/v10/libgloss/libnosys -L/tmp/hpautotest-gcc43/gcc/libgloss/cris -B/tmp/hpautotest-gcc43/cris-elf/pre/cris-elf/bin/ -B/tmp/hpautotest-gcc43/cris-elf/pre/cris-elf/lib/ -isystem /tmp/hpautotest-gcc43/cris-elf/pre/cris-elf/include -isystem /tmp/hpautotest-gcc43/cris-elf/pre/cris-elf/sys-include  -march=v10 -mbest-lib-options -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -I/tmp/hpautotest-gcc43/gcc/newlib/libc/ctype -O2 -DHAVE_RENAME -D_USE_WRITE -DCOMPACT_CTYPE -fno-!
 builtin      -O2 -g -g -O2    -march=v10 -mbest-lib-options -c -o lib_a-ctype_.o `test -f 'ctype_.c' || echo '/tmp/hpautotest-gcc43/gcc/newlib/libc/ctype/'`ctype_.c
/tmp/hpautotest-gcc43/gcc/newlib/libc/ctype/ctype_.c:133: error: conflicting types for '__ctype_ptr__'
/tmp/hpautotest-gcc43/gcc/newlib/libc/include/ctype.h:42: error: previous declaration of '__ctype_ptr__' was here

To wit, you missed one place.

--- pre/newlib/libc/ctype/ctype_.c	Thu Mar 26 11:02:16 2009
+++ aft/newlib/libc/ctype/ctype_.c	Tue Mar 31 11:47:32 2009
...
-#  if defined(__CYGWIN__)
-_CONST char __declspec(dllexport) *__ctype_ptr = _ctype_b + 128;
-_CONST char __declspec(dllexport) *__ctype_ptr__ = _ctype_b + 127;
-#  else
-_CONST char *__ctype_ptr = _ctype_b + 128;
-_CONST char *__ctype_ptr__ = _ctype_b + 127;
-#  endif
... (at line 101):
+char __EXPORT *__ctype_ptr__ = _ctype_b + 127;

Still unpatched at line 133:
_CONST char *__ctype_ptr__ = _ctype_;

--- pre/newlib/libc/include/ctype.h	Thu Mar 26 11:02:16 2009
+++ aft/newlib/libc/include/ctype.h	Tue Mar 31 11:47:32 2009
...
@@ -39,7 +39,7 @@ int _EXFUN(_toupper, (int __c));
 #define _X	0100
 #define	_B	0200
 
-extern	__IMPORT _CONST char	*__ctype_ptr__;
+extern	__IMPORT char	*__ctype_ptr__;

Besides, IMHO you could have made that last +-line in ctype.h:

+#ifndef _MB_CAPABLE
+_CONST
+#endif
+extern	__IMPORT char	*__ctype_ptr__;

(or something) to avoid deconstify __ctype_ptr__ for all other
targets that didn't change semantics, IIUC.  I'll let you guys
sort out what the fix should be, but will fix it as above if
preapproved.

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]