:: commit 054fe8a31e667304b1f80849f38780ab45013668

niXman <niXman@users.noreply.github.com> — 2022-09-11 10:12

parents: fe48bc8591

flockfile/funlockfile for WIN32 (#52)

diff --git a/include/getopt-shim.h b/include/getopt-shim.h
index 8c15d8c..0e7e6b5 100644
--- a/include/getopt-shim.h
+++ b/include/getopt-shim.h
@@ -24,6 +24,11 @@
 #ifndef _GETOPT_H
 #define _GETOPT_H
 
+#ifdef WIN32
+static void flockfile(FILE *f) { _lock_file(f); }
+static void funlockfile(FILE *f) { _unlock_file(f); }
+#endif
+
 int getopt(int, char * const[], const char *);
 extern char * optarg;
 extern int optind, opterr, optopt, optreset;
tab: 248 wrap: offon