From: Bruno Haible Date: Sun, 21 Jul 2024 13:48:36 +0000 (+0200) Subject: xgettext: Fix some test failures on MSVC. X-Git-Tag: v0.23~237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0c87a41816692c300623f56779900543ff8f55c;p=thirdparty%2Fgettext.git xgettext: Fix some test failures on MSVC. * gettext-tools/src/locating-rule.c: Include always. (HAVE_DIR): Remove macro. (locating_rule_list_add_from_directory): Don't test HAVE_DIR. * gettext-tools/src/msginit.c: Include always. (HAVE_DIR): Remove macro. (find_pot): Don't test HAVE_DIR. --- diff --git a/gettext-tools/src/locating-rule.c b/gettext-tools/src/locating-rule.c index 672bf7d07..214787625 100644 --- a/gettext-tools/src/locating-rule.c +++ b/gettext-tools/src/locating-rule.c @@ -23,18 +23,10 @@ /* Specification. */ #include "locating-rule.h" +#include #include #include -#if HAVE_DIRENT_H -# include -#endif -#if HAVE_DIRENT_H -# define HAVE_DIR 1 -#else -# define HAVE_DIR 0 -#endif - #include #include @@ -392,7 +384,6 @@ bool locating_rule_list_add_from_directory (struct locating_rule_list_ty *rules, const char *directory) { -#if HAVE_DIR DIR *dirp; dirp = opendir (directory); @@ -426,7 +417,6 @@ locating_rule_list_add_from_directory (struct locating_rule_list_ty *rules, if (closedir (dirp)) return false; -#endif return true; } diff --git a/gettext-tools/src/msginit.c b/gettext-tools/src/msginit.c index 206be5c37..9cf0d997c 100644 --- a/gettext-tools/src/msginit.c +++ b/gettext-tools/src/msginit.c @@ -21,6 +21,7 @@ #endif #include +#include #include #include #include @@ -31,24 +32,13 @@ #include #include #include +#include #include #if HAVE_PWD_H # include #endif -#include - -#if HAVE_DIRENT_H -# include -#endif - -#if HAVE_DIRENT_H -# define HAVE_DIR 1 -#else -# define HAVE_DIR 0 -#endif - #include #include @@ -492,7 +482,6 @@ or by email to <%s>.\n"), static const char * find_pot () { -#if HAVE_DIR DIR *dirp; char *found = NULL; @@ -535,7 +524,6 @@ Please specify the input .pot file through the --input option.\n"))); if (found != NULL) return found; } -#endif multiline_error (xstrdup (""), xstrdup (_("\