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: Locale Build Failure #2




On 8/16/2016 12:35 PM, Craig Howland wrote:
On 08/16/2016 01:21 PM, Corinna Vinschen wrote:
On Aug 16 12:11, Joel Sherrill wrote:

On 8/16/2016 12:05 PM, Corinna Vinschen wrote:
On Aug 16 11:57, Joel Sherrill wrote:
Hi

Thanks for fixing the first error. Now there is this on all
RTEMS architectures:

arm-rtems4.12-gcc -B/home/joel/test-gcc/b-arm-rtems4.12-newlib/arm-rtems4.12/thumb/newlib/ -isystem /home/joel/test-gcc/b-arm-rtems4.12-newlib/arm-rtems4.12/thumb/newlib/targ-include -isystem /home/joel/test-gcc/newlib-cygwin/newlib/libc/include  -mthumb -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.4.0\" -DPACKAGE_STRING=\"newlib\ 2.4.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I../../../../../../newlib-cygwin/newlib/libc/locale -D_COMPILING_NEWLIB -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN -D_NO_POSIX_SPAWN -D_I386MACH_ALLOW_HW_INTERRUPTS -fno-builtin      -g -O2  -mthumb -c -o lib_a-locale.o `test -f 'locale.c' || echo '../../../../../../newlib-cygwin/newlib/libc/locale/'`locale.c
In file included from /home/joel/test-gcc/newlib-cygwin/newlib/libc/include/sys/reent.h:13:0,
                  from /home/joel/test-gcc/newlib-cygwin/newlib/libc/include/sys/errno.h:11,
                  from /home/joel/test-gcc/newlib-cygwin/newlib/libc/include/errno.h:9,
                  from ../../../../../../newlib-cygwin/newlib/libc/locale/locale.c:174:
../../../../../../newlib-cygwin/newlib/libc/locale/locale.c:986:14: error: conflicting types for '__locale_ctype_ptr'
  _DEFUN_VOID (__locale_ctype_ptr)
               ^
In file included from ../../../../../../newlib-cygwin/newlib/libc/locale/locale.c:175:0:
/home/joel/test-gcc/newlib-cygwin/newlib/libc/include/ctype.h:72:7: note: previous declaration of '__locale_ctype_ptr' was here
  char *__locale_ctype_ptr (void);
        ^~~~~~~~~~~~~~~~~~
make[8]: *** [lib_a-locale.o] Error 1
Do you have a patch?
I don't know what to fix. :)

I assume the prototype needs to change. Right?
Perhaps, but I don't see why.  char *foo() == char *foo() in my book.

Yes, char *foo() == char *foo(), but const char *__locale_ctype_ptr(void) !=
char *__locale_ctype_ptr(void), which can happen if _MB_CAPABLE is not defined.
Could this perhaps be it?

ctype.h has an ifdef for _MB_CAPABLE missing in locale.c. I am trying
this now. What do you all think?

diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
index 795e163..4de4cce 100644
--- a/newlib/libc/locale/locale.c
+++ b/newlib/libc/locale/locale.c
@@ -992,6 +992,9 @@ _DEFUN_VOID (__locale_ctype_ptr)
                                 : __ctype_ptr__;
 }
+#ifndef _MB_CAPABLE
+_CONST
+#endif
 char *
 __locale_ctype_ptr_l (struct __locale_t *locale)
 {



Craig


--


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