GNU getopt not always used when USE_GNU is defined
Missing include guard leads to GNU getopt being used in some cases and getopt_long in others.
Thanks for your PR. Sorry but I don't see why this is necessary.
When building with newlib you'll get conflicts otherwise:
In file included from lharc.c:213: getopt_long.h:29:8: error: redefinition of ‘struct option’ 29 | struct option { | ^~~~~~ In file included from /opt/adtools/ppc-amigaos/SDK/newlib/include/sys/unistd.h:73, from /opt/adtools/ppc-amigaos/SDK/newlib/include/unistd.h:4, from lha.h:63, from lharc.c:45: /opt/adtools/ppc-amigaos/SDK/newlib/include/getopt.h:52:8: note: originally defined here 52 | struct option { | ^~~~~~ In file included from lharc.c:213: getopt_long.h:45:5: error: conflicting types for ‘getopt_long’; have ‘int(int, char **, const char *, struct option *, int *)’ 45 | int getopt_long(int argc, char **argv, | ^~~~~~~~~~~ In file included from /opt/adtools/ppc-amigaos/SDK/newlib/include/sys/unistd.h:73, from /opt/adtools/ppc-amigaos/SDK/newlib/include/unistd.h:4, from lha.h:63, from lharc.c:45: /opt/adtools/ppc-amigaos/SDK/newlib/include/getopt.h:70:5: note: previous declaration of ‘getopt_long’ with type ‘int(int, char * const*, const char *, const struct option *, int *)’ 70 | int getopt_long(int, char * const *, const char *,
@jca02266 this PR adds support for PS3 and AmigaOS