summaryrefslogtreecommitdiff
path: root/src/node_os.cc
Commit message (Collapse)AuthorAgeFilesLines
* src: update to v8 3.24 APIsFedor Indutny2014-03-131-11/+12
|
* src: remove `node_isolate` from sourceFedor Indutny2014-02-221-48/+56
| | | | fix #6899
* os: networkInterfaces include scopeid for ipv6Xidorn Quan2014-02-181-0/+7
|
* node: register modules from DSO constructorsKeith M Wesolowski2014-01-271-1/+1
| | | | | | | Built-in modules should be automatically registered, replacing the static module list. Add-on modules should also be automatically registered via DSO constructors. This improves flexibility in adding built-in modules and is also a prerequisite to pure-C addon modules.
* Merge remote-tracking branch 'upstream/v0.10'Timothy J Fontaine2014-01-131-3/+6
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: deps/uv/ChangeLog deps/uv/build.mk deps/uv/src/version.c deps/uv/test/test-ipc.c deps/v8/src/objects.cc src/node.cc src/node_os.cc
| * src: return empty set on ENOSYS for interfacesTimothy J Fontaine2014-01-121-2/+5
| | | | | | | | | | | | | | If node was compiled with --no-ifaddrs to support older operating systems, don't throw instead simply return an empty object Fixes #6846
* | cpplint: disallow if one-linersFedor Indutny2013-10-171-5/+10
| |
* | src: add multi-context supportBen Noordhuis2013-09-061-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes it possible to use multiple V8 execution contexts within a single event loop. Put another way, handle and request wrap objects now "remember" the context they belong to and switch back to that context when the time comes to call into JS land. This could have been done in a quick and hacky way by calling v8::Object::GetCreationContext() on the wrap object right before making a callback but that leaves a fairly wide margin for bugs. Instead, we make the context explicit through a new Environment class that encapsulates everything (or almost everything) that belongs to the context. Variables that used to be a static or a global are now members of the aforementioned class. An additional benefit is that this approach should make it relatively straightforward to add full isolate support in due course. There is no JavaScript API yet but that will be added in the near future. This work was graciously sponsored by GitHub, Inc.
* | src: remove pointless node_os.h header fileBen Noordhuis2013-08-261-5/+5
| | | | | | | | src/node_os.cc doesn't export anything that's used elsewhere. Remove it.
* | src: use v8::String::NewFrom*() functionsBen Noordhuis2013-08-091-21/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change calls to String::New() and String::NewSymbol() to their respective one-byte, two-byte and UTF-8 counterparts. * Add a FIXED_ONE_BYTE_STRING macro that takes a string literal and turns it into a v8::Local<v8::String>. * Add helper functions that make v8::String::NewFromOneByte() easier to work with. Said function expects a `const uint8_t*` but almost every call site deals with `const char*` or `const unsigned char*`. Helps us avoid doing reinterpret_casts all over the place. * Code that handles file system paths keeps using UTF-8 for backwards compatibility reasons. At least now the use of UTF-8 is explicit. * Remove v8::String::NewSymbol() entirely. Almost all call sites were effectively minor de-optimizations. If you create a string only once, there is no point in making it a symbol. If you are create the same string repeatedly, it should probably be cached in a persistent handle.
* | os: add mac address to networkInterfaces() outputBrian White2013-08-011-0/+12
| |
* | src: lint c++ codeFedor Indutny2013-07-311-12/+16
| |
* | src: remove unused import in src/node_os.ccBen Noordhuis2013-07-301-1/+0
| |
* | Merge remote-tracking branch 'origin/v0.10'Ben Noordhuis2013-07-301-9/+11
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | Conflicts: AUTHORS ChangeLog deps/uv/ChangeLog deps/uv/src/version.c deps/uv/src/win/fs.c src/node.cc src/node_crypto.cc src/node_os.cc src/node_version.h
| * src: os: use Number::New() for CPU infoBen Noordhuis2013-07-231-14/+11
| | | | | | | | | | | | | | The return values from uv_cpu_info() don't necessarily fit in a 32 bits signed integer. Fixes #5732.
* | src, lib: update after internal api changeBen Noordhuis2013-07-201-8/+7
| | | | | | | | | | | | | | | | Libuv now returns errors directly. Make everything in src/ and lib/ follow suit. The changes to lib/ are not strictly necessary but they remove the need for the abominations that are process._errno and node::SetErrno().
* | lib, src: upgrade after v8 api changeBen Noordhuis2013-07-061-60/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a big commit that touches just about every file in the src/ directory. The V8 API has changed in significant ways. The most important changes are: * Binding functions take a const v8::FunctionCallbackInfo<T>& argument rather than a const v8::Arguments& argument. * Binding functions return void rather than v8::Handle<v8::Value>. The return value is returned with the args.GetReturnValue().Set() family of functions. * v8::Persistent<T> no longer derives from v8::Handle<T> and no longer allows you to directly dereference the object that the persistent handle points to. This means that the common pattern of caching oft-used JS values in a persistent handle no longer quite works, you first need to reconstruct a v8::Local<T> from the persistent handle with the Local<T>::New(isolate, persistent) factory method. A handful of (internal) convenience classes and functions have been added to make dealing with the new API a little easier. The most visible one is node::Cached<T>, which wraps a v8::Persistent<T> with some template sugar. It can hold arbitrary types but so far it's exclusively used for v8::Strings (which was by far the most commonly cached handle type.)
* | os: use IsBigEndian() in GetEndianness() functionBen Noordhuis2013-05-301-4/+1
| |
* | os: Include netmask in os.networkInterfaces()Ben Kelly2013-05-081-0/+4
| | | | | | | | | | re #3765 and #5432 fixes #4743
* | Merge remote-tracking branch 'origin/v0.10'Ben Noordhuis2013-04-291-8/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | Conflicts: AUTHORS ChangeLog deps/uv/ChangeLog deps/uv/src/version.c lib/http.js src/node_crypto.cc src/node_os.cc src/node_version.h test/simple/helper-debugger-repl.js
| * os: Fix uname() error handling on sunosisaacs2013-04-221-8/+7
| | | | | | | | | | | | | | | | 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.
* | Merge remote-tracking branch 'origin/v0.10'Ben Noordhuis2013-04-181-12/+16
|\ \ | |/ | | | | | | Conflicts: src/node_os.cc
| * os: unbreak windows buildBen Noordhuis2013-04-151-0/+6
| | | | | | | | Windows doesn't have MAXHOSTNAMELEN. Introduced in afbadde.
| * os: handle 256 character hostnamesBen Noordhuis2013-04-151-5/+6
| | | | | | | | | | | | 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.
| * os: fix unlikely buffer overflow in os.type()Ben Noordhuis2013-04-151-7/+4
| | | | | | | | | | * Fix a buffer overflow that happens iff strlen(info.sysname) > 255. * Check the return value of uname().
* | src: pass Isolate to all applicable apiTrevor Norris2013-03-201-23/+23
|/ | | | | | Update the api to pass node_isolate to all supported methods. Much thanks to Ben Noordhuis and his work in 51f6e6a.
* src, test: downgrade to v8 3.14 apiBen Noordhuis2013-02-251-12/+12
|
* src: pass node_isolate to Undefined()Ben Noordhuis2013-01-071-5/+5
|
* src: pass node_isolate to True() and False()Ben Noordhuis2013-01-071-2/+4
|
* src: pass node_isolate to Integer::NewBen Noordhuis2013-01-071-6/+7
|
* os: throw when os.networkInterfaces() failsBert Belder2012-12-031-4/+3
|
* os: add os.endianness() functionNathan Rajlich2012-11-081-0/+9
|
* core: use proper #include directivesBen Noordhuis2012-03-101-3/+3
|
* Remove platform files, and use uv platform apiIgor Zinkovsky2011-12-151-9/+81
|
* Remove stray NODE_MODULE() semi-colons.Ben Noordhuis2011-11-091-1/+1
|
* Remove os.openOSHandleRyan Dahl2011-10-191-18/+0
| | | | Unused.
* Don't check sign of loadavgFedor Indutny2011-10-071-4/+0
| | | | Fixes #1838
* use uv for memory and loadavg functionsFedor Indutny2011-10-071-5/+10
|
* Remove platform_win32_winsockBert Belder2011-08-021-1/+0
|
* Include "platform.h", not <platform.h> - conflicts with system headersBen Noordhuis2011-07-261-1/+1
| | | | Fixes #1003.
* os.getNetworkInterfaces()Ryan Dahl2011-03-161-0/+7
|
* Update copyright headersRyan Dahl2011-03-141-0/+21
|
* Fix dns on windowsBert Belder2011-02-071-0/+20
|
* Define winsock error numbersBert Belder2011-01-181-3/+4
|
* Misc. cleanupsBert Belder2011-01-181-1/+2
| | | | casts, unused vars, function ordering, /* within comment, etc.
* Clean up the way windows headers are includedBert Belder2011-01-181-7/+9
| | | | Plus make inclusion order a little more consistent in general
* Revert "Implement os.isWindows"Ryan Dahl2011-01-131-6/+0
| | | | | | This reverts commit 9e31e0837ec3c5a88ed477bec3980dd4608046be. Use process.platform == 'win32'
* Implement os.isWindowsBert Belder2011-01-041-0/+6
|
* Fix the OS module for win32Bert Belder2011-01-021-1/+20
|
* Merge remote branch 'origin/master'Bert Belder2011-01-021-2/+94
|\ | | | | | | | | | | Conflicts: src/node_net.cc src/node_os.cc