Skip to content

Commit

Permalink
Upgrade libuv to 7108ca88
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Jul 29, 2011
1 parent de0b8d6 commit 9dd9792
Show file tree
Hide file tree
Showing 9 changed files with 260 additions and 45 deletions.
2 changes: 1 addition & 1 deletion deps/uv/config-unix.mk
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ src/ev/ev.o: src/ev/ev.c

EIO_CPPFLAGS += $(CPPFLAGS)
EIO_CPPFLAGS += -DEIO_CONFIG_H=\"$(EIO_CONFIG)\"
EIO_CPPFLAGS += -DEIO_STACKSIZE=65536
EIO_CPPFLAGS += -DEIO_STACKSIZE=262144
EIO_CPPFLAGS += -D_GNU_SOURCE

src/eio/eio.o: src/eio/eio.c
Expand Down
1 change: 1 addition & 0 deletions deps/uv/include/uv-unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ typedef struct {
#define UV_PIPE_PRIVATE_FIELDS \
UV_TCP_PRIVATE_FIELDS \
const char* pipe_fname; /* strdup'ed */ \
void* pipe_flock;


/* UV_PREPARE */ \
Expand Down
5 changes: 2 additions & 3 deletions deps/uv/include/uv.h
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,8 @@ typedef struct uv_process_options_s {
char** env;
char* cwd;
/*
* The user should supply pointers to uninitialized uv_pipe_t structs for
* stdio. They will be initialized by uv_spawn. The user is reponsible for
* calling uv_close on them.
* The user should supply pointers to initialized uv_pipe_t structs for
* stdio. The user is reponsible for calling uv_close on them.
*/
uv_pipe_t* stdin_stream;
uv_pipe_t* stdout_stream;
Expand Down
6 changes: 5 additions & 1 deletion deps/uv/src/eio/eio.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include "eio.h"

#ifdef EIO_STACKSIZE
# define XTHREAD_STACKSIZE EIO_STACKSIZE
# define X_STACKSIZE EIO_STACKSIZE
#endif

// For statically-linked pthreads-w32, use:
Expand Down Expand Up @@ -1270,6 +1270,10 @@ eio__scandir (eio_req *req, etp_worker *self)
X_LOCK (wrklock);
/* the corresponding closedir is in ETP_WORKER_CLEAR */
self->dirp = dirp = opendir (req->ptr1);

if (req->flags & EIO_FLAG_PTR1_FREE)
free (req->ptr1);

req->flags |= EIO_FLAG_PTR1_FREE | EIO_FLAG_PTR2_FREE;
req->ptr1 = dents = flags ? malloc (dentalloc * sizeof (eio_dirent)) : 0;
req->ptr2 = names = malloc (namesalloc);
Expand Down
Loading

0 comments on commit 9dd9792

Please sign in to comment.