Commit 94343b6b authored by Ivan Shynkarenka's avatar Ivan Shynkarenka

Cygwin build failed

MinGW 7.2 (x86_64) build failed
parent 394643ba
......@@ -19,6 +19,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#if __CYGWIN__
#define _GNU_SOURCE
#endif
#include "lexer.h"
#include "parser.h"
#include "compiler.h"
......
......@@ -22,6 +22,10 @@
// This program is a code generator plugin for `capnp compile` which writes the schema back to
// stdout in roughly capnpc format.
#if __CYGWIN__
#define _GNU_SOURCE
#endif
#include <capnp/schema.capnp.h>
#include "../serialize.h"
#include <kj/debug.h>
......
......@@ -26,6 +26,10 @@
// the types are expected to be compatible, the test also constructs an instance of the old
// type and reads it as the new type, and vice versa.
#if __CYGWIN__
#define _GNU_SOURCE
#endif
#include <capnp/compiler/grammar.capnp.h>
#include <capnp/schema-loader.h>
#include <capnp/message.h>
......
......@@ -19,6 +19,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#if __CYGWIN__
#define _GNU_SOURCE
#endif
#include <capnp/test-import.capnp.h>
#include <capnp/test-import2.capnp.h>
#include "message.h"
......
......@@ -19,6 +19,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#if __CYGWIN__
#define _GNU_SOURCE
#endif
#include "serialize-async.h"
#include "serialize.h"
#include <kj/debug.h>
......
......@@ -19,6 +19,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#if __CYGWIN__
#define _GNU_SOURCE
#endif
#include "serialize.h"
#include <kj/debug.h>
#include <kj/compat/gtest.h>
......
......@@ -22,6 +22,10 @@
#if !_WIN32
// For Win32 implementation, see async-io-win32.c++.
#if __CYGWIN__
#define _GNU_SOURCE
#endif
#include "async-io.h"
#include "async-io-internal.h"
#include "async-unix.h"
......
......@@ -19,6 +19,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#if __CYGWIN__
#define _GNU_SOURCE
#endif
#include "debug.h"
#include "exception.h"
#include <kj/compat/gtest.h>
......
......@@ -19,6 +19,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#if __CYGWIN__
#define _GNU_SOURCE
#endif
#include "exception.h"
#include "string.h"
#include "debug.h"
......
......@@ -21,6 +21,10 @@
#if !_WIN32
#if __CYGWIN__
#define _GNU_SOURCE
#endif
#include "filesystem.h"
#include "debug.h"
#include <sys/types.h>
......@@ -385,8 +389,8 @@ public:
static const byte ZEROS[4096] = { 0 };
#if __APPLE__
// Mac doesn't have pwritev().
#if __APPLE__ || __CYGWIN__
// Mac & Cygwin doesn't have pwritev().
while (size > sizeof(ZEROS)) {
write(offset, ZEROS);
size -= sizeof(ZEROS);
......
......@@ -1094,7 +1094,7 @@ public:
}
KJ_DEFER({
if (kj::isSameType<T, Directory>()) {
HANDLE newHandle;
HANDLE newHandle = nullptr;
KJ_WIN32(newHandle = CreateFileW(
committed ? parentDirectory.nativePath(path).begin() : tempPath.begin(),
GENERIC_READ,
......
......@@ -19,6 +19,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#if __CYGWIN__
#define _GNU_SOURCE
#endif
#include "io.h"
#include "debug.h"
#include "miniposix.h"
......
......@@ -19,6 +19,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#if __CYGWIN__
#define _GNU_SOURCE
#endif
#include "io.h"
#include "debug.h"
#include "miniposix.h"
......
......@@ -19,6 +19,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#if __CYGWIN__
#define _GNU_SOURCE
#endif
#include "main.h"
#include "debug.h"
#include "arena.h"
......
......@@ -19,6 +19,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#if __CYGWIN__
#define _GNU_SOURCE
#endif
#include "test.h"
#include "main.h"
#include "io.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment