This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/2] Remove _IO_MTSAFE_IO from public headers.
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 6 Apr 2017 18:29:55 -0300
- Subject: Re: [PATCH 1/2] Remove _IO_MTSAFE_IO from public headers.
- Authentication-results: sourceware.org; auth=none
- References: <20170322125504.4863-1-zackw@panix.com> <20170322125504.4863-2-zackw@panix.com> <adec0591-dec4-c2f0-5a70-c96a934c7c3b@linaro.org> <CAKCAbMi0zu84hEJ+=tGC8ZWa=5t9k0Suq6g5HaDaY9gtsMPDGw@mail.gmail.com>
On 06/04/2017 17:41, Zack Weinberg wrote:
> On Thu, Apr 6, 2017 at 4:29 PM, Adhemerval Zanella
> <adhemerval.zanella@linaro.org> wrote:
>> On 22/03/2017 09:55, Zack Weinberg wrote:
>>> _IO_MTSAFE_IO controls whether stdio is *built* with support for
>>> multithreading. In the distant past it might also have worked as a
>>> feature selection macro, allowing library *users* to select
>>> thread-safe or lock-free stdio at application build time, I haven't
>>> done the archaeology. Nowadays, defining _IO_MTSAFE_IO while using
>>> the installed headers, or in _ISOMAC mode, will cause libio.h to throw
>>> syntax errors.
>>
>> What prevent us to just get rid of _IO_MTSAFE_IO and just build/assume
>> stdio with multithread support?
>
> I think that's a desirable goal, but I don't want to do that in this
> patchset because I suspect it will be messy *inside* libc. And I'd
> start by getting it out of the public headers, anyway.
Why do you think so? The make fragment sysdeps/pthread/Makeconfig already
sets libc-reentrant regardless, so _IO_MTSAFE_IO is already being defined
in all objects that might use it (and I suspect it has been this way for
some time already).
>
> (I'd like to stop installing libio.h at all, too, but that's probably
> going to be nastier:
> https://codesearch.debian.net/search?q=libio.h&perpkg=1)
>
Agreed.