Browse Source

Upgrade libuv to ba1c38f to fix mingw build

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
70a8927a93
  1. 15
      deps/uv/config-mingw.mk
  2. 2
      deps/uv/eio/xthread.h
  3. 3
      deps/uv/test/test-hrtime.c
  4. 2
      deps/uv/uv-linux.c

15
deps/uv/config-mingw.mk

@ -34,8 +34,8 @@ RUNNER_LINKFLAGS=$(LINKFLAGS)
RUNNER_LIBS=-lws2_32
RUNNER_SRC=test/runner-win.c
uv.a: uv-win.o uv-common.o $(CARES_OBJS)
$(AR) rcs uv.a uv-win.o uv-common.o $(CARES_OBJS)
uv.a: uv-win.o uv-common.o uv-eio.o eio/eio.o $(CARES_OBJS)
$(AR) rcs uv.a uv-win.o uv-common.o uv-eio.o eio/eio.o $(CARES_OBJS)
uv-win.o: uv-win.c uv.h uv-win.h
$(CC) $(CFLAGS) -c uv-win.c -o uv-win.o
@ -43,6 +43,17 @@ uv-win.o: uv-win.c uv.h uv-win.h
uv-common.o: uv-common.c uv.h uv-win.h
$(CC) $(CFLAGS) -c uv-common.c -o uv-common.o
EIO_CPPFLAGS += $(CPPFLAGS)
EIO_CPPFLAGS += -DEIO_CONFIG_H=\"$(EIO_CONFIG)\"
EIO_CPPFLAGS += -DEIO_STACKSIZE=65536
EIO_CPPFLAGS += -D_GNU_SOURCE
eio/eio.o: eio/eio.c
$(CC) $(EIO_CPPFLAGS) $(CFLAGS) -c eio/eio.c -o eio/eio.o
uv-eio.o: uv-eio.c
$(CC) $(CPPFLAGS) -Ieio/ $(CFLAGS) -c uv-eio.c -o uv-eio.o
clean-platform:
-rm -f c-ares/*.o

2
deps/uv/eio/xthread.h

@ -22,7 +22,9 @@ typedef int ssize_t
#endif
#define NTDDI_VERSION NTDDI_WIN2K // needed to get win2000 api calls
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x400
#endif
#include <stdio.h>//D
#include <fcntl.h>
#include <io.h>

3
deps/uv/test/test-hrtime.c

@ -41,7 +41,7 @@ TEST_IMPL(hrtime) {
uint64_t a, b, diff;
a = uv_hrtime();
uv_sleep(1);
uv_sleep(100);
b = uv_hrtime();
diff = b - a;
@ -49,5 +49,6 @@ TEST_IMPL(hrtime) {
printf("diff = %llu\n", diff);
ASSERT(diff >= NANOSEC / MICROSEC);
ASSERT(diff > MICROSEC);
return 0;
}

2
deps/uv/uv-linux.c

@ -25,7 +25,7 @@
#include <time.h>
#undef NANOSEC
#define NANOSEC 1000000
#define NANOSEC 1000000000
/*
* There's probably some way to get time from Linux than gettimeofday(). What

Loading…
Cancel
Save