Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Merge remote branch 'origin/v0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Nov 16, 2011
2 parents 5d0b5a0 + 44314cc commit 93dc713
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 36 deletions.
1 change: 1 addition & 0 deletions deps/uv/.mailmap
Expand Up @@ -8,3 +8,4 @@ San-Tai Hsu <vanilla@fatpipi.com>
Isaac Z. Schlueter <i@izs.me>
Saúl Ibarra Corretgé <saghul@gmail.com>
Yuki OKUMURA <mjt@cltn.org>
Frank Denis <github@pureftpd.org>
4 changes: 3 additions & 1 deletion deps/uv/AUTHORS
Expand Up @@ -30,4 +30,6 @@ Saúl Ibarra Corretgé <saghul@gmail.com>
Felix Geisendörfer <felix@debuggable.com>
Yuki OKUMURA <mjt@cltn.org>
Roman Shtylman <shtylman@gmail.com>
Frank DENIS <github@pureftpd.org>
Frank Denis <github@pureftpd.org>
Carter Allen <CarterA@opt-6.com>
Tj Holowaychuk <tj@vision-media.ca>
9 changes: 9 additions & 0 deletions deps/uv/config-unix.mk
Expand Up @@ -74,6 +74,15 @@ OBJS += src/unix/freebsd.o
OBJS += src/unix/kqueue.o
endif

ifeq (DragonFly,$(uname_S))
EV_CONFIG=config_freebsd.h
EIO_CONFIG=config_freebsd.h
CPPFLAGS += -Isrc/ares/config_freebsd
LINKFLAGS+=
OBJS += src/unix/freebsd.o
OBJS += src/unix/kqueue.o
endif

ifeq (NetBSD,$(uname_S))
EV_CONFIG=config_netbsd.h
EIO_CONFIG=config_netbsd.h
Expand Down
4 changes: 2 additions & 2 deletions deps/uv/include/uv.h
Expand Up @@ -48,7 +48,7 @@ extern "C" {


#define UV_VERSION_MAJOR 0
#define UV_VERSION_MINOR 1
#define UV_VERSION_MINOR 6


#include <stdint.h> /* int64_t */
Expand Down Expand Up @@ -730,7 +730,7 @@ UV_EXTERN int uv_tty_set_mode(uv_tty_t*, int mode);
* To be called when the program exits. Resets TTY settings to default
* values for the next process to take over.
*/
UV_EXTERN void uv_tty_reset_mode();
UV_EXTERN void uv_tty_reset_mode(void);

/*
* Gets the current Window size. On success zero is returned.
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/src/unix/eio/eio.c
Expand Up @@ -316,7 +316,7 @@ static int gettimeofday(struct timeval *tv, struct timezone *tz)
#if HAVE_SENDFILE
# if __linux
# include <sys/sendfile.h>
# elif __FreeBSD__ || defined __APPLE__
# elif __FreeBSD__ || __DragonFly__ || defined __APPLE__
# include <sys/socket.h>
# include <sys/uio.h>
# elif __hpux
Expand Down
8 changes: 7 additions & 1 deletion deps/uv/src/unix/freebsd.c
Expand Up @@ -50,11 +50,17 @@ int uv_exepath(char* buffer, size_t* size) {
return -1;
}


#ifdef __DragonFly__
mib[0] = CTL_KERN;
mib[1] = KERN_PROC;
mib[2] = KERN_PROC_ARGS;
mib[3] = getpid();
#else
mib[0] = CTL_KERN;
mib[1] = KERN_PROC;
mib[2] = KERN_PROC_PATHNAME;
mib[3] = -1;
#endif

cb = *size;
if (sysctl(mib, 4, buffer, &cb, NULL, 0) < 0) {
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/src/unix/netbsd.c
Expand Up @@ -91,7 +91,7 @@ uint64_t uv_get_free_memory(void) {
return -1;
}

return (uint64_t) info.free * psysconf(_SC_PAGESIZE);
return (uint64_t) info.free * sysconf(_SC_PAGESIZE);
}

uint64_t uv_get_total_memory(void) {
Expand Down
4 changes: 2 additions & 2 deletions deps/uv/src/unix/stream.c
Expand Up @@ -145,7 +145,7 @@ void uv__stream_destroy(uv_stream_t* stream) {

req = ngx_queue_data(q, uv_write_t, queue);
if (req->cb) {
uv__set_artificial_error(stream->loop, req->error);
uv__set_sys_error(stream->loop, req->error);
req->cb(req, req->error ? -1 : 0);
}
}
Expand Down Expand Up @@ -490,7 +490,7 @@ static void uv__write_callbacks(uv_stream_t* stream) {

/* NOTE: call callback AFTER freeing the request data. */
if (req->cb) {
uv__set_artificial_error(stream->loop, req->error);
uv__set_sys_error(stream->loop, req->error);
req->cb(req, req->error ? -1 : 0);
}

Expand Down
2 changes: 1 addition & 1 deletion deps/uv/test/benchmark-pound.c
Expand Up @@ -28,6 +28,7 @@
#undef NANOSEC
#define NANOSEC ((uint64_t)10e8)

#undef DEBUG
#define DEBUG 0

struct conn_rec_s;
Expand Down Expand Up @@ -135,7 +136,6 @@ static void connect_cb(uv_connect_t* req, int status) {


static void read_cb(uv_stream_t* stream, ssize_t nread, uv_buf_t buf) {
conn_rec* p = (conn_rec*)stream->data;
uv_err_t err = uv_last_error(loop);

ASSERT(stream != NULL);
Expand Down
22 changes: 0 additions & 22 deletions deps/uv/test/runner-unix.c
Expand Up @@ -37,35 +37,13 @@
#include <sys/select.h>
#include <pthread.h>

#ifdef __APPLE__
#include <mach-o/dyld.h> /* _NSGetExecutablePath */

static void get_executable_path() {
uint32_t bufsize = sizeof(executable_path);
_NSGetExecutablePath(executable_path, &bufsize);
}
#endif

#ifdef __linux__
static void get_executable_path() {
if (!executable_path[0]) {
readlink("/proc/self/exe", executable_path, PATHMAX - 1);
}
}
#endif


/* Do platform-specific initialization. */
void platform_init(int argc, char **argv) {
/* Disable stdio output buffering. */
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);
#ifdef get_executable_path
get_executable_path();
#else
strcpy(executable_path, argv[0]);
#endif

signal(SIGPIPE, SIG_IGN);
}

Expand Down
7 changes: 6 additions & 1 deletion deps/v8/src/runtime.cc
Expand Up @@ -6841,7 +6841,12 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_SparseJoinWithSeparator) {
// Find total length of join result.
int string_length = 0;
bool is_ascii = separator->IsAsciiRepresentation();
int max_string_length = SeqAsciiString::kMaxLength;
int max_string_length;
if (is_ascii) {
max_string_length = SeqAsciiString::kMaxLength;
} else {
max_string_length = SeqTwoByteString::kMaxLength;
}
bool overflow = false;
CONVERT_NUMBER_CHECKED(int, elements_length,
Int32, elements_array->length());
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/version.cc
Expand Up @@ -35,7 +35,7 @@
#define MAJOR_VERSION 3
#define MINOR_VERSION 6
#define BUILD_NUMBER 6
#define PATCH_LEVEL 7
#define PATCH_LEVEL 8
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
#define IS_CANDIDATE_VERSION 0
Expand Down
2 changes: 1 addition & 1 deletion doc/api/http.markdown
Expand Up @@ -358,7 +358,7 @@ Note that HTTP requires the `Trailer` header to be sent if you intend to
emit trailers, with a list of the header fields in its value. E.g.,

response.writeHead(200, { 'Content-Type': 'text/plain',
'Trailer': 'TraceInfo' });
'Trailer': 'Content-MD5' });
response.write(fileData);
response.addTrailers({'Content-MD5': "7895bf4b8828b55ceaf47747b4bca667"});
response.end();
Expand Down
4 changes: 2 additions & 2 deletions tools/getnodeversion.py
@@ -1,4 +1,4 @@
import os,re;
import os,re

node_version_h = os.path.join(os.path.dirname(__file__), '..', 'src',
'node_version.h')
Expand All @@ -13,4 +13,4 @@
if re.match('#define NODE_PATCH_VERSION', line):
patch = line.split()[2]

print '{0:s}.{1:s}.{2:s}'.format(major, minor, patch)
print '%(major)s.%(minor)s.%(patch)s'% locals()

0 comments on commit 93dc713

Please sign in to comment.