Expanded comment in binding.gyp

pull/3760/head
murgatroid99 9 years ago
parent eb185de4cb
commit 15def98e34
  1. 4
      binding.gyp
  2. 4
      templates/binding.gyp.template

@ -44,6 +44,10 @@
'target_defaults': { 'target_defaults': {
# Emperically, Node only exports ALPN symbols if its major version is >0. # Emperically, Node only exports ALPN symbols if its major version is >0.
# io.js always reports versions >0 and always exports ALPN symbols. # io.js always reports versions >0 and always exports ALPN symbols.
# Therefore, Node's major version will be truthy if and only if it
# supports ALPN. The output of "node -v" is v[major].[minor].[patch],
# like "v4.1.1" in a recent version. We use grep to extract just the
# major version. "4", would be the output for the example.
'defines': [ 'defines': [
'TSI_OPENSSL_ALPN_SUPPORT=<!(node -v | grep -oP "(?<=v)(\d+)(?=\.\d+\.\d+)")' 'TSI_OPENSSL_ALPN_SUPPORT=<!(node -v | grep -oP "(?<=v)(\d+)(?=\.\d+\.\d+)")'
], ],

@ -46,6 +46,10 @@
'target_defaults': { 'target_defaults': {
# Emperically, Node only exports ALPN symbols if its major version is >0. # Emperically, Node only exports ALPN symbols if its major version is >0.
# io.js always reports versions >0 and always exports ALPN symbols. # io.js always reports versions >0 and always exports ALPN symbols.
# Therefore, Node's major version will be truthy if and only if it
# supports ALPN. The output of "node -v" is v[major].[minor].[patch],
# like "v4.1.1" in a recent version. We use grep to extract just the
# major version. "4", would be the output for the example.
'defines': [ 'defines': [
'TSI_OPENSSL_ALPN_SUPPORT=<!(node -v | grep -oP "(?<=v)(\d+)(?=\.\d+\.\d+)")' 'TSI_OPENSSL_ALPN_SUPPORT=<!(node -v | grep -oP "(?<=v)(\d+)(?=\.\d+\.\d+)")'
], ],

Loading…
Cancel
Save