+2020-07-27 Paul Eggert <eggert@cs.ucla.edu>
+
+ dfa-tests: port to MSVC
+ Problem reported by Gisle Vanem in:
+ https://lists.gnu.org/r/bug-gnulib/2020-07/msg00159.html
+ Also, remove an unnecessary dependency on getprogname.
+ * modules/dfa-tests (Depends-on): Remove getprogname.
+ * tests/test-dfa-match-aux.c: Do not include getprogname.h.
+ (exit_status): New static var.
+ (dfawarn): Set it instead of exiting.
+ Do not declare as _Noreturn, to pacify MSVC.
+ (main): Return exit_status.
+
2020-07-26 Paul Eggert <eggert@cs.ucla.edu>
argz: pacify MSVC
#include <dfa.h>
#include <localeinfo.h>
-#include "getprogname.h"
-
_Noreturn void
dfaerror (char const *mesg)
{
exit (EXIT_FAILURE);
}
-_Noreturn void
+static int exit_status = EXIT_SUCCESS;
+
+void
dfawarn (char const *mesg)
{
printf ("dfawarn: %s\n", mesg);
- exit (EXIT_FAILURE);
+ exit_status = EXIT_FAILURE;
}
int
if (p != NULL)
printf ("%zd\n", p - beg);
- exit (EXIT_SUCCESS);
+ exit (exit_status);
}