$NetBSD: patch-am,v 1.2 2006/05/29 19:44:24 joerg Exp $ --- Top/csmodule.c.orig 2006-03-08 15:13:15.000000000 -0800 +++ Top/csmodule.c @@ -78,7 +78,7 @@ #include "csoundCore.h" #include "csmodule.h" -#if defined(LINUX) +#if defined(LINUX) || defined(__NetBSD__) || defined(__DragonFly__) #include #elif defined(WIN32) #include @@ -121,7 +121,7 @@ static const char *plugindir_envva static const char *plugindir64_envvar = "OPCODEDIR64"; /* default directory to load plugins from if environment variable is not set */ -#if !(defined(_CSOUND_RELEASE_) && (defined(LINUX) || defined(__MACH__))) +#if !(defined(_CSOUND_RELEASE_) && (defined(LINUX) || defined(__MACH__) || defined(__NetBSD__) || defined(__DragonFly__))) # define ENABLE_OPCODEDIR_WARNINGS 1 # ifdef CS_DEFAULT_PLUGINDIR # undef CS_DEFAULT_PLUGINDIR @@ -131,9 +131,9 @@ static const char *plugindir64_env # define ENABLE_OPCODEDIR_WARNINGS 0 # ifndef CS_DEFAULT_PLUGINDIR # ifndef USE_DOUBLE -# define CS_DEFAULT_PLUGINDIR "/usr/local/lib/csound/plugins" +# define CS_DEFAULT_PLUGINDIR __PKGSRC_PREFIX__ "lib/csound5/plugins" # else -# define CS_DEFAULT_PLUGINDIR "/usr/local/lib/csound/plugins64" +# define CS_DEFAULT_PLUGINDIR __PKGSRC_PREFIX__ "lib/csound5/plugins64" # endif # endif #endif @@ -225,7 +225,7 @@ static CS_NOINLINE int csoundLoadExterna /* load library */ err = csound->OpenLibrary(&h, libraryPath); if (err) { -#if defined(BETA) && defined(LINUX) +#if defined(BETA) && (defined(LINUX) || defined(__NetBSD__) || defined(__DragonFly__)) csound->Warning(csound, "%s", dlerror()); #endif csound->Warning(csound, Str("could not open library '%s' (%d)"), @@ -591,7 +591,7 @@ PUBLIC void *csoundGetLibrarySymbol(void return (void*) GetProcAddress((HMODULE) library, procedureName); } -#elif defined(LINUX) +#elif defined(LINUX) || defined(__NetBSD__) || defined(__DragonFly__) PUBLIC int csoundOpenLibrary(void **library, const char *libraryPath) {