diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-12-16 03:34:23 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-12-16 03:34:23 +0000 |
commit | 2c6b585f2de11d4facfe06b8e8db789d22955716 (patch) | |
tree | 2a89f80d3ddff3e3861dcfa8e100c4f6587a3b18 /source4 | |
parent | ff6478bb4a894228a8959ede750da9d079c13c7b (diff) | |
download | samba-2c6b585f2de11d4facfe06b8e8db789d22955716.tar.gz samba-2c6b585f2de11d4facfe06b8e8db789d22955716.tar.bz2 samba-2c6b585f2de11d4facfe06b8e8db789d22955716.zip |
more portability fixes. We now almost compile on solaris
(This used to be commit f4abd20b8437703211676fb12ea23af8f0e4642a)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/include/mutex.h | 12 | ||||
-rw-r--r-- | source4/lib/mutex.c | 16 | ||||
-rw-r--r-- | source4/script/mkproto.pl | 4 |
3 files changed, 17 insertions, 15 deletions
diff --git a/source4/include/mutex.h b/source4/include/mutex.h index 20caaf5aa2..ec1a7d285c 100644 --- a/source4/include/mutex.h +++ b/source4/include/mutex.h @@ -38,12 +38,12 @@ enum rwlock_id { RWLOCK_SMBD, /* global smbd lock */ RWLOCK_MAX /* this MUST be kept last */ }; -#define MUTEX_LOCK_BY_ID(mutex_index) mutex_lock_by_id(mutex_index, #mutex_index) -#define MUTEX_UNLOCK_BY_ID(mutex_index) mutex_unlock_by_id(mutex_index, #mutex_index) -#define MUTEX_INIT(mutex, name) mutex_init(mutex, #name) -#define MUTEX_DESTROY(mutex, name) mutex_destroy(mutex, #name) -#define MUTEX_LOCK(mutex, name) mutex_lock(mutex, #name) -#define MUTEX_UNLOCK(mutex, name) mutex_unlock(mutex, #name) +#define MUTEX_LOCK_BY_ID(mutex_index) smb_mutex_lock_by_id(mutex_index, #mutex_index) +#define MUTEX_UNLOCK_BY_ID(mutex_index) smb_mutex_unlock_by_id(mutex_index, #mutex_index) +#define MUTEX_INIT(mutex, name) smb_mutex_init(mutex, #name) +#define MUTEX_DESTROY(mutex, name) smb_mutex_destroy(mutex, #name) +#define MUTEX_LOCK(mutex, name) smb_mutex_lock(mutex, #name) +#define MUTEX_UNLOCK(mutex, name) smb_mutex_unlock(mutex, #name) #define RWLOCK_INIT(rwlock, name) rwlock_init(rwlock, #name) #define RWLOCK_DESTROY(rwlock, name) rwlock_destroy(rwlock, #name) diff --git a/source4/lib/mutex.c b/source4/lib/mutex.c index c1a0986040..8d1eee7828 100644 --- a/source4/lib/mutex.c +++ b/source4/lib/mutex.c @@ -28,17 +28,17 @@ static struct { struct mutex_ops ops; } mutex_handlers; -int mutex_lock_by_id(enum mutex_id id, const char *name) +int smb_mutex_lock_by_id(enum mutex_id id, const char *name) { - return mutex_lock(&mutex_list[id], name); + return smb_mutex_lock(&mutex_list[id], name); } -int mutex_unlock_by_id(enum mutex_id id, const char *name) +int smb_mutex_unlock_by_id(enum mutex_id id, const char *name) { - return mutex_unlock(&mutex_list[id], name); + return smb_mutex_unlock(&mutex_list[id], name); } -int mutex_init(smb_mutex_t *mutex, const char *name) +int smb_mutex_init(smb_mutex_t *mutex, const char *name) { if (mutex_handlers.ops.mutex_init) { return mutex_handlers.ops.mutex_init(mutex, name); @@ -46,7 +46,7 @@ int mutex_init(smb_mutex_t *mutex, const char *name) return 0; } -int mutex_destroy(smb_mutex_t *mutex, const char *name) +int smb_mutex_destroy(smb_mutex_t *mutex, const char *name) { if (mutex_handlers.ops.mutex_destroy) { return mutex_handlers.ops.mutex_destroy(mutex, name); @@ -54,7 +54,7 @@ int mutex_destroy(smb_mutex_t *mutex, const char *name) return 0; } -int mutex_lock(smb_mutex_t *mutex, const char *name) +int smb_mutex_lock(smb_mutex_t *mutex, const char *name) { if (mutex_handlers.ops.mutex_lock) { return mutex_handlers.ops.mutex_lock(mutex, name); @@ -62,7 +62,7 @@ int mutex_lock(smb_mutex_t *mutex, const char *name) return 0; } -int mutex_unlock(smb_mutex_t *mutex, const char *name) +int smb_mutex_unlock(smb_mutex_t *mutex, const char *name) { if (mutex_handlers.ops.mutex_unlock) { return mutex_handlers.ops.mutex_unlock(mutex, name); diff --git a/source4/script/mkproto.pl b/source4/script/mkproto.pl index 66f2799147..dac64045ce 100644 --- a/source4/script/mkproto.pl +++ b/source4/script/mkproto.pl @@ -1,7 +1,9 @@ #!/usr/bin/perl use strict; -use warnings; + +# don't use warnings module as it is not portable enough +# use warnings; my $header_name = '_PROTO_H_'; |