Browse Source

Fix whitespace errors introduced by porting efforts

v0.7.4-release
Bert Belder 14 years ago
parent
commit
4a2cb07808
  1. 3
      deps/libeio/eio.c
  2. 2
      deps/libeio/xthread.h
  3. 2
      src/node.cc
  4. 7
      src/node_net.cc

3
deps/libeio/eio.c

@ -1435,6 +1435,7 @@ eio__scandir (eio_req *req, etp_worker *self)
}
}
}
#ifdef PAGESIZE
# define eio_pagesize() PAGESIZE
@ -1715,11 +1716,13 @@ static void eio_execute (etp_worker *self, eio_req *req)
#endif
case EIO_FSTAT: ALLOC (sizeof (EIO_STRUCT_STAT));
req->result = fstat (req->int1, (EIO_STRUCT_STAT *)req->ptr2); break;
#ifndef _WIN32
case EIO_STATVFS: ALLOC (sizeof (EIO_STRUCT_STATVFS));
req->result = statvfs (req->ptr1, (EIO_STRUCT_STATVFS *)req->ptr2); break;
case EIO_FSTATVFS: ALLOC (sizeof (EIO_STRUCT_STATVFS));
req->result = fstatvfs (req->int1, (EIO_STRUCT_STATVFS *)req->ptr2); break;
case EIO_CHOWN: req->result = chown (req->ptr1, req->int2, req->int3); break;
case EIO_FCHOWN: req->result = fchown (req->int1, req->int2, req->int3); break;
#endif

2
deps/libeio/xthread.h

@ -30,7 +30,7 @@ typedef int ssize_t
#include <winsock2.h>
#include <process.h>
#include <windows.h>
#include "pthread.h"
#include <pthread.h>
#define sigset_t int
#define sigfillset(a)
#define pthread_sigmask(a,b,c)

2
src/node.cc

@ -1257,6 +1257,7 @@ v8::Handle<v8::Value> MemoryUsage(const v8::Arguments& args) {
return scope.Close(info);
}
#ifdef __POSIX__
Handle<Value> Kill(const Arguments& args) {
@ -1893,6 +1894,7 @@ static void SignalExit(int signal) {
_exit(1);
}
#ifdef __POSIX__
static int RegisterSignalHandler(int signal, void (*handler)(int)) {
struct sigaction sa;

7
src/node_net.cc

@ -146,6 +146,7 @@ static Handle<Value> Pipe(const Arguments& args) {
return scope.Close(a);
}
// Creates nonblocking socket pair
static Handle<Value> SocketPair(const Arguments& args) {
HandleScope scope;
@ -416,6 +417,7 @@ static Handle<Value> Shutdown(const Arguments& args) {
return Undefined();
}
// Connect with unix
// t.connect(fd, "/tmp/socket")
//
@ -439,11 +441,13 @@ static Handle<Value> Connect(const Arguments& args) {
#ifdef __POSIX__
int r = connect(fd, addr, addrlen);
if (r < 0 && errno != EINPROGRESS) {
return ThrowException(ErrnoException(errno, "connect"));
}
#else // __MINGW32__
int r = connect(_get_osfhandle(fd), addr, addrlen);
if (r == INVALID_SOCKET) {
int wsaErrno = WSAGetLastError();
if (wsaErrno != WSAEALREADY && wsaErrno != WSAEINPROGRESS) {
@ -519,6 +523,7 @@ do { \
#endif // __MINGW32__
#ifdef __POSIX__
static Handle<Value> GetSockName(const Arguments& args) {
@ -723,6 +728,7 @@ static Handle<Value> Read(const Arguments& args) {
return scope.Close(Integer::New(bytes_read));
}
#ifdef __POSIX__
// var info = t.recvfrom(fd, buffer, offset, length, flags);
@ -1499,7 +1505,6 @@ void InitNet(Handle<Object> target) {
NODE_SET_METHOD(target, "bind", Bind);
NODE_SET_METHOD(target, "listen", Listen);
NODE_SET_METHOD(target, "accept", Accept);
#ifdef __POSIX__
NODE_SET_METHOD(target, "socketError", SocketError);
NODE_SET_METHOD(target, "toRead", ToRead);

Loading…
Cancel
Save