Permalink
Browse files

Merge remote-tracking branch 'upstream/master'

  • Loading branch information...
2 parents a2bb1f0 + 43cb4ec commit 7e70e9113f9a0f0c242def9711f230a52e1cbcec @tjanczuk tjanczuk committed Sep 23, 2011
Showing 334 changed files with 25,069 additions and 2,557 deletions.
View
@@ -202,3 +202,19 @@ SAWADA Tadashi <cesare@mayverse.jp>
Logan Smyth <loganfsmyth@gmail.com>
Christopher Wright <christopherwright@gmail.com>
Mickaël Delahaye <mickael.delahaye@gmail.com>
+Aku Kotkavuo <aku@hibana.net>
+Peter Bright <drpizza@quiscalusmexicanus.org>
+Glen Low <glen.low@pixelglow.com>
+Thomas Shinnick <tshinnic@gmail.com>
+Antranig Basman <antranig.basman@colorado.edu>
+Maciej Małecki <maciej.malecki@notimplemented.org>
+Evan Martin <martine@danga.com>
+Peter Lyons <pete@peterlyons.com>
+jkummerow@chromium.org <jkummerow@chromium.org>
+Jann Horn <jannhorn@googlemail.com>
+Abimanyu Raja <abimanyuraja@gmail.com>
+Karl Skomski <karl@skomski.com>
+Niclas Hoyer <niclas@verbugt.de>
+Michael Jackson <mjijackson@gmail.com>
+Ashok Mudukutore <ashok@lineratesystems.com>
+Sean Cunningham <sean.cunningham@mandiant.com>
View
@@ -1,3 +1,39 @@
+2011.09.16, Version 0.5.7 (unstable)
+
+* Upgrade V8 to 3.6.4
+
+* Improve Windows compatibility
+
+* Documentation improvements
+
+* Debugger and REPL improvements (Fedor Indutny)
+
+* Add legacy API support: net.Stream(fd), process.stdout.writable,
+ process.stdout.fd
+
+* Fix mkdir EEXIST handling (isaacs)
+
+* Use net_uv instead of net_legacy for stdio
+
+* Do not load readline from util.inspect
+
+* #1673 Fix bug related to V8 context with accessors (Fedor Indutny)
+
+* #1634 util: Fix inspection for Error (koichik)
+
+* #1645 fs: Add positioned file writing feature to fs.WriteStream (Thomas
+ Shinnick)
+
+* #1637 fs: Unguarded fs.watchFile cache statWatchers checking fixed (Thomas
+ Shinnick)
+
+* #1695 Forward customFds to ChildProcess.spawn
+
+* #1707 Fix hasOwnProperty security problem in querystring (isaacs)
+
+* #1719 Drain OpenSSL error queue
+
+
2011.09.08, Version 0.5.6 (unstable)
* #345, #1635, #1648 Documentation improvements (Thomas Shinnick,
View
@@ -71,13 +71,9 @@ The externally maintained libraries used by Node are:
- lib/punycode.js is copyright 2011 Ben Noordhuis and released under the MIT license.
- - deps/pthread-win32/libpthreadGC2.a and
- deps/pthread-win32/libpthreadGC2d.a is a POSIX threads library for
- Microsoft Windows and is used for the Windows build and statically
- linked into the Node executable. This software is freely available at
- http://sourceware.org/pthreads-win32/ It is Copyright 1998 John E.
- Bossom and 1999,2006 Pthreads-win32 contributors and licensed under the
- LGPL. See deps/pthread-win32/COPYING.LIB for more details.
-
- tools/gyp GYP is a meta-build system copyright 2009 Google Inc and
licensed under the three clause BSD license. See tools/gyp/LICENSE.
+
+ - deps/zlib copyright 1995-2010 Jean-loup Gailly and Mark Adler
+ licensed under a permissive free software license. See
+ deps/zlib/LICENSE.
View
@@ -5,3 +5,4 @@
<bertbelder@gmail.com> <info@2bs.nl>
<alan@prettyrobots.com> <alan@blogometer.com>
San-Tai Hsu <vanilla@fatpipi.com>
+Isaac Z. Schlueter <i@izs.me>
View
@@ -21,3 +21,6 @@ Clifford Heath <clifford.heath@gmail.com>
Jorge Chamorro Bieling <jorge@jorgechamorro.com>
Luis Lavena <luislavena@gmail.com>
Matthew Sporleder <msporleder@gmail.com>
+Erick Tryzelaar <erick.tryzelaar@gmail.com>
+Isaac Z. Schlueter <i@izs.me>
+Pieter Noordhuis <pcnoordhuis@gmail.com>
@@ -1,10 +1,49 @@
-This is the new networking 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.
+# 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.
http://nodejs.org/
-= Build Instructions
+## Features
+
+Implemented Features:
+
+ * Non-blocking sockets and pipes
+
+ * Timers
+
+ * UDP
+
+ * Child process spawning
+
+ * Asynchronous DNS via c-ares or getaddrinfo.
+
+ * Asynchronous file system APIs (uv_fs_*)
+
+ * High resolution time (uv_hrtime)
+
+ * Current executable path look up (uv_exepath)
+
+ * Thread pool scheduling (uv_queue_work)
+
+Work in progress:
+
+ * File system events (Currently supports inotify, ReadDirectoryChangesW and
+ will support kqueue and event ports in the near future.)
+
+ * TTY support (with VT100 emulation on Windows - work in progress)
+
+ * Socket sharing between processes
+
+
+## Documentation
+
+See `include/uv.h`.
+
+
+## Build Instructions
For GCC (including MinGW) there are two methods building: via normal
makefiles or via GYP. GYP is a meta-build system which can generate MSVS,
@@ -38,7 +77,7 @@ Macintosh users run
xcodebuild -project uv.xcodeproj -configuration Release -target All
-= Supported Platforms
+## Supported Platforms
Microsoft Windows operating systems since Windows XP SP2. It can be built
with either Visual Studio or MinGW.
View
@@ -113,7 +113,7 @@
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
'ldflags': [ '-pthread', ],
'conditions': [
- [ 'target_arch=="ia32"', {
+ [ 'host_arch != target_arch and target_arch=="ia32"', {
'cflags': [ '-m32' ],
'ldflags': [ '-m32' ],
}],
@@ -22,7 +22,7 @@ CC = $(PREFIX)gcc
AR = $(PREFIX)ar
E=
CSTDFLAG=--std=c89 -pedantic -Wall -Wextra -Wno-unused-parameter
-CFLAGS=-g
+CFLAGS += -g
CPPFLAGS += -Isrc/unix/ev
LINKFLAGS=-lm
@@ -0,0 +1,29 @@
+/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef UV_LINUX_H
+#define UV_LINUX_H
+
+#define UV_FS_EVENT_PRIVATE_FIELDS \
+ ev_io read_watcher; \
+ uv_fs_event_cb cb; \
+
+#endif /* UV_LINUX_H */
@@ -27,6 +27,10 @@
#include "ev.h"
#include "eio.h"
+#if defined(__linux__)
+#include "uv-private/uv-linux.h"
+#endif
+
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
@@ -42,6 +46,11 @@ typedef struct {
typedef int uv_file;
+/* Stub. Remove it once all platforms support the file watcher API. */
+#ifndef UV_FS_EVENT_PRIVATE_FIELDS
+#define UV_FS_EVENT_PRIVATE_FIELDS /* empty */
+#endif
+
#define UV_LOOP_PRIVATE_FIELDS \
ares_channel channel; \
/* \
@@ -86,7 +86,8 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
UV_GETADDRINFO_REQ, \
UV_PROCESS_EXIT, \
UV_PROCESS_CLOSE, \
- UV_UDP_RECV
+ UV_UDP_RECV, \
+ UV_FS_EVENT_REQ
#define UV_REQ_PRIVATE_FIELDS \
union { \
@@ -261,6 +262,16 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
#define UV_WORK_PRIVATE_FIELDS \
+#define UV_FS_EVENT_PRIVATE_FIELDS \
+ struct uv_fs_event_req_s { \
+ UV_REQ_FIELDS \
+ } req; \
+ HANDLE dir_handle; \
+ int req_pending; \
+ uv_fs_event_cb cb; \
+ wchar_t* filew; \
+ int is_path_dir; \
+ char* buffer;
#define UV_TTY_PRIVATE_FIELDS /* empty */
View
@@ -65,6 +65,8 @@ typedef struct uv_write_s uv_write_t;
typedef struct uv_connect_s uv_connect_t;
typedef struct uv_udp_send_s uv_udp_send_t;
typedef struct uv_fs_s uv_fs_t;
+/* uv_fs_event_t is a subclass of uv_handle_t. */
+typedef struct uv_fs_event_s uv_fs_event_t;
typedef struct uv_work_s uv_work_t;
#if defined(__unix__) || defined(__POSIX__) || defined(__APPLE__)
@@ -137,6 +139,15 @@ typedef void (*uv_fs_cb)(uv_fs_t* req);
typedef void (*uv_work_cb)(uv_work_t* req);
typedef void (*uv_after_work_cb)(uv_work_t* req);
+/*
+* This will be called repeatedly after the uv_fs_event_t is initialized.
+* If uv_fs_event_t was initialized with a directory the filename parameter
+* will be a relative path to a file contained in the directory.
+* The events paramenter is an ORed mask of enum uv_fs_event elements.
+*/
+typedef void (*uv_fs_event_cb)(uv_fs_event_t* handle, const char* filename,
+ int events, int status);
+
/* Expand this list if necessary. */
typedef enum {
@@ -201,7 +212,8 @@ typedef enum {
UV_ASYNC,
UV_ARES_TASK,
UV_ARES_EVENT,
- UV_PROCESS
+ UV_PROCESS,
+ UV_FS_EVENT
} uv_handle_type;
typedef enum {
@@ -607,6 +619,18 @@ int uv_tty_init(uv_loop_t*, uv_tty_t*, uv_file fd);
*/
int uv_tty_set_mode(uv_tty_t*, int mode);
+/*
+ * Gets the current Window size. On success zero is returned.
+ */
+int uv_tty_get_winsize(uv_tty_t*, int* width, int* height);
+
+/*
+ * Used to detect what type of stream should be used with a given file
+ * descriptor. Usually this will be used during initialization to guess the
+ * type of the stdio streams.
+ * For isatty() functionality use this function and test for UV_TTY.
+ */
+uv_handle_type uv_guess_handle(uv_file file);
/*
* uv_pipe_t is a subclass of uv_stream_t
@@ -779,8 +803,10 @@ struct uv_getaddrinfo_s {
*
* Return code 0 means that request is accepted and callback will be called
* with result. Other return codes mean that there will not be a callback.
- * Input arguments may be released after return from this call. Callback
- * must not call freeaddrinfo.
+ * Input arguments may be released after return from this call.
+ *
+ * uv_freeaddrinfo() must be called after completion to free the addrinfo
+ * structure.
*/
int uv_getaddrinfo(uv_loop_t*,
uv_getaddrinfo_t* handle,
@@ -789,6 +815,8 @@ struct uv_getaddrinfo_s {
const char* service,
const struct addrinfo* hints);
+void uv_freeaddrinfo(struct addrinfo* ai);
+
/* uv_spawn() options */
typedef struct uv_process_options_s {
uv_exit_cb exit_cb; /* Called after the process exits. */
@@ -997,6 +1025,27 @@ int uv_fs_fchown(uv_loop_t* loop, uv_fs_t* req, uv_file file, int uid,
int gid, uv_fs_cb cb);
+enum uv_fs_event {
+ UV_RENAME = 1,
+ UV_CHANGE = 2
+};
+
+
+struct uv_fs_event_s {
+ UV_HANDLE_FIELDS
+ char* filename;
+ UV_FS_EVENT_PRIVATE_FIELDS
+};
+
+
+/*
+* If filename is a directory then we will watch for all events in that
+* directory. If filename is a file - we will only get events from that
+* file. Subdirectories are not watched.
+*/
+int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle,
+ const char* filename, uv_fs_event_cb cb);
+
/* Utility */
/* Convert string ip addresses to binary structures */
@@ -1032,6 +1081,7 @@ union uv_any_handle {
uv_async_t async;
uv_timer_t timer;
uv_getaddrinfo_t getaddrinfo;
+ uv_fs_event_t fs_event;
};
union uv_any_req {
@@ -1059,6 +1109,7 @@ struct uv_counters_s {
uint64_t async_init;
uint64_t timer_init;
uint64_t process_init;
+ uint64_t fs_event_init;
};
@@ -1092,6 +1143,7 @@ struct uv_loop_s {
#undef UV_GETADDRINFO_PRIVATE_FIELDS
#undef UV_FS_REQ_PRIVATE_FIELDS
#undef UV_WORK_PRIVATE_FIELDS
+#undef UV_FS_EVENT_PRIVATE_FIELDS
#ifdef __cplusplus
}
Oops, something went wrong.

0 comments on commit 7e70e91

Please sign in to comment.