We've grown dladdr(3), adapt. From: Kurt Miller <truk@optonline.net>

This commit is contained in:
naddy 2004-08-14 21:50:38 +00:00
parent e51fff2577
commit b70c06e601
7 changed files with 86 additions and 11 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.5 2004/06/02 15:23:20 sturm Exp $
# $OpenBSD: Makefile,v 1.6 2004/08/14 21:50:38 naddy Exp $
# $FreeBSD: ports/java/jdk12/Makefile,v 1.11 2002/08/19 20:47:04 glewis Exp $
# Requires existing JDK 1.3 to build
@ -116,7 +116,7 @@ pre-patch:
@cp -f ${FILESDIR}/cacerts ${CACERTSDIR}
@cd ${WRKDIR} && \
${CHMOD} -R u+w * && \
${PATCH} -p0 < ${WRKDIR}/jdk131.patches
${PATCH} -p0 -z .orig.bsd < ${WRKDIR}/jdk131.patches
.if !${FLAVOR:L:Mnative_bootstrap}
pre-build:

View File

@ -1,7 +1,19 @@
$OpenBSD: patch-j2sdk1_3_1_ext_plugin_oji-plugin_src_motif_common_utils_c,v 1.1.1.1 2004/01/29 22:02:20 pvalchev Exp $
--- j2sdk1.3.1/ext/plugin/oji-plugin/src/motif/common/utils.c.orig 2004-01-08 17:18:45.000000000 -0500
+++ j2sdk1.3.1/ext/plugin/oji-plugin/src/motif/common/utils.c 2004-01-08 17:01:30.000000000 -0500
@@ -23,6 +23,11 @@
$OpenBSD: patch-j2sdk1_3_1_ext_plugin_oji-plugin_src_motif_common_utils_c,v 1.2 2004/08/14 21:50:38 naddy Exp $
--- j2sdk1.3.1/ext/plugin/oji-plugin/src/motif/common/utils.c.orig Wed Jul 14 21:56:30 2004
+++ j2sdk1.3.1/ext/plugin/oji-plugin/src/motif/common/utils.c Wed Jul 14 22:50:55 2004
@@ -2,7 +2,6 @@
#include <stdio.h>
#include <stdarg.h>
#include "Debug.h"
-#include "utils.h"
#include <unistd.h>
#ifdef SVR4
#include <stropts.h>
@@ -20,9 +19,15 @@
#include <strings.h>
#include <string.h>
#include <dlfcn.h>
+#include "utils.h"
#include "plugin_defs.h"
#include "pluginversion.h"
@ -17,7 +29,7 @@ $OpenBSD: patch-j2sdk1_3_1_ext_plugin_oji-plugin_src_motif_common_utils_c,v 1.1.
#endif
#endif
+#if defined(__OpenBSD__)
+#if defined(__OpenBSD__) && !defined(RTLD_DEFAULT)
+char *
+dlfname(const void *addr)
+{

View File

@ -1,11 +1,11 @@
$OpenBSD: patch-j2sdk1_3_1_ext_plugin_oji-plugin_src_motif_common_utils_h,v 1.1.1.1 2004/01/29 22:02:20 pvalchev Exp $
--- j2sdk1.3.1/ext/plugin/oji-plugin/src/motif/common/utils.h.orig 2004-01-08 22:40:44.000000000 -0500
+++ j2sdk1.3.1/ext/plugin/oji-plugin/src/motif/common/utils.h 2004-01-08 22:48:49.000000000 -0500
$OpenBSD: patch-j2sdk1_3_1_ext_plugin_oji-plugin_src_motif_common_utils_h,v 1.2 2004/08/14 21:50:38 naddy Exp $
--- j2sdk1.3.1/ext/plugin/oji-plugin/src/motif/common/utils.h.orig Sun May 6 09:15:31 2001
+++ j2sdk1.3.1/ext/plugin/oji-plugin/src/motif/common/utils.h Wed Jul 14 22:41:48 2004
@@ -61,6 +61,14 @@ extern "C" {
void plugin_raw_formal_error(const char *msg);
/* Wrapper that does a dlsym with error checking */
void *load_function(void* library_handle, const char* function_name);
+#ifdef __OpenBSD__
+#if defined(__OpenBSD__) && !defined(RTLD_DEFAULT)
+ typedef struct {
+ const char *dli_fname;
+ char *_padding[3];

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-j2sdk1_3_1_src_bsd_include_bsdmisc_h,v 1.1 2004/08/14 21:50:38 naddy Exp $
--- j2sdk1.3.1/src/bsd/include/bsdmisc.h.orig 2004-06-03 16:47:33.000000000 -0400
+++ j2sdk1.3.1/src/bsd/include/bsdmisc.h 2004-06-03 16:48:36.000000000 -0400
@@ -37,7 +37,7 @@ char *bsd_c_sym(const char *);
#define BSD_SHLIB_EXT ".so"
#endif
-#ifdef __OpenBSD__
+#if defined(__OpenBSD__) && defined(_DLFCN_H_) && !defined(RTLD_DEFAULT)
typedef struct {
const char *dli_fname;
char *_padding[3];

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-j2sdk1_3_1_src_solaris_hpi_green_threads_src_signals_c,v 1.1 2004/08/14 21:50:38 naddy Exp $
--- j2sdk1.3.1/src/solaris/hpi/green_threads/src/signals.c.orig Thu Jul 15 10:40:42 2004
+++ j2sdk1.3.1/src/solaris/hpi/green_threads/src/signals.c Thu Jul 15 10:41:21 2004
@@ -29,7 +29,6 @@
#include "schedule.h"
#include "signals.h"
#include "iomgr.h" /* For io lock */
-#include "bsdmisc.h"
/*
* Local variables.
@@ -578,6 +577,7 @@ restart:
#ifdef CATCH_SIGMASK_CHANGES
#include <dlfcn.h>
+#include "bsdmisc.h"
/*
* The following functions, interposed in front of sigprocmask and

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-j2sdk1_3_1_src_solaris_hpi_src_linker_md_c,v 1.1 2004/08/14 21:50:38 naddy Exp $
--- j2sdk1.3.1/src/solaris/hpi/src/linker_md.c.orig 2004-06-03 17:02:49.000000000 -0400
+++ j2sdk1.3.1/src/solaris/hpi/src/linker_md.c 2004-06-03 18:32:07.000000000 -0400
@@ -99,7 +99,7 @@ static void dl_unlock()
#endif
-#if defined(__OpenBSD__)
+#if defined(__OpenBSD__) && !defined(RTLD_DEFAULT)
char *
dlfname(const void *addr)
{

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-j2sdk1_3_1_src_solaris_native_sun_awt_awt_Graphics_c,v 1.1 2004/08/14 21:50:38 naddy Exp $
--- j2sdk1.3.1/src/solaris/native/sun/awt/awt_Graphics.c.orig Thu Jul 15 10:44:47 2004
+++ j2sdk1.3.1/src/solaris/native/sun/awt/awt_Graphics.c Thu Jul 15 10:45:01 2004
@@ -45,8 +45,6 @@
#include "multi_font.h"
-#include "bsdmisc.h"
-
#include <jni.h>
#include <jni_util.h>
#include <jlong.h>
@@ -54,6 +52,7 @@
#include <jdga.h>
#include <dlfcn.h>
+#include "bsdmisc.h"
#ifdef MITSHM