This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH 03/10] The bits/types/*.h treatment for stdio and wchar.


On Tue, May 9, 2017 at 5:34 PM, Joseph Myers <joseph@codesourcery.com> wrote:
>> +# ifdef __WINT_TYPE__
>> +    __WINT_TYPE__ __wch;
>> +# else
>> +    wint_t __wch;
>> +# endif
>
> I'm concerned about the possible dependency this introduces on wint_t
> having already been defined, if bits/types/__mbstate_t.h is included with
> a compiler that does not define __WINT_TYPE__ (e.g. GCC 2.95 or earlier).
>
> Previously, wchar.h would attempt to get a wint_t definition under
> conditions that included !defined __WINT_TYPE__ - that is, it might
> spuriously define wint_t when only asked to define __mbstate_t, given such
> a compiler, but wouldn't define __mbstate_t in terms of an undefined type
> wint_t.
>
> Maybe you need a header that ensures __WINT_TYPE__ is always defined,
> separate from bits/types/wint_t.h?

Ugh, you're right.  I don't know how I managed to miss that.  Will fix.

> I have not exhaustively reviewed the rest of the patch.

Because my libc time is very limited, though, I'm not going to rework
any of these patches until they have been fully reviewed by someone.

zw


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