diff --git a/include/extern/getopt.hpp b/include/extern/getopt.hpp index 68e12491..31ebdf62 100644 --- a/include/extern/getopt.hpp +++ b/include/extern/getopt.hpp @@ -5,24 +5,24 @@ #ifndef RGBDS_EXTERN_GETOPT_HPP #define RGBDS_EXTERN_GETOPT_HPP -extern "C" { - extern char *musl_optarg; - extern int musl_optind, musl_opterr, musl_optopt, musl_optreset; +// clang-format off: vertically align values +static constexpr int no_argument = 0; +static constexpr int required_argument = 1; +static constexpr int optional_argument = 2; +// clang-format on - struct option { - char const *name; - int has_arg; - int *flag; - int val; - }; +extern char *musl_optarg; +extern int musl_optind, musl_opterr, musl_optopt, musl_optreset; - int musl_getopt_long_only( - int argc, char **argv, char const *optstring, option const *longopts, int *idx - ); +struct option { + char const *name; + int has_arg; + int *flag; + int val; +}; -#define no_argument 0 -#define required_argument 1 -#define optional_argument 2 -} +int musl_getopt_long_only( + int argc, char **argv, char const *optstring, option const *longopts, int *idx +); #endif // RGBDS_EXTERN_GETOPT_HPP diff --git a/include/version.hpp b/include/version.hpp index ee2792f6..dc7f2a61 100644 --- a/include/version.hpp +++ b/include/version.hpp @@ -7,8 +7,6 @@ #define PACKAGE_VERSION_MINOR 9 #define PACKAGE_VERSION_PATCH 0 -extern "C" { - char const *get_package_version_string(); -} +char const *get_package_version_string(); #endif // RGBDS_VERSION_H