Browse Source

John Emmas Cygwin cleanup patch.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4582 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.8
sletz 14 years ago
parent
commit
f58e9abb51
4 changed files with 19 additions and 62 deletions
  1. +0
    -4
      common/JackDebugClient.cpp
  2. +2
    -10
      posix/JackPosixServerLaunch.cpp
  3. +17
    -44
      windows/JackSystemDeps_os.h
  4. +0
    -4
      windows/JackWinServerLaunch.cpp

+ 0
- 4
common/JackDebugClient.cpp View File

@@ -17,10 +17,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

*/

#if defined(__CYGWIN__) && !defined(CYGWIN_USE_PIPES)
#undef WIN32 // Avoids "unqualified id" problem with std::max() etc
#endif

#include "JackDebugClient.h"
#include "JackEngineControl.h"
#include "JackException.h"


+ 2
- 10
posix/JackPosixServerLaunch.cpp View File

@@ -18,8 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

*/

#if !defined(WIN32) || defined(__CYGWIN__)

#include "JackConstants.h"
#include "JackChannel.h"
#include "JackLibGlobals.h"
@@ -118,13 +116,8 @@ static void start_server_classic_aux(const char* server_name)
}

if (!good) {
#if defined(__CYGWIN__)
command = (char*)("/usr/bin/jackd.exe");
strncpy(arguments, "jackd.exe -S -R -d JACK_DEFAULT_DRIVER", 255);
#else
command = (char*)("/usr/bin/jackd");
strncpy(arguments, "/jackd -R -d "JACK_DEFAULT_DRIVER, 255);
#endif
command = (char*)(JACK_LOCATION "/jackd");
strncpy(arguments, JACK_LOCATION "/jackd -T -d "JACK_DEFAULT_DRIVER, 255);
} else {
result = strcspn(arguments, " ");
command = (char*)malloc(result + 1);
@@ -246,4 +239,3 @@ int try_start_server(jack_varargs_t* va, jack_options_t options, jack_status_t*
return 0;
}

#endif // !WIN32 || __CYGWIN__

+ 17
- 44
windows/JackSystemDeps_os.h View File

@@ -21,59 +21,32 @@
#ifndef __JackSystemDeps_WIN32__
#define __JackSystemDeps_WIN32__

#include <windows.h>

#ifndef PATH_MAX
#define PATH_MAX 512
#endif

#if defined(__CYGWIN__)

#include <inttypes.h>
#include <sys/types.h>
#include <signal.h>
#include <dlfcn.h>

#ifndef UINT32_MAX
#define UINT32_MAX 4294967295U
#endif
#define UINT32_MAX 4294967295U

#define DRIVER_HANDLE void*
#define LoadDriverModule(name) dlopen((name), RTLD_NOW | RTLD_GLOBAL)
#define UnloadDriverModule(handle) dlclose((handle))
#define GetDriverProc(handle, name) dlsym((handle), (name))
#define DRIVER_HANDLE HINSTANCE
#define LoadDriverModule(name) LoadLibrary((name))
#define UnloadDriverModule(handle) (FreeLibrary(((HMODULE)handle)))
#define GetDriverProc(handle, name) GetProcAddress(((HMODULE)handle), (name))

#define JACK_HANDLE void*
#define LoadJackModule(name) dlopen((name), RTLD_NOW | RTLD_LOCAL);
#define UnloadJackModule(handle) dlclose((handle));
#define GetJackProc(handle, name) dlsym((handle), (name));
#define JACK_HANDLE HINSTANCE
#define LoadJackModule(name) LoadLibrary((name));
#define UnloadJackModule(handle) FreeLibrary((handle));
#define GetJackProc(handle, name) GetProcAddress((handle), (name));

#define JACK_DEBUG (getenv("JACK_CLIENT_DEBUG") && strcmp(getenv("JACK_CLIENT_DEBUG"), "on") == 0)
#ifndef ENOBUFS
#define ENOBUFS 55
#endif

#ifdef _DEBUG
#define JACK_DEBUG true
#else

#include <windows.h>

#define UINT32_MAX 4294967295U

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

#define JACK_HANDLE HINSTANCE
#define LoadJackModule(name) LoadLibrary((name));
#define UnloadJackModule(handle) FreeLibrary((handle));
#define GetJackProc(handle, name) GetProcAddress((handle), (name));

#ifndef ENOBUFS
#define ENOBUFS 55
#endif

#ifdef _DEBUG
#define JACK_DEBUG true
#else
#define JACK_DEBUG false
#endif

#define JACK_DEBUG false
#endif

#endif


+ 0
- 4
windows/JackWinServerLaunch.cpp View File

@@ -26,8 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

using namespace Jack;

#if defined(WIN32) && !defined(__CYGWIN__)

#include <shlobj.h>
#include <process.h>
#include <string.h>
@@ -308,5 +306,3 @@ int try_start_server(jack_varargs_t* va, jack_options_t options, jack_status_t*
return 0;
}

#endif // WIN32 && !__CYGWIN__


Loading…
Cancel
Save