inclhack.def for byteorder.h

korbb@sourceware.cygnus.com korbb@sourceware.cygnus.com
Sun Oct 31 23:33:00 GMT 1999


Hi Robert,

If zero of the #ifdef SVR4 patches apply, then perhaps
the best resolution is to remove them and let antiquated
SVR4 systems use the fixinc.svr4 script until they have
rotted away.  :-)

Vis a vis  sys/mkdev, ieeefp.h and byteorder.h however:

svr4_mkdev:

  fix = {
    hackname = svr4_mkdev;
    files    = sys/mkdev.h;
    select   = "^static";

    sed      = "/^dev_t makedev(major_t/c\\\n"
               "static dev_t makedev(major_t, minor_t);";

    sed      = "/^dev_t makedev(const/c\\\n"
               "static dev_t makedev(const major_t, const minor_t);";

    sed      = "/^dev_t makedev()/c\\\n"
               "static dev_t makedev();";

    sed      = "/^major_t major(dev_t/c\\\n"
               "static major_t major(dev_t);";

    sed      = "/^major_t major(const/c\\\n"
               "static major_t major(const dev_t);";

    sed      = "/^major_t major()/c\\\n"
               "static major_t major();";

    sed      = "/^minor_t minor(dev_t/c\\\n"
               "static minor_t minor(dev_t);";

    sed      = "/^minor_t minor(const/c\\\n"
               "static minor_t minor(const dev_t);";

    sed      = "/^minor_t minor()/c\\\n"
               "static minor_t minor();";
  };

How about something like:

    sed = "/^dev_t makedev(/s/^/static /";
    sed = "/^major_t major(/s/^/static /";
    sed = "/^minor_t minor(/s/^/static /";

Now _that_ seems simpler to me :-).
If that is not adequate, let me know and I will apply
your patch as provided.

================

svr5_mach_defines:  ok.  fine.

================

replace_byteorder:

Please rename to "AAB_replace_byteorder" and insert at
the top of the  file.  I think I should put a test into
the template that will choke if a replacement definition
is found after the first non-replacement fix.  :-)
The reason is that I could set up a fixup filter chain,
only to discover that a replacement fix is being applied.
I do not have a clean way to dispose of the chain.
Besides, it is all a waste of time if a replacement applies.

Regards,
        Bruce



More information about the Gcc-patches mailing list