Skip to content

Commit

Permalink
deps: upgrade libuv to 665a316
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Nov 16, 2012
1 parent e2bcff9 commit b6a3b0a
Show file tree
Hide file tree
Showing 88 changed files with 1,146 additions and 56,391 deletions.
40 changes: 0 additions & 40 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -84,46 +84,6 @@ maintained libraries. The externally maintained libraries used by Node are:
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""

- libev, located at deps/uv/src/unix/ev. libev's license follows:
"""
All files in libev are Copyright (C)2007,2008,2009 Marc Alexander Lehmann.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Alternatively, the contents of this package may be used under the terms
of the GNU General Public License ("GPL") version 2 or any later version,
in which case the provisions of the GPL are applicable instead of the
above. If you wish to allow the use of your version of this package only
under the terms of the GPL and not to allow others to use your version of
this file under the BSD license, indicate your decision by deleting the
provisions above and replace them with the notice and other provisions
required by the GPL in this and the other files of this package. If you do
not delete the provisions above, a recipient may use your version of this
file under either the BSD or the GPL.
"""

- C-Ares, an asynchronous DNS client, located at deps/cares. C-Ares license
follows:
"""
Expand Down
10 changes: 6 additions & 4 deletions deps/uv/.gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
*.swp
*.o
*.lo
*.la
*.a
*.[oa]
*.l[oa]
*.opensdf
*.orig
*.sdf
*.suo
core
vgcore.*

/libuv.so
/libuv.dylib

/out/
/build/gyp

Expand Down
3 changes: 0 additions & 3 deletions deps/uv/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ The externally maintained libraries used by libuv are:

- ngx_queue.h (from Nginx), copyright Igor Sysoev. Two clause BSD license.

- libev, located at ev/ is copyright Marc Alexander Lehmann, and
dual-licensed under the MIT license and GPL2.

- inet_pton and inet_ntop implementations, contained in src/inet.c, are
copyright the Internet Systems Consortium, Inc., and licensed under the ISC
license.
Expand Down
27 changes: 12 additions & 15 deletions deps/uv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ endif

CPPFLAGS += -Iinclude -Iinclude/uv-private

ifeq (Darwin,$(uname_S))
SOEXT = dylib
else
SOEXT = so
endif

ifneq (,$(findstring MINGW,$(uname_S)))
include config-mingw.mk
else
Expand All @@ -37,32 +43,23 @@ BENCHMARKS=test/blackhole-server.c test/echo-server.c test/dns-server.c test/ben

all: libuv.a

test/run-tests$(E): test/*.h test/run-tests.c $(RUNNER_SRC) test/runner-unix.c $(TESTS) libuv.a
$(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) -o test/run-tests test/run-tests.c \
test/runner.c $(RUNNER_SRC) $(TESTS) libuv.a $(RUNNER_LIBS) $(RUNNER_LINKFLAGS)
test/run-tests$(E): test/run-tests.c test/runner.c $(RUNNER_SRC) $(TESTS) libuv.$(SOEXT)
$(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) -o $@ $^ $(RUNNER_LIBS) $(RUNNER_LINKFLAGS)

test/run-benchmarks$(E): test/*.h test/run-benchmarks.c test/runner.c $(RUNNER_SRC) $(BENCHMARKS) libuv.a
$(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) -o test/run-benchmarks test/run-benchmarks.c \
test/runner.c $(RUNNER_SRC) $(BENCHMARKS) libuv.a $(RUNNER_LIBS) $(RUNNER_LINKFLAGS)
test/run-benchmarks$(E): test/run-benchmarks.c test/runner.c $(RUNNER_SRC) $(BENCHMARKS) libuv.$(SOEXT)
$(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) -o $@ $^ $(RUNNER_LIBS) $(RUNNER_LINKFLAGS)

test/echo.o: test/echo.c test/echo.h
$(CC) $(CPPFLAGS) $(CFLAGS) -c test/echo.c -o test/echo.o


.PHONY: clean clean-platform distclean distclean-platform test bench


test: test/run-tests$(E)
test/run-tests

#test-%: test/run-tests$(E)
# test/run-tests $(@:test-%=%)
$<

bench: test/run-benchmarks$(E)
test/run-benchmarks

#bench-%: test/run-benchmarks$(E)
# test/run-benchmarks $(@:bench-%=%)
$<

clean: clean-platform
$(RM) -f src/*.o *.a test/run-tests$(E) test/run-benchmarks$(E)
Expand Down
4 changes: 2 additions & 2 deletions deps/uv/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# libuv [![Build Status](https://secure.travis-ci.org/joyent/libuv.png)](http://travis-ci.org/joyent/libuv)

libuv is a new platform layer for Node. Its purpose is to abstract IOCP on
Windows and libev on Unix systems. We intend to eventually contain all
platform differences in this library.
Windows and epoll/kqueue/event ports/etc. on Unix systems. We intend to
eventually contain all platform differences in this library.

http://nodejs.org/

Expand Down
33 changes: 18 additions & 15 deletions deps/uv/config-unix.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@
E=
CSTDFLAG=--std=c89 -pedantic -Wall -Wextra -Wno-unused-parameter
CFLAGS += -g
CPPFLAGS += -Isrc -Isrc/unix/ev
CPPFLAGS += -Isrc
LINKFLAGS=-lm

CPPFLAGS += -D_LARGEFILE_SOURCE
CPPFLAGS += -D_FILE_OFFSET_BITS=64

RUNNER_SRC=test/runner-unix.c
RUNNER_CFLAGS=$(CFLAGS) -Itest
RUNNER_LINKFLAGS=-L"$(PWD)" -luv -Xlinker -rpath -Xlinker "$(PWD)"

OBJS += src/unix/async.o
OBJS += src/unix/core.o
OBJS += src/unix/dl.o
Expand All @@ -46,11 +50,16 @@ OBJS += src/unix/threadpool.o
OBJS += src/unix/timer.o
OBJS += src/unix/tty.o
OBJS += src/unix/udp.o
OBJS += src/fs-poll.o
OBJS += src/uv-common.o
OBJS += src/inet.o

ifeq (SunOS,$(uname_S))
EV_CONFIG=config_sunos.h
CPPFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500
LINKFLAGS+=-lkstat -lnsl -lsendfile -lsocket
# Library dependencies are not transitive.
RUNNER_LINKFLAGS += $(LINKFLAGS)
OBJS += src/unix/sunos.o
endif

Expand All @@ -64,7 +73,8 @@ endif
ifeq (Darwin,$(uname_S))
EV_CONFIG=config_darwin.h
CPPFLAGS += -D_DARWIN_USE_64_BIT_INODE=1
LINKFLAGS+=-framework CoreServices
LINKFLAGS+=-framework CoreServices -dynamiclib -install_name "@rpath/libuv.dylib"
SOEXT = dylib
OBJS += src/unix/darwin.o
OBJS += src/unix/kqueue.o
OBJS += src/unix/fsevents.o
Expand All @@ -74,6 +84,7 @@ ifeq (Linux,$(uname_S))
EV_CONFIG=config_linux.h
CSTDFLAG += -D_GNU_SOURCE
LINKFLAGS+=-ldl -lrt
RUNNER_CFLAGS += -D_GNU_SOURCE
OBJS += src/unix/linux/linux-core.o \
src/unix/linux/inotify.o \
src/unix/linux/syscalls.o
Expand Down Expand Up @@ -115,39 +126,31 @@ LINKFLAGS+=
OBJS += src/unix/cygwin.o
endif

# Need _GNU_SOURCE for strdup?
RUNNER_CFLAGS=$(CFLAGS) -D_GNU_SOURCE
RUNNER_LINKFLAGS=$(LINKFLAGS)

ifeq (SunOS,$(uname_S))
RUNNER_LINKFLAGS += -pthreads
else
RUNNER_LINKFLAGS += -pthread
endif

RUNNER_LIBS=
RUNNER_SRC=test/runner-unix.c

libuv.a: $(OBJS) src/fs-poll.o src/inet.o src/uv-common.o src/unix/ev/ev.o
libuv.a: $(OBJS)
$(AR) rcs $@ $^

libuv.$(SOEXT): CFLAGS += -fPIC
libuv.$(SOEXT): $(OBJS)
$(CC) -shared -o $@ $^ $(LINKFLAGS)

src/%.o: src/%.c include/uv.h include/uv-private/uv-unix.h
$(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c $< -o $@

src/unix/%.o: src/unix/%.c include/uv.h include/uv-private/uv-unix.h src/unix/internal.h
$(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c $< -o $@

src/unix/ev/ev.o: src/unix/ev/ev.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c src/unix/ev/ev.c -o src/unix/ev/ev.o -DEV_CONFIG_H=\"$(EV_CONFIG)\"

clean-platform:
-rm -f src/unix/*.o
-rm -f src/unix/ev/*.o
-rm -f src/unix/linux/*.o
-rm -rf test/run-tests.dSYM run-benchmarks.dSYM

distclean-platform:
-rm -f src/unix/*.o
-rm -f src/unix/ev/*.o
-rm -f src/unix/linux/*.o
-rm -rf test/run-tests.dSYM run-benchmarks.dSYM
7 changes: 4 additions & 3 deletions deps/uv/gyp_uv
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@ if __name__ == '__main__':
args.append('-Dgcc_version=%d' % (10 * major + minor))
args.append('-Dclang=%d' % int(is_clang))

if not any(a.startswith('-Dtarget_arch') for a in args):
if not any(a.startswith('-Dtarget_arch=') for a in args):
args.append('-Dtarget_arch=ia32')

if not any(a.startswith('-Dlibrary') for a in args):
if not any(a.startswith('-Dlibrary=') for a in args):
args.append('-Dlibrary=static_library')

args.append('-Dcomponent=static_library')
if not any(a.startswith('-Dcomponent=') for a in args):
args.append('-Dcomponent=static_library')

gyp_args = list(args)
print gyp_args
Expand Down
Loading

0 comments on commit b6a3b0a

Please sign in to comment.