octave-maintainers
[Top][All Lists]
Advanced

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

Re: safer way to use gnulib


From: John W. Eaton
Subject: Re: safer way to use gnulib
Date: Sun, 28 Mar 2010 11:14:42 -0400

On 20-Mar-2010, Michael Goffioul wrote:

| On Sat, Mar 20, 2010 at 10:06 PM, Michael Goffioul
| <address@hidden> wrote:
| > On Sat, Mar 20, 2010 at 9:21 PM, John W. Eaton <address@hidden> wrote:
| >> On 20-Mar-2010, Michael Goffioul wrote:
| >>
| >> | This does not address the problem I reported, does it?
| >>
| >> Yes, I think it should because I removed the #undef GNULIB_NAMESPACE
| >> directive.  That way, accept should not be defined by the gnulib
| >> header.  Please try the patch and let me know if it solves the
| >> problem.  If not, then please report more details about the problem.
| >> Your original report was too vague for me to do anything but guess,
| >> and my best guess about the solution to the problem was the change I
| >> posted.
| >
| > Sorry for the incompleteness of the report. I didn't expect you to
| > try to fix it as I think the problem is in gnulib. The "accept" definition
| > is coming from unistd.h, whose template looks like this:
| >
| > #if @GNULIB_GETHOSTNAME@
| > /* Get all possible declarations of gethostname().  */
| > # if @UNISTD_H_HAVE_WINSOCK2_H@
| > #  include <winsock2.h>
| > #  if !defined _GL_SYS_SOCKET_H
| > [snip]
| > #   undef accept
| > #   define accept               accept_used_without_including_sys_socket_h
| > [snip]
| > #  endif
| > # endif
| > #endif
| >
| > In my case, @GNULIB_GETHOSTNAME@ and @UNISTD_H_HAVE_WINSOCK2_H@
| > are both defined to 1. So, I don't really see what will be the effect of
| > undefining GNULIB_NAMESPACE on the above.
| 
| Some additional info. When scanning the object files, I could
| determine that the following files contained redefined "accept"
| symbol: defaults.cc, dirfns.cc, file-io.cc, help.cc, input.cc, lex.ll,
| oct-hist.cc, oct-procbuf.cc, sighandlers.cc, syscalls, cc, sysdep.cc,
| toplev.cc, txt-eng-ft.cc and utils.cc.

I think this problem is fixed in the gnulib git archive now.  Please
update your copy of gnulib and see if the problem is fixed for you.
The commit that should fix the problem is here:

  
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=cd26599915e1176532dc0d4f956c61642cfec1cb

See also the mailing list thread:

  http://lists.gnu.org/archive/html/bug-gnulib/2010-03/msg00320.html

for details.

jwe


reply via email to

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