[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [3/11] Native MSVC support (msvc-cwrapper)
From: |
Charles Wilson |
Subject: |
Re: [3/11] Native MSVC support (msvc-cwrapper) |
Date: |
Thu, 12 Jul 2007 02:19:43 -0400 |
User-agent: |
Thunderbird 1.5.0.12 (Windows/20070509) |
Peter Rosin wrote:
Make the cwrapper build using MSVC and older MinGW.
* libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src): Add
support for Microsoft Visual C. Also, older MinGW versions
seem to need stdint.h to find intptr_t.
This also looks OK to me (and tested on cygwin and linux) -- but again,
I don't know what the maintainers' policy is at the moment, for a large
new feature like MSVC support.
I don't really like this:
+#ifdef _MSC_VER
that is, "platform" #ifdefs rather than "feature" #ifdefs. However,
it's really not that different from the existing idiom, which does the
"#ifdef" in shell code:
case $host_os in
mingw*) cat <<"EOF"
<mingw specific code>
EOF
;;
*) cat <<"EOF"
<generic code>
EOF
;;
esac
Furthermore,
(1) the cwrapper does not #include config.h (or whatever the enclosing
project has decided to call its autoconf-generated configuration
header), and even if it did,
(2) it's rather silly to have configure do a lot of checks, on every
platform, that probably aren't necessary for the enclosing project just
to satisfy the cwrapper's needs on a specific platform.
(3) we already make a lot of assumptions in the cwrapper code because we
know it's only used for cygwin and mingw hosts (or rather, only used for
an underlying mswin host). If we were to go all puritanically "feature
#ifdef only" we need to revisit (1) above, AND make a LOT of new
tests...errno.h, sys/stat.h, some syscalls...
(4) AND, who am I kidding: we already do this:
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
defined (__OS2__)
blah blah blah
#endif
which is pretty dadgummed "platform" based as it is.
If it sounds like I'm taking myself into "platform" #ifdefs for the
cwrapper...you're right. Looks OK.
--
Chuck
- [1/11] Native MSVC support (lib-as-archiver), (continued)
[3/11] Native MSVC support (msvc-cwrapper), Peter Rosin, 2007/07/10
- Re: [3/11] Native MSVC support (msvc-cwrapper),
Charles Wilson <=
- Re: [3/11] Native MSVC support (msvc-cwrapper), Charles Wilson, 2007/07/18
- Re: [3/11] Native MSVC support (msvc-cwrapper), Ralf Wildenhues, 2007/07/19
- Re: [3/11] Native MSVC support (msvc-cwrapper), Charles Wilson, 2007/07/19
- Re: [3/11] Native MSVC support (msvc-cwrapper), Bob Friesenhahn, 2007/07/19
- Re: [3/11] Native MSVC support (msvc-cwrapper), Gary V. Vaughan, 2007/07/20
- Re: [3/11] Native MSVC support (msvc-cwrapper), Peter Rosin, 2007/07/21
- Re: [3/11] Native MSVC support (msvc-cwrapper), Charles Wilson, 2007/07/21
- Re: [3/11] Native MSVC support (msvc-cwrapper), Peter Rosin, 2007/07/22
[4/11] Native MSVC support (file-magic-glob), Peter Rosin, 2007/07/10