Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GNU getopt not always used when USE_GNU is defined #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sodero
Copy link

@sodero sodero commented Apr 17, 2023

Missing include guard leads to GNU getopt being used in some cases and getopt_long in others.

Missing include guard leads to GNU getopt being used in some cases
and getopt_long in others.
@jca02266
Copy link
Owner

Thanks for your PR.
Sorry but I don't see why this is necessary.

@jca02266 jca02266 self-assigned this Apr 19, 2023
@sodero
Copy link
Author

sodero commented Apr 19, 2023

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 *,

@grepwood
Copy link

grepwood commented May 5, 2024

@jca02266 this PR adds support for PS3 and AmigaOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants