[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MinGW compilation warning in spawn-pipe.c
From: |
Bruno Haible |
Subject: |
Re: MinGW compilation warning in spawn-pipe.c |
Date: |
Sat, 12 May 2018 13:33:33 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-119-generic; KDE/5.18.0; x86_64; ; ) |
Eli Zaretskii wrote:
> }
> #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
lib/spawn-pipe.c doesn't.
2018-05-12 Bruno Haible <address@hidden>
execute, spawn-pipe: Avoid warning about redefining 'close'.
Reported by Eli Zaretskii <address@hidden>.
* 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__