You must manually insert the additional test lines into the appropriate
file in fixincludes/tests/base and then retest.

Please see step (6) in fixincludes/README

Thanks, David




On Wed, Aug 15, 2018 at 3:46 PM Albert Chin <g...@mlists.thewrittenword.com>
wrote:

> Hi. I've come up with a fixincl fix for PR86599 but "make check" in
> the fixincludes directory does not work and I do not know why. I know
> just enough fixincl-fu to produce a patch for this issue. I am trying
> to convert a chunk of code in stdlib on HP-UX 11.31/PA:
>
> #  ifndef _LONG_DOUBLE
> #    define _LONG_DOUBLE
> #  if !defined(__ia64) || !defined(_PROTOTYPES) ||
> defined(_LONG_DOUBLE_STRUCT)
> typedef struct {
>         uint32_t word1, word2, word3, word4;
>         } long_double;
> extern long_double strtold __((const char * __restrict, char **
> __restrict));
> #  else /* !__ia64 || !_PROTOTYPES || _LONG_DOUBLE_STRUCT */
> #    ifdef _INCLUDE_HPUX_SOURCE
> typedef long double long_double;
> #    endif /* _INCLUDE_HPUX_SOURCE */
> extern long double strtold __((const char * __restrict, char **
> __restrict));
> #  endif /* !__ia64 ||!_PROTOTYPES ||_LONG_DOUBLE_STRUCT */
> #endif /* _LONG_DOUBLE */
>
> to:
>
> extern long double strtold(const char *, char **);
>
> I am doing this by fixing hpux_long_double_2 so it now looks like:
> fix = {
>     hackname  = hpux_long_double_2;
>     mach      = "hppa*-*-hpux11.3*";
>     files     = stdlib.h;
>     select    = "extern[ \t]long_double[ \t]strtold";
>     bypass    = "long_double_t";
>     sed       = "/^#[ \t]*ifndef _LONG_DOUBLE/,"
>                 "/\\/\\* _LONG_DOUBLE \\*\\//c\\\n"
>                 "extern long double strtold(const char *, char **);\n";
>     sed       = "s/long_double/long double/g";
>
>     test_text = "#  ifndef _LONG_DOUBLE\n"
>                 "#    define _LONG_DOUBLE\n"
>                 "     typedef struct {\n"
>                 "       unsigned int word1, word2, word3, word4;\n"
>                 "     } long_double;\n"
>                 "extern long_double strtold(const char *, char **);\n"
>                 "#  endif /* _LONG_DOUBLE */\n";
> };
>
> This works but "make check" returns:
>
> stdlib.h /opt/build/gcc-8.2.0/fixincludes/tests/base/stdlib.h differ: char
> 1475, line 59
> *** stdlib.h    Wed Aug 15 19:38:37 2018
> --- /opt/build/gcc-8.2.0/fixincludes/tests/base/stdlib.h        Thu Feb 22
> 16:12:26 2018
> ***************
> *** 56,61 ****
> --- 56,62 ----
>
>
>   #if defined( HPUX_LONG_DOUBLE_2_CHECK )
> + #  if !defined(__ia64) || !defined(_PROTOTYPES) ||
> defined(_LONG_DOUBLE_STRUCT)
>
>   #endif  /* HPUX_LONG_DOUBLE_2_CHECK */
>
> There were fixinclude test FAILURES
>
> Any ideas?
>
> --
> albert chin (ch...@thewrittenword.com)
>

Reply via email to