Also on other platforms use -pthread for compiling commands not just
linking because I noticed in the gcc(1) man page
-pthread
Adds support for multithreading with the pthreads library. This
option sets flags for both the preprocessor and linker.
Removing the errno check in deps/coupling because it was a hack
(e165859c2e) added to fix stdio problems.
Without adding -threads, errno is not thread local, and coupling was not
correctly checking the errno. It appears -mt does nothing to gcc/solaris.
Instead of installing the files in /usr/lib/node/libraries and loading them
from the file system, the files are built-in to the node executable.
However, they are only compiled on demand.
The reasoning is:
1. Allow for more complex internal javascript. In particular,
process.stdout and process.stdin can be js implemented streams.
2. Ease system installs. Loading from disk each time is unnecessary
overhead. Note that there is no "system" path for modules anymore. Only
$HOME/.node_libraries.
Why? Because I have two versions of GnuTLS installed - one is old 2.0.X in
/usr and one is new 2.5.X in ~/local/gnutls. waf correctly finds that the
newer version, but because GNUTLS was behind other libraries in the
node.uselib -L/usr/lib was before -L/home/ryan/local/gnutls/lib in the
actual gcc command - hence getting link errors. WAF SUCKS, really.
I wish someone would invent a good build system that could avoid such
problems.