Skip to content

Commit

Permalink
Expanded comment in binding.gyp
Browse files Browse the repository at this point in the history
  • Loading branch information
murgatroid99 committed Oct 9, 2015
1 parent eb185de commit 15def98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
'target_defaults': {
# Emperically, Node only exports ALPN symbols if its major version is >0.
# 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': [
'TSI_OPENSSL_ALPN_SUPPORT=<!(node -v | grep -oP "(?<=v)(\d+)(?=\.\d+\.\d+)")'
],
Expand Down
4 changes: 4 additions & 0 deletions templates/binding.gyp.template
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
'target_defaults': {
# Emperically, Node only exports ALPN symbols if its major version is >0.
# 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': [
'TSI_OPENSSL_ALPN_SUPPORT=<!(node -v | grep -oP "(?<=v)(\d+)(?=\.\d+\.\d+)")'
],
Expand Down

0 comments on commit 15def98

Please sign in to comment.