patch-src_c_wrapper_c 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. $OpenBSD: patch-src_c_wrapper_c,v 1.1.1.1 2013/07/10 14:40:29 jasper Exp $
  2. --- src/c/wrapper.c.orig Tue Jul 2 14:18:26 2013
  3. +++ src/c/wrapper.c Tue Jul 2 14:21:35 2013
  4. @@ -98,7 +98,7 @@
  5. #elif defined(AIX) || defined(HPUX) || defined(MACOSX) || defined(OSF1)
  6. #elif defined(IRIX)
  7. #define PATH_MAX FILENAME_MAX
  8. - #elif defined(FREEBSD)
  9. + #elif defined(FREEBSD) || defined(OPENBSD)
  10. #include <sys/param.h>
  11. #include <errno.h>
  12. #else /* LINUX */
  13. @@ -3978,7 +3978,7 @@ int wrapperRunCommonInner() {
  14. tz1 = tzname[0];
  15. tz2 = tzname[1];
  16. #endif
  17. -#ifndef FREEBSD
  18. +#if !defined(FREEBSD) && !defined(OPENBSD)
  19. log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, TEXT("Timezone: %s (%s) Offset: %ld, hasDaylight: %d"),
  20. tz1, tz2, timezone, daylight);
  21. #else
  22. @@ -4555,7 +4555,7 @@ int checkIfBinary(const TCHAR *filename) {
  23. 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]);
  24. }
  25. -#if defined(LINUX) || defined(FREEBSD) || defined(SOLARIS)
  26. +#if defined(LINUX) || defined(FREEBSD) || defined(SOLARIS) || defined(OPENBSD)
  27. if (head[1] == 'E' && head[2] == 'L' && head[3] == 'F') {
  28. return 1; /*ELF */
  29. #elif defined(AIX)
  30. @@ -5834,7 +5834,7 @@ int wrapperBuildJavaCommandArrayInner(TCHAR **strings,
  31. /* See if the auto bits parameter is set. Ignored by all but the following platforms. */
  32. -#if /*defined(WIN32) || defined(LINUX) ||*/ defined(HPUX) || defined(MACOSX) || defined(SOLARIS) || defined(FREEBSD)
  33. +#if /*defined(WIN32) || defined(LINUX) ||*/ defined(HPUX) || defined(MACOSX) || defined(SOLARIS) || defined(FREEBSD) || defined(OPENBSD)
  34. if (getBooleanProperty(properties,
  35. @@ -5851,6 +5851,8 @@ int wrapperBuildJavaCommandArrayInner(TCHAR **strings,
  36. TEXT("wrapper.java.additional.auto_bits.freebsd"),
  37. #elif defined(MACOSX)
  38. TEXT("wrapper.java.additional.auto_bits.macosx"),
  39. +#elif defined(OPENBSD)
  40. + TEXT("wrapper.java.additional.auto_bits.openbsd"),
  41. #endif
  42. getBooleanProperty(properties, TEXT("wrapper.java.additional.auto_bits"), FALSE, showWarnings),
  43. showWarnings)) {