On 5/31/19 6:35 AM, Jonas Jelten wrote: > This code snippet of mingw's stdio.h: > > > #ifdef _WIN64 > _CRTIMP FILE *__cdecl __iob_func(void); > #define _iob __iob_func() > #else > [.....] > #if (!defined(NO_OLDNAMES) || defined(__GNUC__)) > __MINGW_EXTENSION typedef __int64 fpos_t; > #define _FPOSOFF(fp) ((long)(fp)) > > > ============= is modified by fixincludes to be:
<<mutilated>> > Author: Jonas Jelten <j...@sft.mx> > Date: Wed May 31 15:10:52 2019 +0200 > > fixincludes: check for lineending to not break mingw64-build > > --- a/fixincludes/inclhack.def 2019-05-31 15:01:31.841235934 +0200 > +++ b/fixincludes/inclhack.def 2019-05-31 15:09:31.068347492 +0200 > @@ -2163,7 +2163,7 @@ > fix = { > hackname = hpux10_stdio_declarations; > files = stdio.h; > - select = "^#[ \t]*define _iob[ \t]*__iob"; > + select = "^#[ \t]*define _iob[ \t]*__iob[ \t]*\n"; > bypass = "^[ \t]*extern[ \t]*int[ \t]*vsnprintf[ \t]*\\("; > c_fix = format; > c_fix_arg = "%0\n\n" > --- a/fixincludes/fixincl.x 2019-05-31 15:13:20.430156243 +0200 > +++ b/fixincludes/fixincl.x 2019-05-31 15:13:24.953156662 +0200 > @@ -4272,7 +4272,7 @@ > * content selection pattern - do fix if pattern found > */ > tSCC zHpux10_Stdio_DeclarationsSelect0[] = > - "^#[ \t]*define _iob[ \t]*__iob"; > + "^#[ \t]*define _iob[ \t]*__iob[ \t]*\n"; > > /* > * content bypass pattern - skip fix if pattern found Looks reasonable to me, but I don't see a test case. > #define _iob __iob_func() should be added to the test code and validated that it remains unmodified in the output.