]> Savannah Git Hosting - gnulib.git/commitdiff
stat, fstat: Fix compilation error with old mingw headers.
authorBruno Haible <bruno@clisp.org>
Wed, 16 Sep 2020 21:52:44 +0000 (23:52 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 16 Sep 2020 21:52:44 +0000 (23:52 +0200)
Reported by Eli Zaretskii <eliz@gnu.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00027.html>.

* lib/stat-w32.c (VOLUME_NAME_NONE): Define if the Windows headers don't
define it.

ChangeLog
lib/stat-w32.c

index 57501d556650837737f3a3c028e2cddc0103c9bd..d18ec51a464a4dd2d935bd6a359909f35c1ce8ca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2020-09-16  Bruno Haible  <bruno@clisp.org>
+
+       stat, fstat: Fix compilation error with old mingw headers.
+       Reported by Eli Zaretskii <eliz@gnu.org> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00027.html>.
+       * lib/stat-w32.c (VOLUME_NAME_NONE): Define if the Windows headers don't
+       define it.
+
 2020-09-16  Bruno Haible  <bruno@clisp.org>
 
        stat, fstat: Fix when compiling for versions older than Windows Vista.
index 72442e9335b49a458e5ab5c06117c2889c651cc4..108ce199cc810696f1f66e8d9805fbf145423ba5 100644 (file)
 #undef GetFinalPathNameByHandle
 #define GetFinalPathNameByHandle GetFinalPathNameByHandleA
 
+/* Older mingw headers do not define VOLUME_NAME_NONE.  */
+#ifndef VOLUME_NAME_NONE
+# define VOLUME_NAME_NONE 4
+#endif
+
 #if !WIN32_ASSUME_VISTA
 
 /* Avoid warnings from gcc -Wcast-function-type.  */