On mingw, I'm seeing this warning:
In file included from pipe-filter-ii.c:163:0:
pipe-filter-aux.h:75:0: warning: "read" redefined
#define read nonintr_read
In file included from ./fcntl.h:67:0,
from pipe-filter-ii.c:23:
./unistd.h:1785:0: note: this is the location of the previous definition
# define read rpl_read
This patch should fix the warning.
2019-04-26 Bruno Haible <[email protected]>
pipe-filter-gi, pipe-filter-ii: Fix gcc warning.
* lib/pipe-filter-aux.h (read): Undefine before redefinition.
diff --git a/lib/pipe-filter-aux.h b/lib/pipe-filter-aux.h
index f7e8689..4b33322 100644
--- a/lib/pipe-filter-aux.h
+++ b/lib/pipe-filter-aux.h
@@ -72,6 +72,7 @@ nonintr_read (int fd, void *buf, size_t count)
return retval;
}
+#undef read /* avoid warning related to gnulib module unistd */
#define read nonintr_read
PIPE_FILTER_AUX_INLINE ssize_t