Building with VS 2010 and va_copy

135 views
Skip to first unread message

Nick Westgate

unread,
Feb 25, 2016, 4:02:58 PM2/25/16
to re2-dev
Hi guys.

Thanks a lot for the Windows port of RE2. It's awesome!

The Windows port builds great except that va_copy is only implemented in Visual Studio 2013 onwards, and I have to use 2010. (Yeah, I know.)

In notice this in util.h:
#ifdef _WIN32

This might be a good place to add the following small change which would allow building on earlier versions.

// va_copy was not implemented before VS 2013
#if !defined(va_copy)
#define va_copy(dest, src) ((dest) = (src))
#endif

Cheers,
Nick.

Nick Westgate

unread,
Feb 26, 2016, 12:01:05 AM2/26/16
to re2-dev
Ah, I see you use atomics and explicitly require VS 2013. Sigh.

Never mind then.

Cheers,
Nick.

Paul Wankadia

unread,
Feb 26, 2016, 1:34:41 AM2/26/16
to Nick Westgate, re2...@googlegroups.com
On Fri, Feb 26, 2016 at 4:01 PM, Nick Westgate <nick.w...@gmail.com> wrote:

Ah, I see you use atomics and explicitly require VS 2013. Sigh.

Sorry, yes, that was a fairly recent change – the "legacy" atomics were beyond redemption. Visual Studio 2012 might possibly have been able to sneak in with the va_copy hack that you mentioned, but not Visual Studio 2010, I believe.

Nick Westgate

unread,
Feb 28, 2016, 4:01:11 PM2/28/16
to re2-dev, nick.w...@gmail.com
It would be nice if the CMake build would complain about the compiler version then:

Cheers,
Nick.

Paul Wankadia

unread,
Feb 28, 2016, 10:34:34 PM2/28/16
to Nick Westgate, re2...@googlegroups.com
On Mon, Feb 29, 2016 at 8:01 AM, Nick Westgate <nick.w...@gmail.com> wrote:

It would be nice if the CMake build would complain about the compiler version then:

Reply all
Reply to author
Forward
0 new messages