build: add NetBSD support to opensslconf.h · nodejs/node@6a7e46e

Original file line numberDiff line numberDiff line change

@@ -37,6 +37,8 @@

3737

| solaris | x64 | solaris64-x86_64-gcc | o |

3838

| freebsd | ia32 | BSD-x86 | o |

3939

| freebsd | x64 | BSD-x86_64 | o |

40+

| netbsd | ia32 | BSD-x86 | o |

41+

| netbsd | x64 | BSD-x86_64 | o |

4042

| openbsd | ia32 | BSD-x86 | - |

4143

| openbsd | x64 | BSD-x86_64 | - |

4244

| others | others | linux-elf | - |

@@ -51,6 +53,7 @@

5153

| mac | __APPLE__ && __MACH__ |

5254

| solaris | __sun |

5355

| freebsd | __FreeBSD__ |

56+

| netbsd | __NetBSD__ |

5457

| openbsd | __OpenBSD__ |

5558

| linux (not andorid)| __linux__ && !__ANDROID__ |

5659

| android | __ANDROID__ |

@@ -94,6 +97,11 @@

9497

# define OPENSSL_LINUX 1

9598

#endif

9699
100+

#undef OPENSSL_BSD

101+

#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)

102+

# define OPENSSL_BSD 1

103+

#endif

104+
97105

#if defined(OPENSSL_LINUX) && defined(__i386__)

98106

# include "./archs/linux-elf/opensslconf.h"

99107

#elif defined(OPENSSL_LINUX) && defined(__ILP32__)

@@ -112,9 +120,9 @@

112120

# include "./archs/VC-WIN32/opensslconf.h"

113121

#elif defined(_WIN32) && defined(_M_X64)

114122

# include "./archs/VC-WIN64A/opensslconf.h"

115-

#elif (defined(__FreeBSD__) || defined(__OpenBSD__)) && defined(__i386__)

123+

#elif defined(OPENSSL_BSD) && defined(__i386__)

116124

# include "./archs/BSD-x86/opensslconf.h"

117-

#elif (defined(__FreeBSD__) || defined(__OpenBSD__)) && defined(__x86_64__)

125+

#elif defined(OPENSSL_BSD) && defined(__x86_64__)

118126

# include "./archs/BSD-x86_64/opensslconf.h"

119127

#elif defined(__sun) && defined(__i386__)

120128

# include "./archs/solaris-x86-gcc/opensslconf.h"