summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure9
-rw-r--r--configure.in7
-rw-r--r--include/SDL_config.h.cmake1
-rw-r--r--include/SDL_config.h.in1
-rw-r--r--src/dynapi/SDL_dynapi.c16
-rw-r--r--src/loadso/haiku/SDL_sysloadso.c71
6 files changed, 3 insertions, 102 deletions
diff --git a/configure b/configure
index 5070f6e6a2..b018dff9f8 100755
--- a/configure
+++ b/configure
@@ -23490,6 +23490,7 @@ fi
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
+ CheckDLOPEN
CheckHaikuVideo
CheckHaikuGL
CheckPTHREAD
@@ -23518,14 +23519,6 @@ $as_echo "#define SDL_TIMER_HAIKU 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/timer/haiku/*.c"
have_timers=yes
fi
- # Set up files for the shared object loading library
- if test x$enable_loadso = xyes; then
-
-$as_echo "#define SDL_LOADSO_HAIKU 1" >>confdefs.h
-
- SOURCES="$SOURCES $srcdir/src/loadso/haiku/*.c"
- have_loadso=yes
- fi
# Set up files for the system power library
if test x$enable_power = xyes; then
diff --git a/configure.in b/configure.in
index 37c57e2888..7fc95a3ac7 100644
--- a/configure.in
+++ b/configure.in
@@ -3229,6 +3229,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
+ CheckDLOPEN
CheckHaikuVideo
CheckHaikuGL
CheckPTHREAD
@@ -3251,12 +3252,6 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
SOURCES="$SOURCES $srcdir/src/timer/haiku/*.c"
have_timers=yes
fi
- # Set up files for the shared object loading library
- if test x$enable_loadso = xyes; then
- AC_DEFINE(SDL_LOADSO_HAIKU, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/loadso/haiku/*.c"
- have_loadso=yes
- fi
# Set up files for the system power library
if test x$enable_power = xyes; then
AC_DEFINE(SDL_POWER_HAIKU, 1, [ ])
diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake
index 98c62a9949..12692f531e 100644
--- a/include/SDL_config.h.cmake
+++ b/include/SDL_config.h.cmake
@@ -252,7 +252,6 @@
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
/* Enable various shared object loading systems */
-#cmakedefine SDL_LOADSO_HAIKU @SDL_LOADSO_HAIKU@
#cmakedefine SDL_LOADSO_DLOPEN @SDL_LOADSO_DLOPEN@
#cmakedefine SDL_LOADSO_DUMMY @SDL_LOADSO_DUMMY@
#cmakedefine SDL_LOADSO_LDG @SDL_LOADSO_LDG@
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index d610cd6ba4..6b96b4f7bb 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -253,7 +253,6 @@
#undef SDL_HAPTIC_XINPUT
/* Enable various shared object loading systems */
-#undef SDL_LOADSO_HAIKU
#undef SDL_LOADSO_DLOPEN
#undef SDL_LOADSO_DUMMY
#undef SDL_LOADSO_LDG
diff --git a/src/dynapi/SDL_dynapi.c b/src/dynapi/SDL_dynapi.c
index c26baf379c..f3474f17dc 100644
--- a/src/dynapi/SDL_dynapi.c
+++ b/src/dynapi/SDL_dynapi.c
@@ -216,21 +216,7 @@ static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
return retval;
}
-#elif defined(__HAIKU__)
-#include <os/kernel/image.h>
-static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
-{
- image_id lib = load_add_on(fname);
- void *retval = NULL;
- if (lib >= 0) {
- if (get_image_symbol(lib, sym, B_SYMBOL_TYPE_TEXT, &retval) != B_NO_ERROR) {
- unload_add_on(lib);
- retval = NULL;
- }
- }
- return retval;
-}
-#elif defined(unix) || defined(__unix__) || defined(__APPLE__)
+#elif defined(unix) || defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__)
#include <dlfcn.h>
static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
{
diff --git a/src/loadso/haiku/SDL_sysloadso.c b/src/loadso/haiku/SDL_sysloadso.c
deleted file mode 100644
index 1336d9e18a..0000000000
--- a/src/loadso/haiku/SDL_sysloadso.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-*/
-#include "../../SDL_internal.h"
-
-#ifdef SDL_LOADSO_HAIKU
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* System dependent library loading routines */
-
-#include <stdio.h>
-#include <os/kernel/image.h>
-
-#include "SDL_loadso.h"
-
-void *
-SDL_LoadObject(const char *sofile)
-{
- void *handle = NULL;
- image_id library_id = load_add_on(sofile);
- if (library_id < 0) {
- SDL_SetError(strerror((int) library_id));
- } else {
- handle = (void *) (library_id);
- }
- return (handle);
-}
-
-void *
-SDL_LoadFunction(void *handle, const char *name)
-{
- void *sym = NULL;
- image_id library_id = (image_id) handle;
- status_t rc =
- get_image_symbol(library_id, name, B_SYMBOL_TYPE_TEXT, &sym);
- if (rc != B_NO_ERROR) {
- SDL_SetError(strerror(rc));
- }
- return (sym);
-}
-
-void
-SDL_UnloadObject(void *handle)
-{
- image_id library_id;
- if (handle != NULL) {
- library_id = (image_id) handle;
- unload_add_on(library_id);
- }
-}
-
-#endif /* SDL_LOADSO_HAIKU */
-
-/* vi: set ts=4 sw=4 expandtab: */