bug-gnulib
[Top][All Lists]
Advanced

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

Re: getting EBADF on MSVC


From: Bruno Haible
Subject: Re: getting EBADF on MSVC
Date: Tue, 20 Sep 2011 11:51:53 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

Paul Eggert wrote:
> Emacs doesn't need to have a dummy msvc-inval.h file.

You're missing the point. I have explained that you can create a replacement
for this file in a single-line Makefile statement.

I want the module description to contain this:

  Include:
  #include "msvc-inval.h"

not this:

  Include:
  #if HAVE_MSVC_INVALID_PARAMETER_HANDLER
  # include "msvc-inval.h"
  #endif

Why? Because people tend to use the .h file without the #if protection,
leading to compilation errors. This is what happened for the mbiter, mbuiter,
mbfile modules:
<https://lists.gnu.org/archive/html/bug-gnulib/2008-12/msg00217.html>

And for the 'iconv' module, it is still a problem:

  Include:
  #if HAVE_ICONV
  # include <iconv.h>
  #endif

For this one, few compilation failures are reported, because most platforms
either have a <iconv.h> or have libiconv installed nowadays.

> And these three macros are put into config.h by gnulib as well.  ...
> we won't need an msvc-inval.h file in Gnulib.

That cannot work. The three macros need to reference variables and functions
defined in msvc-inval.c. You certainly won't advocate to #include <setjmp.h>
from within config.h? Including system headers from config.h is known to
lead to problems.

Bruno
-- 
In memoriam Pierre Goldman <http://en.wikipedia.org/wiki/Pierre_Goldman>



reply via email to

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