51 lines
2.2 KiB
Text
51 lines
2.2 KiB
Text
|
add OpenBSD support
|
||
|
|
||
|
Index: src/c/wrapper.c
|
||
|
--- src/c/wrapper.c.orig
|
||
|
+++ src/c/wrapper.c
|
||
|
@@ -105,7 +105,7 @@
|
||
|
#include <sys/errno.h>
|
||
|
#include <sys/fcntl.h>
|
||
|
#elif defined(AIX) || defined(HPUX) || defined(MACOSX)
|
||
|
- #elif defined(FREEBSD)
|
||
|
+ #elif defined(FREEBSD) || defined(OPENBSD)
|
||
|
#include <sys/param.h>
|
||
|
#include <errno.h>
|
||
|
#else /* LINUX */
|
||
|
@@ -5886,7 +5886,7 @@ int wrapperRunCommonInner() {
|
||
|
tz1 = tzname[0];
|
||
|
tz2 = tzname[1];
|
||
|
#endif
|
||
|
-#ifndef FREEBSD
|
||
|
+#if !defined(FREEBSD) && !defined(OPENBSD)
|
||
|
log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, TEXT("Timezone: %s (%s) Offset: %ld, hasDaylight: %d"),
|
||
|
tz1, tz2, timezone, daylight);
|
||
|
#else
|
||
|
@@ -6561,7 +6561,7 @@ int checkIfBinary(const TCHAR *filename) {
|
||
|
log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, TEXT("Magic number for file %s: 0x%02x%02x%02x%02x"), filename, head[0], head[1], head[2], head[3]);
|
||
|
}
|
||
|
|
||
|
-#if defined(LINUX) || defined(FREEBSD) || defined(SOLARIS)
|
||
|
+#if defined(LINUX) || defined(FREEBSD) || defined(SOLARIS) || defined(OPENBSD)
|
||
|
if (head[1] == 'E' && head[2] == 'L' && head[3] == 'F') {
|
||
|
return 1; /*ELF */
|
||
|
#elif defined(AIX)
|
||
|
@@ -8282,7 +8282,7 @@ int wrapperBuildJavaCommandArrayInner(TCHAR **strings,
|
||
|
|
||
|
/* See if the auto bits parameter is set. Ignored by all but the following platforms. */
|
||
|
|
||
|
-#if /*defined(WIN32) || defined(LINUX) ||*/ defined(HPUX) || defined(MACOSX) || defined(SOLARIS) || defined(FREEBSD)
|
||
|
+#if /*defined(WIN32) || defined(LINUX) ||*/ defined(HPUX) || defined(MACOSX) || defined(SOLARIS) || defined(FREEBSD) || defined(OPENBSD)
|
||
|
|
||
|
if (wrapperData->javaVersion->major < 9) {
|
||
|
if (getBooleanProperty(properties,
|
||
|
@@ -8297,6 +8297,8 @@ int wrapperBuildJavaCommandArrayInner(TCHAR **strings,
|
||
|
TEXT("wrapper.java.additional.auto_bits.solaris"),
|
||
|
#elif defined(FREEBSD)
|
||
|
TEXT("wrapper.java.additional.auto_bits.freebsd"),
|
||
|
+#elif defined(OPENBSD)
|
||
|
+ TEXT("wrapper.java.additional.auto_bits.openbsd"),
|
||
|
#elif defined(MACOSX)
|
||
|
TEXT("wrapper.java.additional.auto_bits.macosx"),
|
||
|
#endif
|