bug-gnulib
[Top][All Lists]
Advanced

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

Re: getting EBADF on MSVC


From: Paul Eggert
Subject: Re: getting EBADF on MSVC
Date: Mon, 19 Sep 2011 15:52:14 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.22) Gecko/20110906 Fedora/3.1.14-1.fc14 Thunderbird/3.1.14

On 09/19/11 14:15, Bruno Haible wrote:
> I hope you can choose among these three solutions.

How about a 4th solution?  It's modeled on your b.2)

  c) You store no additional file in Emacs' VCS. Just one addition to
     configure.ac or aclocal.m4:

         AH_VERBATIM([
         #define TRY_MSVC_INVAL if (1)
         #define CATCH_MSVC_INVAL else
         #define DONE_MSVC_INVAL
         ])

And these three macros are put into config.h by gnulib as well.  That
way, Emacs doesn't need to have a dummy msvc-inval.h file.  And
invoking code will be simpler, since it won't need to #include
<msvc-inval.h>.  And we won't need an msvc-inval.h file in Gnulib.

Putting these macros into config.h would be appropriate, since they
affect the language, much as (say) the _Noreturn macro does.  We don't
have or need a "noreturn.h" include file, and likewise we shouldn't
need an "msvc-inval.h" file either.

Come to think of it, perhaps the above AH_VERBATIM bit should be in a
new Gnulib macro gl_AVOID_MSVC or something like that.  This macro
could be used in packages that don't want to bother to support MSVC.

I'm still dubious about TRY_MSVC_INVAL etc., though, for reasons I
discussed earlier.  At least, I'd rather see those macros used only in
contexts that are clearly Windows-specific, and would rather not see
them in ordinary mainstream code.

>   * If you ask for "--avoid=msvc-inval" to work without any replacement code,
>     you ask to change the contract of the module,

Yes, absolutely.  And there should be no problem with that.  The
msvc-inval module was just introduced a day ago.  Now's the best time
to fix its API, if it has problems.




reply via email to

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