Bruno Haible
2018-05-12 11:33:33 UTC
}
#define close nonintr_close
IMO, it should use #undef before redefining 'close'.
Yup. The file lib/pipe-filter-aux.h already contains this fix, but#define close nonintr_close
IMO, it should use #undef before redefining 'close'.
lib/spawn-pipe.c doesn't.
2018-05-12 Bruno Haible <***@clisp.org>
execute, spawn-pipe: Avoid warning about redefining 'close'.
Reported by Eli Zaretskii <***@gnu.org>.
* lib/execute.c: Undefine 'close' before redefining it.
* lib/spawn-pipe.c: Likewise.
diff --git a/lib/execute.c b/lib/execute.c
index 4532661..1194dd6 100644
--- a/lib/execute.c
+++ b/lib/execute.c
@@ -66,6 +66,7 @@ nonintr_close (int fd)
return retval;
}
+#undef close /* avoid warning related to gnulib module unistd */
#define close nonintr_close
static int
diff --git a/lib/spawn-pipe.c b/lib/spawn-pipe.c
index 716c54a..ec9bd9d 100644
--- a/lib/spawn-pipe.c
+++ b/lib/spawn-pipe.c
@@ -71,6 +71,7 @@ nonintr_close (int fd)
return retval;
}
+#undef close /* avoid warning related to gnulib module unistd */
#define close nonintr_close
#if defined _WIN32 && ! defined __CYGWIN__