From febf476a916288702a82dea7a454264eb9a9560b Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 4 Nov 2016 22:35:55 -0500 Subject: [PATCH] configure: kill --enable-strict-mode, entirely pointless --- configure.ac | 17 ----------------- getopt_long.c | 8 +------- tests/run.sh.in | 10 ---------- 3 files changed, 1 insertion(+), 34 deletions(-) diff --git a/configure.ac b/configure.ac index 68305df..d94f151 100644 --- a/configure.ac +++ b/configure.ac @@ -22,23 +22,6 @@ LT_INIT AC_SYS_LARGEFILE -AC_ARG_ENABLE([strict], - [AC_HELP_STRING([--enable-strict], - [enable POSIX-strict argument checking and disable some workarounds])], - [ac_cv_use_strict=$enableval], [ac_cv_use_strict=no]) -AC_CACHE_CHECK([whether to enable strict mode], - [ac_cv_use_strict], [ac_cv_use_strict=no]) - -if test "x$ac_cv_use_strict" = "xyes"; then - AC_DEFINE([HAVE_STRICT_MODE], [1], [Define if strict mode is requested.]) - STRICT_MODE=yes -else - AC_DEFINE([HAVE_STRICT_MODE], [0], [Define if strict mode is requested.]) - STRICT_MODE=no -fi - -AC_SUBST([STRICT_MODE]) - AC_ARG_WITH([pkg-config-dir],[AC_HELP_STRING([--with-pkg-config-dir],[specify the place where pc files will be found])],PKGCONFIGDIR="$withval", PKGCONFIGDIR="${libdir}/pkgconfig:${datadir}/pkgconfig") diff --git a/getopt_long.c b/getopt_long.c index 240c5ad..c1e1404 100644 --- a/getopt_long.c +++ b/getopt_long.c @@ -66,10 +66,6 @@ #define PKGCONF_HACK_LOGICAL_OR_ALL_VALUES -#if HAVE_STRICT_MODE > 0 -# define GNU_COMPATIBLE /* Be more compatible, configure's use us! */ -#endif - int pkg_opterr = 1; /* if error message should be printed */ int pkg_optind = 1; /* index into parent argv vector */ int pkg_optopt = '?'; /* character checked for validity */ @@ -395,9 +391,7 @@ getopt_internal(int nargc, char * const *nargv, const char *options, else if (*options == '-') flags |= FLAG_ALLARGS; #endif -#if HAVE_STRICT_MODE >= 1 - flags &= ~FLAG_PERMUTE; -#endif + if (*options == '+' || *options == '-') options++; diff --git a/tests/run.sh.in b/tests/run.sh.in index 4af05c7..0b55c91 100644 --- a/tests/run.sh.in +++ b/tests/run.sh.in @@ -440,16 +440,6 @@ run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs 'provides-test-meow <= 1 run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs 'provides-test-meow <= 1.2.9'; echo \$?" \ "0" -# 11) tests for internal getopt implementation with options at the end -if [ "x@STRICT_MODE@" = "xno" ]; then - run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} foo --libs" \ - '-lfoo' - run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} foo --cflags --libs" \ - '-lfoo' '-I/test/include/foo' '-fPIC' - run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --cflags foo --libs" \ - '-lfoo' '-I/test/include/foo' '-fPIC' -fi - run_test "${1} --blah; echo \$?" \ '1'