> -----Original Message----- > From: Denys Vlasenko [mailto:[EMAIL PROTECTED] > Sent: den 12 april 2008 19:34 > To: Joakim Tjernlund > Cc: [EMAIL PROTECTED]; 'Peter S. Mazinger'; [email protected] > Subject: Re: RFC: first stab at getting rid of libc_hidden_proto() forest > > On Saturday 12 April 2008 15:36, Joakim Tjernlund wrote: > > > > Obvious solution of adding libc_hidden_proto's to .h files > > > > does not work so well since we'd like to not pollute them with > > > > machinery which doesn't belong to public interface. > > > > > > > but we could scrub public *h at install time by removing > > > all occurences of libc_hidden_proto producing a sort of > > > sanitized libc headers, in the same way kernel does. > > BTW: simply removing every line which starts with "libc_hidden_proto(" > string will not work so nice: > > #ifdef __UCLIBC_HAS_XLOCALE__ > libc_hidden_proto(__ctype_b_loc) > #elif __UCLIBC_HAS_CTYPE_TABLES__ > libc_hidden_proto(__ctype_b) > #endif > > will turn into > > #ifdef __UCLIBC_HAS_XLOCALE__ > #elif __UCLIBC_HAS_CTYPE_TABLES__ > #endif > > Scrubbing needs to be more clever than that. > > > > > In the attached patch, I chose to create a "master include file" > > > > which includes almost all other headers; and then marks > > > > all exported functions(variables) with libc_hidden_proto. > > > > The file is called uClibc_libc.h. > > > > > > > I don't like this approach since I usually prefer explicitely > > > including all specific headers are areally need, no less, no more, > > > instead of a master include header. > > > > yes, and development will hurt too as most of uClibc will need to rebuild > > when adding some new feature. > > How ofter do you change public headers? I believe most changes go into > implementation of the libc interface, not in interface.
Maybe, was just a quick comment. > > > > This is my opinion. I agree with you about the needs of consistently > > > using libc_hidden_proto, but I'd try to find another solution. > > > > > > Anyway, being this a big change, I'd like to hear other opinions > > > and comment. > > > Mike, Jocke, Bernds, Peter others... what do you think ? > > > > Scrubbing headers like Linux do is the best. There will probably be other > > things in there too that would benefit from such scrubbing. > > Sounds reasonable. What method do you prefer? > > #ifdef blocks with a special #define which are removed by scrubber script? > E.g.: > > #ifdef UCLIBC_INTERNAL > ...yadda yadda... > #endif This one, I belive the kernel does it this way to. Hopefully we can take the scrubbing procedure from there. I really hope Mike can chim in here, I belive he the expert around here on such things. Jocke _______________________________________________ uClibc mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/uclibc
