Commit 395e3777 authored by sletz's avatar sletz
Browse files

Cleanup in driver/internal loading code, correct wscript for driver and internals compilation.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2897 0c269be4-1314-0410-8aa9-9f06e86f4224
parent c12120b0
......@@ -739,15 +739,10 @@ EXPORT jackctl_server_t * jackctl_server_create()
goto fail_free_parameters;
}
if (!jackctl_internals_load(server_ptr))
{
goto fail_free_drivers;
}
/* Allowed to fail */
jackctl_internals_load(server_ptr);
return server_ptr;
fail_free_drivers:
jackctl_server_free_drivers(server_ptr);
fail_free_parameters:
jackctl_server_free_parameters(server_ptr);
......
......@@ -438,9 +438,9 @@ jack_get_descriptor (JSList * drivers, const char * sofile, const char * symbol)
if ((dlhandle = LoadDriverModule(filename)) == NULL) {
#ifdef WIN32
jack_error ("could not open driver .dll '%s': %ld\n", filename, GetLastError());
jack_error ("could not open driver .dll '%s': %ld", filename, GetLastError());
#else
jack_error ("could not open driver .so '%s': %s\n", filename, dlerror());
jack_error ("could not open driver .so '%s': %s", filename, dlerror());
#endif
free(filename);
......@@ -464,7 +464,7 @@ jack_get_descriptor (JSList * drivers, const char * sofile, const char * symbol)
}
if ((descriptor = so_get_descriptor ()) == NULL) {
jack_error("driver from '%s' returned NULL descriptor\n", filename);
jack_error("driver from '%s' returned NULL descriptor", filename);
UnloadDriverModule(dlhandle);
free(filename);
return NULL;
......@@ -472,11 +472,11 @@ jack_get_descriptor (JSList * drivers, const char * sofile, const char * symbol)
#ifdef WIN32
if ((err = UnloadDriverModule(dlhandle)) == 0) {
jack_error ("error closing driver .so '%s': %ld\n", filename, GetLastError ());
jack_error ("error closing driver .so '%s': %ld", filename, GetLastError ());
}
#else
if ((err = UnloadDriverModule(dlhandle)) != 0) {
jack_error ("error closing driver .so '%s': %s\n", filename, dlerror ());
jack_error ("error closing driver .so '%s': %s", filename, dlerror ());
}
#endif
......@@ -485,7 +485,7 @@ jack_get_descriptor (JSList * drivers, const char * sofile, const char * symbol)
other_descriptor = (jack_driver_desc_t *) node->data;
if (strcmp(descriptor->name, other_descriptor->name) == 0) {
jack_error("the drivers in '%s' and '%s' both have the name '%s'; using the first\n",
jack_error("the drivers in '%s' and '%s' both have the name '%s'; using the first",
other_descriptor->file, filename, other_descriptor->name);
/* FIXME: delete the descriptor */
free(filename);
......@@ -523,9 +523,9 @@ static bool check_symbol(const char* sofile, const char* symbol)
if ((dlhandle = LoadDriverModule(filename)) == NULL) {
#ifdef WIN32
jack_error ("could not open component .dll '%s': %ld\n", filename, GetLastError());
jack_error ("could not open component .dll '%s': %ld", filename, GetLastError());
#else
jack_error ("could not open component .so '%s': %s\n", filename, dlerror());
jack_error ("could not open component .so '%s': %s", filename, dlerror());
#endif
} else {
res = (GetProc(dlhandle, symbol)) ? true : false;
......@@ -562,7 +562,7 @@ jack_drivers_load (JSList * drivers) {
file = (HANDLE )FindFirstFile(dll_filename, &filedata);
if (file == INVALID_HANDLE_VALUE) {
jack_error("error");
jack_error("error invalid handle");
return NULL;
}
......@@ -584,7 +584,7 @@ jack_drivers_load (JSList * drivers) {
} while (FindNextFile(file, &filedata));
if (!driver_list) {
jack_error ("could not find any drivers in %s!\n", driver_dir);
jack_error ("could not find any drivers in %s!", driver_dir);
return NULL;
}
......@@ -611,7 +611,7 @@ jack_drivers_load (JSList * drivers) {
from the .so files in it */
dir_stream = opendir (driver_dir);
if (!dir_stream) {
jack_error ("could not open driver directory %s: %s\n",
jack_error ("could not open driver directory %s: %s",
driver_dir, strerror (errno));
return NULL;
}
......@@ -640,12 +640,12 @@ jack_drivers_load (JSList * drivers) {
err = closedir (dir_stream);
if (err) {
jack_error ("error closing driver directory %s: %s\n",
jack_error ("error closing driver directory %s: %s",
driver_dir, strerror (errno));
}
if (!driver_list) {
jack_error ("could not find any drivers in %s!\n", driver_dir);
jack_error ("could not find any drivers in %s!", driver_dir);
return NULL;
}
......@@ -708,7 +708,7 @@ jack_internals_load (JSList * internals) {
} while (FindNextFile(file, &filedata));
if (!driver_list) {
jack_error ("could not find any internals in %s!\n", driver_dir);
jack_error ("could not find any internals in %s!", driver_dir);
return NULL;
}
......@@ -769,7 +769,7 @@ jack_internals_load (JSList * internals) {
}
if (!driver_list) {
jack_error ("could not find any internals in %s!\n", driver_dir);
jack_error ("could not find any internals in %s!", driver_dir);
return NULL;
}
......
......@@ -41,7 +41,7 @@ def subst_func(tsk):
def create_jack_process_obj(bld, target, sources, uselib = None):
process = bld.create_obj('cpp', 'shlib')
process.env['shlib_PATTERN'] = '%s.so'
process.defines = 'HAVE_CONFIG_H'
process.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
if bld.env()['IS_MACOSX']:
env_includes = ['../macosx', '../posix', '../macosx/coreaudio']
if bld.env()['IS_LINUX']:
......
......@@ -304,7 +304,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = common posix macosx linux linux/alsa windows common/jack/control.h
INPUT = common posix macosx macosx/coreaudio/ linux linux/alsa windows windows/portaudio common/jack/control.h
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
......
......@@ -15,7 +15,7 @@ def create_jack_driver_obj(bld, target, sources, uselib = None):
driver = bld.create_obj('cpp', 'shlib')
driver.features.append('cc')
driver.env['shlib_PATTERN'] = 'jack_%s.so'
driver.defines = 'HAVE_CONFIG_H'
driver.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
driver.includes = ['.', '../linux', '../posix', '../common', '../common/jack']
driver.target = target
driver.source = sources
......
......@@ -5,7 +5,7 @@ def create_jack_driver_obj(bld, target, sources, uselib = None):
driver = bld.create_obj('cpp', 'shlib')
driver.features.append('cc')
driver.env['shlib_PATTERN'] = 'jack_%s.so'
driver.defines = 'HAVE_CONFIG_H'
driver.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
driver.includes = ['.', '../macosx', '../posix', '../common', '../common/jack']
driver.target = target
driver.source = sources
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment