isaacs
c77747354c
os: Fix uname() error handling on sunos
The uname function can return any non-negative int to indicate success.
Strange, but that's how it is documented. This also fixes a similar
buffer overflow in the even more unlikely event that info.release is
> 255 characters, similar to how 78c5de5
did for info.sysname.
12 years ago
Ben Noordhuis
d58ee7e5c7
os: unbreak windows build
Windows doesn't have MAXHOSTNAMELEN. Introduced in afbadde
.
12 years ago
Ben Noordhuis
afbaddecd3
os: handle 256 character hostnames
Fix a (rather academic) buffer overflow. MAXHOSTNAMELEN is 256 on most
platforms, which means the buffer wasn't big enough to hold the
trailing nul byte on a system with a maximum length hostname.
12 years ago
Ben Noordhuis
78c5de598b
os: fix unlikely buffer overflow in os.type()
* Fix a buffer overflow that happens iff strlen(info.sysname) > 255.
* Check the return value of uname().
12 years ago
Trevor Norris
f65e14ed1d
src: pass Isolate to all applicable api
Update the api to pass node_isolate to all supported methods.
Much thanks to Ben Noordhuis and his work in 51f6e6a
.
12 years ago
Ben Noordhuis
51f6e6a9b3
src, test: downgrade to v8 3.14 api
12 years ago
Ben Noordhuis
7788a6bf85
src: pass node_isolate to Undefined()
12 years ago
Ben Noordhuis
109f73b2c0
src: pass node_isolate to True() and False()
12 years ago
Ben Noordhuis
6573fc3502
src: pass node_isolate to Integer::New
12 years ago
Tim Bradshaw
50e88d0b66
os: change CPU time from Integer to Number
CPU time values must be Numbers, not Integers, as they can be too large
for Integers on 32 bit platforms.
12 years ago
Bert Belder
03b00dcca9
os: throw when os.networkInterfaces() fails
12 years ago
Nathan Rajlich
5e4e87ade5
os: add os.endianness() function
12 years ago
Ben Noordhuis
eef57dddf4
core: use proper #include directives
13 years ago
Ben Noordhuis
ff4a9d381d
core: use proper #include directives
13 years ago
Igor Zinkovsky
500c8f45f5
Remove platform files, and use uv platform api
13 years ago
Ben Noordhuis
cdcb1118c8
Remove stray NODE_MODULE() semi-colons.
13 years ago
Ryan Dahl
88af0c8635
Remove os.openOSHandle
Unused.
13 years ago
Fedor Indutny
4561d9e07b
Don't check sign of loadavg
Fixes #1838
13 years ago
Fedor Indutny
698455384f
use uv for memory and loadavg functions
13 years ago
Bert Belder
91ecfbcae8
Remove platform_win32_winsock
14 years ago
Ben Noordhuis
2d65f3c59a
Include "platform.h", not <platform.h> - conflicts with system headers
Fixes #1003 .
14 years ago
Ben Noordhuis
a7bdaabf60
Include "platform.h", not <platform.h> - conflicts with system headers
Fixes #1003 .
14 years ago
Ryan Dahl
19e53512b8
os.getNetworkInterfaces()
14 years ago
Ryan Dahl
55048cdf79
Update copyright headers
14 years ago
Bert Belder
61af4207da
Fix dns on windows
14 years ago
Bert Belder
0eb4c2157d
Define winsock error numbers
14 years ago
Bert Belder
c99962e4cd
Misc. cleanups
casts, unused vars, function ordering, /* within comment, etc.
14 years ago
Bert Belder
e0f47be9d0
Clean up the way windows headers are included
Plus make inclusion order a little more consistent in general
14 years ago
Ryan Dahl
9bcfc0745c
Revert "Implement os.isWindows"
This reverts commit 9e31e0837e
.
Use process.platform == 'win32'
14 years ago
Bert Belder
9e31e0837e
Implement os.isWindows
14 years ago
Bert Belder
c3ffbf219c
Fix the OS module for win32
14 years ago
Brian White
8275d7cd34
Fix Cygwin compatibility in the os module
14 years ago
Brian White
d75c338dd6
Add more functionality to the os module
14 years ago
Bert Belder
86518c3b11
Port GetHostName
14 years ago
Brian White
f1762ff815
Add os module and getHostname
14 years ago