OpenSolaris defines MUTEX_DEFAULT therefore we rename the members of the enums mutex...
authorTobias Brunner <tobias@strongswan.org>
Fri, 14 Aug 2009 11:30:59 +0000 (13:30 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 14 Aug 2009 11:30:59 +0000 (13:30 +0200)
41 files changed:
src/charon/bus/bus.c
src/charon/config/attributes/attribute_manager.c
src/charon/config/backend_manager.c
src/charon/config/peer_cfg.c
src/charon/credentials/credential_manager.c
src/charon/credentials/sets/cert_cache.c
src/charon/network/sender.c
src/charon/plugins/eap_radius/radius_client.c
src/charon/plugins/eap_sim_file/eap_sim_file_triplets.c
src/charon/plugins/kernel_klips/kernel_klips_ipsec.c
src/charon/plugins/kernel_netlink/kernel_netlink_ipsec.c
src/charon/plugins/kernel_netlink/kernel_netlink_net.c
src/charon/plugins/kernel_netlink/kernel_netlink_shared.c
src/charon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
src/charon/plugins/kernel_pfroute/kernel_pfroute_net.c
src/charon/plugins/load_tester/load_tester_plugin.c
src/charon/plugins/nm/nm_creds.c
src/charon/plugins/resolv_conf/resolv_conf_handler.c
src/charon/plugins/stroke/stroke_attribute.c
src/charon/plugins/stroke/stroke_ca.c
src/charon/plugins/stroke/stroke_config.c
src/charon/plugins/stroke/stroke_cred.c
src/charon/plugins/unit_tester/tests/test_mutex.c
src/charon/processing/jobs/callback_job.c
src/charon/processing/processor.c
src/charon/processing/scheduler.c
src/charon/sa/authenticators/eap/eap_manager.c
src/charon/sa/connect_manager.c
src/charon/sa/ike_sa_manager.c
src/charon/sa/mediation_manager.c
src/charon/sa/trap_manager.c
src/libstrongswan/credentials/credential_factory.c
src/libstrongswan/crypto/crypto_factory.c
src/libstrongswan/database/database_factory.c
src/libstrongswan/fetcher/fetcher_manager.c
src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c
src/libstrongswan/plugins/mysql/mysql_database.c
src/libstrongswan/plugins/openssl/openssl_plugin.c
src/libstrongswan/plugins/sqlite/sqlite_database.c
src/libstrongswan/utils/mutex.c
src/libstrongswan/utils/mutex.h

index 67548a1..2671f84 100644 (file)
@@ -117,7 +117,7 @@ static entry_t *entry_create(listener_t *listener, bool blocker)
        this->listener = listener;
        this->blocker = blocker;
        this->calling = 0;
-       this->condvar = condvar_create(CONDVAR_DEFAULT);
+       this->condvar = condvar_create(CONDVAR_TYPE_DEFAULT);
        
        return this;
 }
@@ -760,7 +760,7 @@ bus_t *bus_create()
        this->public.destroy = (void(*)(bus_t*)) destroy;
        
        this->listeners = linked_list_create();
-       this->mutex = mutex_create(MUTEX_RECURSIVE);
+       this->mutex = mutex_create(MUTEX_TYPE_RECURSIVE);
        pthread_key_create(&this->thread_id, NULL);
        pthread_key_create(&this->thread_sa, NULL);
        
index 83e431c..bf45fdb 100644 (file)
@@ -260,7 +260,7 @@ attribute_manager_t *attribute_manager_create()
        
        this->providers = linked_list_create();
        this->handlers = linked_list_create();
-       this->lock = rwlock_create(RWLOCK_DEFAULT);
+       this->lock = rwlock_create(RWLOCK_TYPE_DEFAULT);
        
        return &this->public;
 }
index 3a3a784..cfd6118 100644 (file)
@@ -438,7 +438,7 @@ backend_manager_t *backend_manager_create()
        this->public.destroy = (void (*)(backend_manager_t*))destroy;
        
        this->backends = linked_list_create();
-       this->lock = rwlock_create(RWLOCK_DEFAULT);
+       this->lock = rwlock_create(RWLOCK_TYPE_DEFAULT);
        
        return &this->public;
 }
index 64a22f9..f096f26 100644 (file)
@@ -663,7 +663,7 @@ peer_cfg_t *peer_cfg_create(char *name, u_int ike_version, ike_cfg_t *ike_cfg,
        this->ike_version = ike_version;
        this->ike_cfg = ike_cfg;
        this->child_cfgs = linked_list_create();
-       this->mutex = mutex_create(MUTEX_DEFAULT);
+       this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
        this->cert_policy = cert_policy;
        this->unique = unique;
        this->keyingtries = keyingtries;
index 776dbe5..0967cbc 100644 (file)
@@ -1591,7 +1591,7 @@ credential_manager_t *credential_manager_create()
        this->cache = cert_cache_create();
        this->cache_queue = linked_list_create();
        this->sets->insert_first(this->sets, this->cache);
-       this->lock = rwlock_create(RWLOCK_DEFAULT);
+       this->lock = rwlock_create(RWLOCK_TYPE_DEFAULT);
        
        return &this->public;
 }
index 907f507..dee0463 100644 (file)
@@ -383,7 +383,7 @@ cert_cache_t *cert_cache_create()
                this->relations[i].subject = NULL;
                this->relations[i].issuer = NULL;
                this->relations[i].hits = 0;
-               this->relations[i].lock = rwlock_create(RWLOCK_DEFAULT);
+               this->relations[i].lock = rwlock_create(RWLOCK_TYPE_DEFAULT);
        }
        return &this->public;
 }
index 4910fe2..19f5891 100644 (file)
@@ -139,9 +139,9 @@ sender_t * sender_create()
        this->public.destroy = (void(*)(sender_t*)) destroy;
        
        this->list = linked_list_create();
-       this->mutex = mutex_create(MUTEX_DEFAULT);
-       this->got = condvar_create(CONDVAR_DEFAULT);
-       this->sent = condvar_create(CONDVAR_DEFAULT);
+       this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
+       this->got = condvar_create(CONDVAR_TYPE_DEFAULT);
+       this->sent = condvar_create(CONDVAR_TYPE_DEFAULT);
        
        this->job = callback_job_create((callback_job_cb_t)send_packets,
                                                                        this, NULL, NULL);
index 626dd02..de1bafc 100644 (file)
@@ -161,8 +161,8 @@ bool radius_client_init()
                                        "charon.plugins.eap_radius.sockets", 1);
        
        sockets = linked_list_create();
-       mutex = mutex_create(MUTEX_DEFAULT);
-       condvar = condvar_create(CONDVAR_DEFAULT);
+       mutex = mutex_create(MUTEX_TYPE_DEFAULT);
+       condvar = condvar_create(CONDVAR_TYPE_DEFAULT);
        for (i = 0; i < count; i++)
        {
                fd = socket(host->get_family(host), SOCK_DGRAM, IPPROTO_UDP);
index d093851..e27ed68 100644 (file)
@@ -251,7 +251,7 @@ eap_sim_file_triplets_t *eap_sim_file_triplets_create(char *file)
        this->public.destroy = (void(*)(eap_sim_file_triplets_t*))destroy;
        
        this->triplets = linked_list_create();
-       this->mutex = mutex_create(MUTEX_DEFAULT);
+       this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
        
        read_triplets(this, file);
        
index 9a31c01..9a903d0 100644 (file)
@@ -2632,8 +2632,8 @@ kernel_klips_ipsec_t *kernel_klips_ipsec_create()
        this->allocated_spis = linked_list_create();
        this->installed_sas = linked_list_create();
        this->ipsec_devices = linked_list_create();
-       this->mutex = mutex_create(MUTEX_DEFAULT);
-       this->mutex_pfkey = mutex_create(MUTEX_DEFAULT);
+       this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
+       this->mutex_pfkey = mutex_create(MUTEX_TYPE_DEFAULT);
        this->install_routes = lib->settings->get_bool(lib->settings, "charon.install_routes", TRUE);
        this->seq = 0;
        
index c137650..2051316 100644 (file)
@@ -1972,7 +1972,7 @@ kernel_netlink_ipsec_t *kernel_netlink_ipsec_create()
        /* private members */
        this->policies = hashtable_create((hashtable_hash_t)policy_hash,
                                                                          (hashtable_equals_t)policy_equals, 32);
-       this->mutex = mutex_create(MUTEX_DEFAULT);
+       this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
        this->install_routes = lib->settings->get_bool(lib->settings,
                                        "charon.install_routes", TRUE);
        
index 32154a7..e5c0b5d 100644 (file)
@@ -1370,8 +1370,8 @@ kernel_netlink_net_t *kernel_netlink_net_create()
 
        /* private members */
        this->ifaces = linked_list_create();
-       this->mutex = mutex_create(MUTEX_DEFAULT);
-       this->condvar = condvar_create(CONDVAR_DEFAULT);
+       this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
+       this->condvar = condvar_create(CONDVAR_TYPE_DEFAULT);
        timerclear(&this->last_roam);
        this->routing_table = lib->settings->get_int(lib->settings,
                                        "charon.routing_table", IPSEC_ROUTING_TABLE);
index 7ef7cc5..ec11870 100644 (file)
@@ -255,7 +255,7 @@ netlink_socket_t *netlink_socket_create(int protocol) {
 
        /* private members */
        this->seq = 200;
-       this->mutex = mutex_create(MUTEX_DEFAULT);
+       this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
        
        memset(&addr, 0, sizeof(addr));
        addr.nl_family = AF_NETLINK;
index d1d2ecd..1f83e8f 100644 (file)
@@ -2158,8 +2158,8 @@ kernel_pfkey_ipsec_t *kernel_pfkey_ipsec_create()
 
        /* private members */
        this->policies = linked_list_create();
-       this->mutex = mutex_create(MUTEX_DEFAULT);
-       this->mutex_pfkey = mutex_create(MUTEX_DEFAULT);
+       this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
+       this->mutex_pfkey = mutex_create(MUTEX_TYPE_DEFAULT);
        this->install_routes = lib->settings->get_bool(lib->settings,
                                                                                                "charon.install_routes", TRUE);
        this->seq = 0;
index c2b35a5..d5a864b 100644 (file)
@@ -681,8 +681,8 @@ kernel_pfroute_net_t *kernel_pfroute_net_create()
        
        /* private members */
        this->ifaces = linked_list_create();
-       this->mutex = mutex_create(MUTEX_DEFAULT);
-       this->mutex_pfroute = mutex_create(MUTEX_DEFAULT);
+       this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
+       this->mutex_pfroute = mutex_create(MUTEX_TYPE_DEFAULT);
        
        this->seq = 0;
        
index 12ac7b0..93ed2e3 100644 (file)
@@ -202,8 +202,8 @@ plugin_t *plugin_create()
                shutdown_on = this->iterations * this->initiators;
        }
        
-       this->mutex = mutex_create(MUTEX_DEFAULT);
-       this->condvar = condvar_create(CONDVAR_DEFAULT);
+       this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
+       this->condvar = condvar_create(CONDVAR_TYPE_DEFAULT);
        this->config = load_tester_config_create();
        this->creds = load_tester_creds_create();
        this->listener = load_tester_listener_create(shutdown_on);
index d93b81c..4ea2c36 100644 (file)
@@ -322,7 +322,7 @@ nm_creds_t *nm_creds_create()
        this->public.clear = (void(*)(nm_creds_t*))clear;
        this->public.destroy = (void(*)(nm_creds_t*))destroy;
        
-       this->lock = rwlock_create(RWLOCK_DEFAULT);
+       this->lock = rwlock_create(RWLOCK_TYPE_DEFAULT);
        
        this->cert = NULL;
        this->user = NULL;
index 19e3b32..749cfbc 100644 (file)
@@ -183,7 +183,7 @@ resolv_conf_handler_t *resolv_conf_handler_create()
        this->public.handler.release = (void(*)(attribute_handler_t*, ike_sa_t*, configuration_attribute_type_t, chunk_t))release;
        this->public.destroy = (void(*)(resolv_conf_handler_t*))destroy;
        
-       this->mutex = mutex_create(MUTEX_DEFAULT);
+       this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
        this->file = lib->settings->get_str(lib->settings,
                                                                "charon.plugins.resolv-conf.file", RESOLV_CONF);
        
index a7925ce..d3211fd 100644 (file)
@@ -539,7 +539,7 @@ stroke_attribute_t *stroke_attribute_create()
        this->public.destroy = (void(*)(stroke_attribute_t*))destroy;
        
        this->pools = linked_list_create();
-       this->mutex = mutex_create(MUTEX_RECURSIVE);
+       this->mutex = mutex_create(MUTEX_TYPE_RECURSIVE);
        
        return &this->public;
 }
index fab06e6..c354d8c 100644 (file)
@@ -447,7 +447,7 @@ stroke_ca_t *stroke_ca_create(stroke_cred_t *cred)
        this->public.destroy = (void(*)(stroke_ca_t*))destroy;
        
        this->sections = linked_list_create();
-       this->lock = rwlock_create(RWLOCK_DEFAULT);
+       this->lock = rwlock_create(RWLOCK_TYPE_DEFAULT);
        this->cred = cred;
        
        return &this->public;
index 028e71e..0b6a4ac 100644 (file)
@@ -924,7 +924,7 @@ stroke_config_t *stroke_config_create(stroke_ca_t *ca, stroke_cred_t *cred)
        this->public.destroy = (void(*)(stroke_config_t*))destroy;
        
        this->list = linked_list_create();
-       this->mutex = mutex_create(MUTEX_RECURSIVE);
+       this->mutex = mutex_create(MUTEX_TYPE_RECURSIVE);
        this->ca = ca;
        this->cred = cred;
        
index bd6d289..31bcfe9 100644 (file)
@@ -1125,7 +1125,7 @@ stroke_cred_t *stroke_cred_create()
        this->certs = linked_list_create();
        this->shared = linked_list_create();
        this->private = linked_list_create();
-       this->lock = rwlock_create(RWLOCK_DEFAULT);
+       this->lock = rwlock_create(RWLOCK_TYPE_DEFAULT);
 
        load_certs(this);
        load_secrets(this, SECRETS_FILE, 0);
index a305d50..cb31527 100644 (file)
@@ -65,7 +65,7 @@ bool test_mutex()
        int i;
        pthread_t threads[THREADS];
        
-       mutex = mutex_create(MUTEX_RECURSIVE);
+       mutex = mutex_create(MUTEX_TYPE_RECURSIVE);
        
        for (i = 0; i < 10; i++)
        {
index 82b4643..f4beb5a 100644 (file)
@@ -182,7 +182,7 @@ callback_job_t *callback_job_create(callback_job_cb_t cb, void *data,
        this->public.cancel = (void(*)(callback_job_t*))cancel;
 
        /* private variables */
-       this->mutex = mutex_create(MUTEX_DEFAULT);
+       this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
        this->callback = cb;
        this->data = data;
        this->cleanup = cleanup;
index eb1db33..4a39433 100644 (file)
@@ -240,9 +240,9 @@ processor_t *processor_create(size_t pool_size)
        this->public.destroy = (void(*)(processor_t*))destroy;
        
        this->list = linked_list_create();
-       this->mutex = mutex_create(MUTEX_DEFAULT);
-       this->job_added = condvar_create(CONDVAR_DEFAULT);
-       this->thread_terminated = condvar_create(CONDVAR_DEFAULT);
+       this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
+       this->job_added = condvar_create(CONDVAR_TYPE_DEFAULT);
+       this->thread_terminated = condvar_create(CONDVAR_TYPE_DEFAULT);
        this->total_threads = 0;
        this->desired_threads = 0;
        this->idle_threads = 0;
index b3633f2..1f59205 100644 (file)
@@ -347,8 +347,8 @@ scheduler_t * scheduler_create()
        this->heap_size = HEAP_SIZE_DEFAULT;
        this->heap = (event_t**)calloc(this->heap_size + 1, sizeof(event_t*));
        
-       this->mutex = mutex_create(MUTEX_DEFAULT);
-       this->condvar = condvar_create(CONDVAR_DEFAULT);
+       this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
+       this->condvar = condvar_create(CONDVAR_TYPE_DEFAULT);
        
        this->job = callback_job_create((callback_job_cb_t)schedule, this, NULL, NULL);
        charon->processor->queue_job(charon->processor, (job_t*)this->job);
index b831603..24a4fd6 100644 (file)
@@ -163,7 +163,7 @@ eap_manager_t *eap_manager_create()
        this->public.destroy = (void(*)(eap_manager_t*))destroy;
        
        this->methods = linked_list_create();
-       this->lock = rwlock_create(RWLOCK_DEFAULT);
+       this->lock = rwlock_create(RWLOCK_TYPE_DEFAULT);
        
        return &this->public;
 }
index a1b037d..f26cf94 100644 (file)
@@ -1568,7 +1568,7 @@ connect_manager_t *connect_manager_create()
        this->checklists = linked_list_create();
        this->initiated = linked_list_create();
        
-       this->mutex = mutex_create(MUTEX_DEFAULT);
+       this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
        
        return (connect_manager_t*)this;
 }
index acb69e6..ec1a7f7 100644 (file)
@@ -133,7 +133,7 @@ static entry_t *entry_create()
        entry_t *this = malloc_thing(entry_t);
        
        this->waiting_threads = 0;
-       this->condvar = condvar_create(CONDVAR_DEFAULT);
+       this->condvar = condvar_create(CONDVAR_TYPE_DEFAULT);
        
        /* we set checkout flag when we really give it out */
        this->checked_out = FALSE;
@@ -1711,7 +1711,7 @@ ike_sa_manager_t *ike_sa_manager_create()
        this->segments = (segment_t*)calloc(this->segment_count, sizeof(segment_t));
        for (i = 0; i < this->segment_count; ++i)
        {
-               this->segments[i].mutex = mutex_create(MUTEX_RECURSIVE);
+               this->segments[i].mutex = mutex_create(MUTEX_TYPE_RECURSIVE);
                this->segments[i].count = 0;
        }
        
@@ -1720,7 +1720,7 @@ ike_sa_manager_t *ike_sa_manager_create()
        this->half_open_segments = calloc(this->segment_count, sizeof(shareable_segment_t));
        for (i = 0; i < this->segment_count; ++i)
        {
-               this->half_open_segments[i].lock = rwlock_create(RWLOCK_DEFAULT);
+               this->half_open_segments[i].lock = rwlock_create(RWLOCK_TYPE_DEFAULT);
                this->half_open_segments[i].count = 0;
        }
        
@@ -1729,7 +1729,7 @@ ike_sa_manager_t *ike_sa_manager_create()
        this->connected_peers_segments = calloc(this->segment_count, sizeof(shareable_segment_t));
        for (i = 0; i < this->segment_count; ++i)
        {
-               this->connected_peers_segments[i].lock = rwlock_create(RWLOCK_DEFAULT);
+               this->connected_peers_segments[i].lock = rwlock_create(RWLOCK_TYPE_DEFAULT);
                this->connected_peers_segments[i].count = 0;
        }
        
index 890e567..a69c001 100644 (file)
@@ -331,7 +331,7 @@ mediation_manager_t *mediation_manager_create()
        this->public.check_and_register = (ike_sa_id_t*(*)(mediation_manager_t*,identification_t*,identification_t*))check_and_register;
        
        this->peers = linked_list_create();
-       this->mutex = mutex_create(MUTEX_DEFAULT);
+       this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
        
        return (mediation_manager_t*)this;
 }
index bc72cd4..570335e 100644 (file)
@@ -362,7 +362,7 @@ trap_manager_t *trap_manager_create()
        this->public.destroy = (void(*)(trap_manager_t*))destroy;
        
        this->traps = linked_list_create();
-       this->lock = rwlock_create(RWLOCK_DEFAULT);
+       this->lock = rwlock_create(RWLOCK_TYPE_DEFAULT);
        
        /* register listener for IKE state changes */
        this->listener.traps = this;
index 2e9a541..e55df03 100644 (file)
@@ -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;
 }
index fea8d07..e928e8c 100644 (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);
index 76e0a4e..ef69278 100644 (file)
@@ -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;
 }
index a30012b..1f87412 100644 (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;
 }
index 03c9bbb..939e088 100644 (file)
@@ -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;
 }
 
index d0d5a3d..341217d 100644 (file)
@@ -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 */
index 6407f42..ce6716f 100644 (file)
@@ -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);
        }
 }
 
index ce873b7..6e4951f 100644 (file)
@@ -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)
        {
index 8b3a252..a6c39e9 100644 (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);
index 8a8162a..273f56b 100644 (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,
 };
 
 /**