Skip to content

Commit 3e06d57

Browse files
author
Oleh Kulykov
committed
1722331758
1 parent f965668 commit 3e06d57

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

.github/workflows/nodejs-multi-platform.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-latest
11+
runs-on: ${{ matrix.os }}
1212

1313
strategy:
1414
matrix:
15+
os: [macos-latest, ubuntu-latest, windows-latest]
1516
node-version: ['13.x', '16.x', '20.x'] # min, dev, latest
1617

1718
steps:

binding.gyp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
'LIBPLZMA_VERSION_BUILD=858',
77
'LIBPLZMA_SHARED=1',
88
'LIBPLZMA_NO_C_BINDINGS=1',
9-
'LIBPLZMA_HAVE_STD=1'
9+
'LIBPLZMA_HAVE_STD=1',
10+
'LIBPLZMA_NO_CPP_RTTI=1'
1011
],
1112
'sources': [
1213
'node/module.cpp',

src/plzma.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@
3636
#include <time.h>
3737

3838
#if defined(LIBPLZMA_MSC)
39-
#include <malloc.h>
39+
# include <malloc.h>
4040
#endif
4141

4242
#if defined(BUILDING_NODE_EXTENSION)
43-
#include <node.h>
44-
#include <uv.h>
43+
# include <node.h>
44+
# include <uv.h>
4545
#endif
4646

4747
#ifndef RAND_MAX
48-
#define RAND_MAX 0x7fffffff
48+
# define RAND_MAX 0x7fffffff
4949
#endif
5050

5151
#if __has_feature(cxx_rtti)
@@ -65,7 +65,9 @@
6565
# define RTTI_ENABLED 1
6666
#endif
6767

68-
#if defined(RTTI_ENABLED) && defined(LIBPLZMA_NO_CPP_RTTI)
68+
#if !defined(RTTI_ENABLED) && !defined(LIBPLZMA_NO_CPP_RTTI)
69+
# define LIBPLZMA_NO_CPP_RTTI 1
70+
#elif defined(RTTI_ENABLED) && defined(LIBPLZMA_NO_CPP_RTTI)
6971
# error "CMake rtti configuration error."
7072
#endif
7173

0 commit comments

Comments
 (0)