[Bug 727] New: On uClibc configured with thread, including <stdio.h> leads to <pthread.h>/<sched.h> inclusion

bugzilla at busybox.net bugzilla at busybox.net
Wed Nov 18 11:47:25 UTC 2009


https://bugs.busybox.net/show_bug.cgi?id=727

           Summary: On uClibc configured with thread, including <stdio.h>
                    leads to <pthread.h>/<sched.h> inclusion
           Product: uClibc
           Version: 0.9.30.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Standard Compliance
        AssignedTo: unassigned at uclibc.org
        ReportedBy: yann at droneaud.fr
                CC: uclibc-cvs at uclibc.org
   Estimated Hours: 0.0


When thread support is enabled in uClibc, stdio uses mutex to protect access to
stream.

To do it, uClibc uses pthread mutex through macros defined in
<bits/uClibc_stdio.h>.

<stdio.h> includes <bits/uClibc_stdio.h>, which includes <bits/uClibc_mutex.h>,
then <pthread.h> and <sched.h> and finally <bits/sched.h>.

uClibc should not export <pthread.h> and <sched.h> as part of internals.
Symbols needed for locked stdio implementation should be private to uClibc, not
the standards one.

This is namespace pollution.

See The Open Group Base Specifications Issue 7,  2. General Information,  2.2
The Compilation Environment, 2.2.2 The Name Space 
http://www.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02_02

This is especially a problem since "clone()" prototype is exported and
conflicts with some code that don't expect it to be defined. "clone()" is a
Linux extension.

Regards.


-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the uClibc-cvs mailing list