Browse Source

Multi-platform related cleanup.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2918 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
sletz 16 years ago
parent
commit
3737def340
4 changed files with 12 additions and 28 deletions
  1. +0
    -9
      common/JackDriverLoader.cpp
  2. +1
    -19
      common/JackDriverLoader.h
  3. +6
    -0
      posix/JackSystemDeps_os.h
  4. +5
    -0
      windows/JackSystemDeps_os.h

+ 0
- 9
common/JackDriverLoader.cpp View File

@@ -23,15 +23,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#endif

#include "JackSystemDeps.h"

/*
#ifndef WIN32
#ifndef ADDON_DIR
#include "config.h"
#endif
#endif
*/

#include "JackDriverLoader.h"
#include "JackConstants.h"
#include "JackError.h"


+ 1
- 19
common/JackDriverLoader.h View File

@@ -24,25 +24,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "driver_interface.h"
#include "JackControlAPI.h"
#include "JackPlatformPlug.h"


#ifdef WIN32

#include <windows.h>
#define DRIVER_HANDLE HINSTANCE
#define LoadDriverModule(name) LoadLibrary((name))
#define UnloadDriverModule(handle) (FreeLibrary(((HMODULE)handle)))
#define GetProc(handle, name) GetProcAddress(((HMODULE)handle),(name))

#else

#include <dlfcn.h>
#define DRIVER_HANDLE void*
#define LoadDriverModule(name) dlopen((name), RTLD_NOW | RTLD_GLOBAL)
#define UnloadDriverModule(handle) dlclose((handle))
#define GetProc(handle, name) dlsym((handle), (name))

#endif
#include "JackSystemDeps.h"

namespace Jack
{


+ 6
- 0
posix/JackSystemDeps_os.h View File

@@ -23,5 +23,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include <inttypes.h>
#include <sys/types.h>
#include <signal.h>
#include <dlfcn.h>

#define DRIVER_HANDLE void*
#define LoadDriverModule(name) dlopen((name), RTLD_NOW | RTLD_GLOBAL)
#define UnloadDriverModule(handle) dlclose((handle))
#define GetProc(handle, name) dlsym((handle), (name))

#endif

+ 5
- 0
windows/JackSystemDeps_os.h View File

@@ -22,6 +22,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

#include <windows.h>

#define DRIVER_HANDLE HINSTANCE
#define LoadDriverModule(name) LoadLibrary((name))
#define UnloadDriverModule(handle) (FreeLibrary(((HMODULE)handle)))
#define GetProc(handle, name) GetProcAddress(((HMODULE)handle),(name))

#pragma warning (disable : 4786)

#define ENOBUFS 55


Loading…
Cancel
Save