OpenSolaris defines MUTEX_DEFAULT therefore we rename the members of the enums mutex/condvar/rwlock_type_t.

This commit is contained in:
Tobias Brunner
2009-08-14 13:30:59 +02:00
parent 8b6a5ce5ba
commit 3901937d14
41 changed files with 63 additions and 63 deletions
@@ -234,7 +234,7 @@ credential_factory_t *credential_factory_create()
this->constructors = linked_list_create();
this->lock = rwlock_create(RWLOCK_DEFAULT);
this->lock = rwlock_create(RWLOCK_TYPE_DEFAULT);
return &this->public;
}
+1 -1
View File
@@ -746,7 +746,7 @@ crypto_factory_t *crypto_factory_create()
this->prfs = linked_list_create();
this->rngs = linked_list_create();
this->dhs = linked_list_create();
this->lock = rwlock_create(RWLOCK_DEFAULT);
this->lock = rwlock_create(RWLOCK_TYPE_DEFAULT);
this->tester = crypto_tester_create();
this->test_on_add = lib->settings->get_bool(lib->settings,
"libstrongswan.crypto_test.on_add", FALSE);
@@ -110,7 +110,7 @@ database_factory_t *database_factory_create()
this->public.destroy = (void(*)(database_factory_t*))destroy;
this->databases = linked_list_create();
this->mutex = mutex_create(MUTEX_DEFAULT);
this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
return &this->public;
}
+1 -1
View File
@@ -201,7 +201,7 @@ fetcher_manager_t *fetcher_manager_create()
this->public.destroy = (void(*)(fetcher_manager_t*))destroy;
this->fetchers = linked_list_create();
this->lock = rwlock_create(RWLOCK_DEFAULT);
this->lock = rwlock_create(RWLOCK_TYPE_DEFAULT);
return &this->public;
}
@@ -47,7 +47,7 @@ struct private_gcrypt_plugin_t {
*/
static int mutex_init(void **lock)
{
*lock = mutex_create(MUTEX_DEFAULT);
*lock = mutex_create(MUTEX_TYPE_DEFAULT);
return 0;
}
@@ -686,7 +686,7 @@ mysql_database_t *mysql_database_create(char *uri)
free(this);
return NULL;
}
this->mutex = mutex_create(MUTEX_DEFAULT);
this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
this->pool = linked_list_create();
/* check connectivity */
@@ -84,7 +84,7 @@ static struct CRYPTO_dynlock_value *create_function(const char *file, int line)
struct CRYPTO_dynlock_value *lock;
lock = malloc_thing(struct CRYPTO_dynlock_value);
lock->mutex = mutex_create(MUTEX_DEFAULT);
lock->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
return lock;
}
@@ -140,7 +140,7 @@ static void threading_init()
mutex = malloc(sizeof(mutex_t*) * num_locks);
for (i = 0; i < num_locks; i++)
{
mutex[i] = mutex_create(MUTEX_DEFAULT);
mutex[i] = mutex_create(MUTEX_TYPE_DEFAULT);
}
}
@@ -333,7 +333,7 @@ sqlite_database_t *sqlite_database_create(char *uri)
this->public.db.get_driver = (db_driver_t(*)(database_t*))get_driver;
this->public.db.destroy = (void(*)(database_t*))destroy;
this->mutex = mutex_create(MUTEX_RECURSIVE);
this->mutex = mutex_create(MUTEX_TYPE_RECURSIVE);
if (sqlite3_open(file, &this->db) != SQLITE_OK)
{
+4 -4
View File
@@ -276,7 +276,7 @@ mutex_t *mutex_create(mutex_type_t type)
{
switch (type)
{
case MUTEX_RECURSIVE:
case MUTEX_TYPE_RECURSIVE:
{
private_r_mutex_t *this = malloc_thing(private_r_mutex_t);
@@ -292,7 +292,7 @@ mutex_t *mutex_create(mutex_type_t type)
return &this->generic.public;
}
case MUTEX_DEFAULT:
case MUTEX_TYPE_DEFAULT:
default:
{
private_mutex_t *this = malloc_thing(private_mutex_t);
@@ -416,7 +416,7 @@ condvar_t *condvar_create(condvar_type_t type)
{
switch (type)
{
case CONDVAR_DEFAULT:
case CONDVAR_TYPE_DEFAULT:
default:
{
private_condvar_t *this = malloc_thing(private_condvar_t);
@@ -488,7 +488,7 @@ rwlock_t *rwlock_create(rwlock_type_t type)
{
switch (type)
{
case RWLOCK_DEFAULT:
case RWLOCK_TYPE_DEFAULT:
default:
{
private_rwlock_t *this = malloc_thing(private_rwlock_t);
+4 -4
View File
@@ -63,9 +63,9 @@ static inline int cancellable_recvfrom(int socket, void *buffer, size_t length,
*/
enum mutex_type_t {
/** default mutex */
MUTEX_DEFAULT = 0,
MUTEX_TYPE_DEFAULT = 0,
/** allow recursive locking of the mutex */
MUTEX_RECURSIVE = 1,
MUTEX_TYPE_RECURSIVE = 1,
};
/**
@@ -73,7 +73,7 @@ enum mutex_type_t {
*/
enum condvar_type_t {
/** default condvar */
CONDVAR_DEFAULT = 0,
CONDVAR_TYPE_DEFAULT = 0,
};
/**
@@ -81,7 +81,7 @@ enum condvar_type_t {
*/
enum rwlock_type_t {
/** default condvar */
RWLOCK_DEFAULT = 0,
RWLOCK_TYPE_DEFAULT = 0,
};
/**