bug-gnulib
[Top][All Lists]
Advanced

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

Re: new module 'fclose'


From: Simon Josefsson
Subject: Re: new module 'fclose'
Date: Mon, 20 Oct 2008 15:10:34 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux)

Bruno Haible <address@hidden> writes:

> We're overriding close(). But the system's fclose(), when called on a FILE
> stream that was created with fdopen() from a socket descriptor, will not
> invoke our overridden close(). So we have to override fclose() as well.
>
> I'm committing this. It has a circular dependency between the modules
> 'close' and 'fclose'. That seems the safest to me.

Since gsasl doesn't use fclose on sockets opened with fdopen, I added
--avoid=fclose.  However, this produced:

configure:22560: error: possibly undefined macro: gl_REPLACE_FCLOSE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

And indeed gl_REPLACE_FCLOSE is called even if the module is avoided,
see close.m4:

AC_DEFUN([gl_REPLACE_CLOSE],
[
  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
  if test $REPLACE_CLOSE != 1; then
    AC_LIBOBJ([close])
  fi
  REPLACE_CLOSE=1
  gl_REPLACE_FCLOSE
])

I can't add an --avoid=close as well, because I need the close
replacement for the winsock behaviour.

Is there a good solution here?

Meanwhile, I'll replace fclose as well, but it feels unnecessary.

/Simon




reply via email to

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