Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/sys



On Tue, Nov 06, 2018 at 11:15:11PM +0300, Valery Ushakov wrote:
> On Tue, Nov 06, 2018 at 16:26:44 +0000, Maya Rashish wrote:
> 
> > Module Name:	src
> > Committed By:	maya
> > Date:		Tue Nov  6 16:26:44 UTC 2018
> > 
> > Modified Files:
> > 	src/sys/sys: stdint.h types.h
> > 
> > Log Message:
> > Guard from type redefinition (needed by pre-C11 C) in a safer way.
> > 
> > The existing way causes problems like:
> > https://mail-index.netbsd.org/tech-pkg/2018/10/25/msg020395.html
> > https://mail-index.netbsd.org/tech-userlevel/2018/09/08/msg011381.html
> 
> I would argue that the first example is, if not outright wrong, then
> at the very minimum unhygienic, as it doesn't use the same
> preprocessor nesting for the definition of the name and the use of the
> name, i.e. it incorrectly assumes that the function will be named
> "something_uint32_t".
> 
> Also your change breaks redefining intN_t types with the preprocessor.
> E.g.
> 
>     #define uint32_t unsigned long long
>     #include <stdint.h>
> 
> is now broken with your change.
> 
> -uwe

This fails with glibc too. I don't expect to find real users for that
behaviour...


Home | Main Index | Thread Index | Old Index