On Monday 02 June 2008 11:55, Bernd Schmidt wrote: > Denys Vlasenko wrote: > > Thanks. The attached patch fixes it (I applied it to uclibc svn). > > These patches are not self-explanatory. Could you provide some > information about the cause of the failures, and how your patches fix them?
The patch which caused this failure moved libc_hidden_proto(foo) declarations into string.h and strings.h for every function foo which is declared in these files. It is the second stage of a bigger plan to move ALL libc_hidden_proto's from .c files to .h files. It was done after first stage seemed to not cause any significant troubles. First stage was (1) addition of header sanitization step in "make install_headers" which ensured that headers can contain private uclibc parts which will be deleted at install time, and (2) just one libc_hidden_proto(time) was moved to corresponding .h file, and removed from all .c files. I picked string.h and strings.h for second stage of this change because it's one of the most used headers and if there are any problems with what I'm trying to do, I will likely see them. So, what happened in [wc]str[n]casecmp.c? Well, it was relying on the symmetry between strcasecmp and wcscasecmp and the like and played games trying to reduce the number of libc_hidden_proto's. This worked when both strcasecmp and wcscasecmp needed libc_hidden_proto(). But now after stage 2 strcasecmp does not need it anymore (it's from string.h), while wcscasecmp still needs it (it's in wchar.h). The fix is to stop playing tricks and use correct libc_hidden_proto's: #ifdef WANT_WIDE # define strcasecmp wcscasecmp # define strcasecmp_l wcscasecmp_l +libc_hidden_proto(wcscasecmp) +libc_hidden_proto(wcscasecmp_l) # ifdef __UCLIBC_DO_XLOCALE libc_hidden_proto(towlower_l) # define TOLOWER(C) towlower_l((C), locale_arg) @@ -21,6 +23,8 @@ libc_hidden_proto(towlower) # define TOLOWER(C) towlower((C)) # endif #else +/* Experimentally off - libc_hidden_proto(strcasecmp) */ +/* Experimentally off - libc_hidden_proto(strcasecmp_l) */ # ifdef __UCLIBC_DO_XLOCALE libc_hidden_proto(tolower_l) # define TOLOWER(C) tolower_l((C), locale_arg) @@ -35,9 +39,6 @@ libc_hidden_proto(tolower) #if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) -/* Experimentally off - libc_hidden_proto(strcasecmp_l) */ - -/* Experimentally off - libc_hidden_proto(strcasecmp) */ This fix is temporary - as soon as Carmelo announces that ntpl merge is complete, I will continue libc_hidden_proto removal from the rest of .c files, and this will remove libc_hidden_proto's shown above too. "/* Experimentally off - libc_hidden_proto(foo) */" lines will be removed too. For example, this will remove these repeated lines: #ifdef __UCLIBC_HAS_XLOCALE__ libc_hidden_proto(__ctype_b_loc) #elif defined __UCLIBC_HAS_CTYPE_TABLES__ libc_hidden_proto(__ctype_b) #endif from 22 .c files, and add them - just once - to ctype.h If you have more questions, please do not hesitate to ask. Thanks, -- vda _______________________________________________ uClibc mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/uclibc
