Search code examples
node.jsv8event-looplibuv

NODE_SHARED_MODE and __POSIX__


What is the role of NODE_SHARED_MODE and POSIX macros in node.js source code ? In which file they are defined?

These are present in node_main.cc in nodejs src directory


Solution

  • You can use GitHub's search feature (or grep in a local checkout) to search through Node.js's source code:

    https://github.com/nodejs/node/search?q=NODE_SHARED_MODE

    https://github.com/nodejs/node/search?q=POSIX

    And you will find that both symbols are defined in node.gypi. From reading the surrounding code in that file, you can also deduce the conditions under which they are defined.