Skip to content

Commit 4a2cb07

Browse files
committed
Fix whitespace errors introduced by porting efforts
1 parent a6aca21 commit 4a2cb07

7 files changed

Lines changed: 26 additions & 16 deletions

File tree

deps/libeio/eio.c

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,6 +1435,7 @@ eio__scandir (eio_req *req, etp_worker *self)
14351435
}
14361436
}
14371437
}
1438+
14381439
#ifdef PAGESIZE
14391440
# define eio_pagesize() PAGESIZE
14401441

@@ -1444,10 +1445,10 @@ eio__scandir (eio_req *req, etp_worker *self)
14441445
eio_pagesize (void)
14451446
{
14461447
SYSTEM_INFO si;
1447-
GetSystemInfo(&si);
1448-
return si.dwPageSize;
1448+
GetSystemInfo(&si);
1449+
return si.dwPageSize;
14491450
}
1450-
1451+
14511452
#else
14521453
/* POSIX */
14531454
static intptr_t
@@ -1457,7 +1458,7 @@ eio__scandir (eio_req *req, etp_worker *self)
14571458

14581459
if (!page)
14591460
page = sysconf (_SC_PAGESIZE);
1460-
1461+
14611462
return page;
14621463
}
14631464
#endif
@@ -1712,19 +1713,21 @@ static void eio_execute (etp_worker *self, eio_req *req)
17121713
#ifndef _WIN32
17131714
case EIO_LSTAT: ALLOC (sizeof (EIO_STRUCT_STAT));
17141715
req->result = lstat (req->ptr1, (EIO_STRUCT_STAT *)req->ptr2); break;
1715-
#endif
1716+
#endif
17161717
case EIO_FSTAT: ALLOC (sizeof (EIO_STRUCT_STAT));
17171718
req->result = fstat (req->int1, (EIO_STRUCT_STAT *)req->ptr2); break;
1719+
17181720
#ifndef _WIN32
17191721
case EIO_STATVFS: ALLOC (sizeof (EIO_STRUCT_STATVFS));
17201722
req->result = statvfs (req->ptr1, (EIO_STRUCT_STATVFS *)req->ptr2); break;
17211723
case EIO_FSTATVFS: ALLOC (sizeof (EIO_STRUCT_STATVFS));
17221724
req->result = fstatvfs (req->int1, (EIO_STRUCT_STATVFS *)req->ptr2); break;
1725+
17231726
case EIO_CHOWN: req->result = chown (req->ptr1, req->int2, req->int3); break;
17241727
case EIO_FCHOWN: req->result = fchown (req->int1, req->int2, req->int3); break;
1725-
#endif
1728+
#endif
17261729
case EIO_CHMOD: req->result = chmod (req->ptr1, (mode_t)req->int2); break;
1727-
#ifndef _WIN32
1730+
#ifndef _WIN32
17281731
case EIO_FCHMOD: req->result = fchmod (req->int1, (mode_t)req->int2); break;
17291732
case EIO_TRUNCATE: req->result = truncate (req->ptr1, req->offs); break;
17301733
#endif
@@ -1737,11 +1740,11 @@ static void eio_execute (etp_worker *self, eio_req *req)
17371740
case EIO_RMDIR: req->result = rmdir (req->ptr1); break;
17381741
#ifdef _WIN32
17391742
case EIO_MKDIR: req->result = mkdir (req->ptr1); break;
1740-
#else
1743+
#else
17411744
case EIO_MKDIR: req->result = mkdir (req->ptr1, (mode_t)req->int2); break;
17421745
#endif
17431746
case EIO_RENAME: req->result = rename (req->ptr1, req->ptr2); break;
1744-
#ifndef _WIN32
1747+
#ifndef _WIN32
17451748
case EIO_LINK: req->result = link (req->ptr1, req->ptr2); break;
17461749
case EIO_SYMLINK: req->result = symlink (req->ptr1, req->ptr2); break;
17471750
case EIO_MKNOD: req->result = mknod (req->ptr1, (mode_t)req->int2, (dev_t)req->int3); break;

deps/libeio/xthread.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ typedef int ssize_t
3030
#include <winsock2.h>
3131
#include <process.h>
3232
#include <windows.h>
33-
#include "pthread.h"
33+
#include <pthread.h>
3434
#define sigset_t int
3535
#define sigfillset(a)
3636
#define pthread_sigmask(a,b,c)

src/node.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,6 +1257,7 @@ v8::Handle<v8::Value> MemoryUsage(const v8::Arguments& args) {
12571257
return scope.Close(info);
12581258
}
12591259

1260+
12601261
#ifdef __POSIX__
12611262

12621263
Handle<Value> Kill(const Arguments& args) {
@@ -1893,6 +1894,7 @@ static void SignalExit(int signal) {
18931894
_exit(1);
18941895
}
18951896

1897+
18961898
#ifdef __POSIX__
18971899
static int RegisterSignalHandler(int signal, void (*handler)(int)) {
18981900
struct sigaction sa;

src/node_buffer.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
#include <string.h> // memcpy
88

99
#ifdef __MINGW32__
10-
# include <winsock2.h> // htons, htonl
10+
# include <winsock2.h> // htons, htonl
1111
#else // __POSIX__
12-
# include <arpa/inet.h> // htons, htonl
12+
# include <arpa/inet.h> // htons, htonl
1313
#endif
1414

1515
#include <node.h>

src/node_net.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ static Handle<Value> Pipe(const Arguments& args) {
146146
return scope.Close(a);
147147
}
148148

149+
149150
// Creates nonblocking socket pair
150151
static Handle<Value> SocketPair(const Arguments& args) {
151152
HandleScope scope;
@@ -416,6 +417,7 @@ static Handle<Value> Shutdown(const Arguments& args) {
416417
return Undefined();
417418
}
418419

420+
419421
// Connect with unix
420422
// t.connect(fd, "/tmp/socket")
421423
//
@@ -439,11 +441,13 @@ static Handle<Value> Connect(const Arguments& args) {
439441

440442
#ifdef __POSIX__
441443
int r = connect(fd, addr, addrlen);
444+
442445
if (r < 0 && errno != EINPROGRESS) {
443446
return ThrowException(ErrnoException(errno, "connect"));
444447
}
445448
#else // __MINGW32__
446449
int r = connect(_get_osfhandle(fd), addr, addrlen);
450+
447451
if (r == INVALID_SOCKET) {
448452
int wsaErrno = WSAGetLastError();
449453
if (wsaErrno != WSAEALREADY && wsaErrno != WSAEINPROGRESS) {
@@ -519,6 +523,7 @@ do { \
519523

520524
#endif // __MINGW32__
521525

526+
522527
#ifdef __POSIX__
523528

524529
static Handle<Value> GetSockName(const Arguments& args) {
@@ -723,6 +728,7 @@ static Handle<Value> Read(const Arguments& args) {
723728
return scope.Close(Integer::New(bytes_read));
724729
}
725730

731+
726732
#ifdef __POSIX__
727733

728734
// var info = t.recvfrom(fd, buffer, offset, length, flags);
@@ -1499,7 +1505,6 @@ void InitNet(Handle<Object> target) {
14991505
NODE_SET_METHOD(target, "bind", Bind);
15001506
NODE_SET_METHOD(target, "listen", Listen);
15011507
NODE_SET_METHOD(target, "accept", Accept);
1502-
15031508
#ifdef __POSIX__
15041509
NODE_SET_METHOD(target, "socketError", SocketError);
15051510
NODE_SET_METHOD(target, "toRead", ToRead);

src/platform_win32.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
False()
2121

2222
#define NO_IMPL_MSG(name...) \
23-
fprintf(stderr, "Not implemented: %s\n", #name);
23+
fprintf(stderr, "Not implemented: %s\n", #name);
2424

2525
namespace node {
2626

2727
void winapi_perror(const char* prefix);
2828

2929
}
3030

31-
#endif // NODE_PLATFORM_WIN32_H_
31+
#endif // NODE_PLATFORM_WIN32_H_

wscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def configure(conf):
407407
# Split off debug variant before adding variant specific defines
408408
debug_env = conf.env.copy()
409409
conf.set_env_name('debug', debug_env)
410-
410+
411411
if (sys.platform.startswith("win32")):
412412
# Static pthread - crashes
413413
#conf.env.append_value('LINKFLAGS', '../deps/pthreads-w32/libpthreadGC2.a')

0 commit comments

Comments
 (0)