bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MinGW compilation warning in spawn-pipe.c


From: Eli Zaretskii
Subject: MinGW compilation warning in spawn-pipe.c
Date: Sat, 12 May 2018 10:58:52 +0300

While building the latest pretest of wget2, I see this warning:

       CC       spawn-pipe.lo
     spawn-pipe.c:75:0: warning: "close" redefined
      #define close nonintr_close

     In file included from spawn-pipe.h:23:0,
                      from spawn-pipe.c:27:
     ./unistd.h:758:0: note: this is the location of the previous definition
      #   define close rpl_close

This happens because spawn-pipe.c has this:

  static int
  nonintr_close (int fd)
  {
    int retval;

    do
      retval = close (fd);
    while (retval < 0 && errno == EINTR);

    return retval;
  }
  #define close nonintr_close

IMO, it should use #undef before redefining 'close'.

P.S. Please CC me on any responses, as I'm not subscribed to the list.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]