[ccan] [PATCH 0/9] configurator: Support for Windows and MSVC

David Gibson david at gibson.dropbear.id.au
Tue Sep 20 14:48:22 AEST 2016


On Sun, Sep 18, 2016 at 06:51:57PM -0600, Kevin Locke wrote:
> Hi all,
> 
> This patch series adds support for building configurator with Microsoft
> Visual C++ and running it on Windows.  The motivation is to add
> sufficient support for Windows to allow using header-only modules
> with minimal hassle.  For me, this patch series is sufficient, so I
> don't have any further plans for changes to other files or the build
> system at the moment.

First, thanks for this.  ccan isn't supposed to be platform specific,
but it kind of is at the moment, simply because most of the
contributions have been from Linux developers.  I'm really happy to
see some work to make it useful on different platforms.

Second, because I'm not and have never been a Windows dev, my ability
to review these is limited - so I'm inclined to apply anything that
doesn't break builds on Linux / POSIX.

Third, because most of the main ccan contributors are not Windows
devs, I'm a bit worried about bitrot.  If you can think of any way of
making some kind of automated smoke test form builds on Windows, that
would be terrific.  Otherwise, I guess we'll just hope for the best.

> The two patches that are particularly likely to raise objections are
> patch 3 and 8:
> 
> Patch 3 adds a copy of the err.h functions used by configurator to work
> around the lack of err.h on Windows.  If this is too much code to lump
> into configurator.c, I can split it out (and copy err.{c,h} verbatim
> from musl) or call fprintf+exit directly.
> 
> Patch 8 adds the output cflag (-o) to DEFAULT_CFLAGS and the expected
> configurator cflags argument.  This changes both the configurator API
> and the config.h API and will break existing code which depend on these.
> If that is unacceptable, I'd be open to implementing a
> backwards-compatible alternative.  One idea would be to add an
> --output-cflag option to configurator, although it will require quite a
> bit of argument parsing code.  I'm open to other alternatives as well.
> 
> Thanks for considering,
> Kevin
> 
> Kevin Locke (9):
>   configurator: Replace unlink with remove
>   configurator: Reimplement run using popen
>   configurator: Inline err.h functions from musl libc
>   configurator: Use native directory separator
>   configurator: Mark non-Windows tests MAY_NOT_COMPILE
>   configurator: Print test source without cat
>   configurator: Fix compiler warning with compare
>   configurator: Pass output cflag to configurator
>   configurator: DEFAULT_{COMPILER,FLAGS} for MSVC
> 
>  Makefile                          |   2 +-
>  tools/configurator/configurator.c | 197 +++++++++++++++++++++++++-------------
>  2 files changed, 131 insertions(+), 68 deletions(-)
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20160920/d94539bf/attachment-0001.sig>


More information about the ccan mailing list