From d0c78e3c61613e5153387abecba49846f91e5b7c Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 11 Jan 2010 17:07:30 +0100 Subject: [PATCH] Fix the win32 build again --- bacula/src/lib/rwlock.c | 10 +++++----- bacula/src/lib/rwlock.h | 26 +++++++++++++------------- bacula/src/win32/lib/bacula32.def | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/bacula/src/lib/rwlock.c b/bacula/src/lib/rwlock.c index 0647343aa5..d112c6822a 100644 --- a/bacula/src/lib/rwlock.c +++ b/bacula/src/lib/rwlock.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2001-2008 Free Software Foundation Europe e.V. + Copyright (C) 2001-2010 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -49,13 +49,13 @@ * Returns: 0 on success * errno on failure */ -int rwl_init(brwlock_t *rwl, int prio) +int rwl_init(brwlock_t *rwl, int priority) { int stat; rwl->r_active = rwl->w_active = 0; rwl->r_wait = rwl->w_wait = 0; - rwl->priority = prio; + rwl->priority = priority; if ((stat = pthread_mutex_init(&rwl->mutex, NULL)) != 0) { return stat; } @@ -461,7 +461,7 @@ int main (int argc, char *argv[]) for (data_count = 0; data_count < DATASIZE; data_count++) { data[data_count].data = 0; data[data_count].writes = 0; - status = rwl_init (&data[data_count].lock); + status = rwl_init(&data[data_count].lock); if (status != 0) { berrno be; printf("Init rwlock failed. ERR=%s\n", be.bstrerror(status)); @@ -635,7 +635,7 @@ int main (int argc, char *argv[]) for (data_count = 0; data_count < DATASIZE; data_count++) { data[data_count].data = 0; data[data_count].updates = 0; - rwl_init (&data[data_count].lock); + rwl_init(&data[data_count].lock); } /* diff --git a/bacula/src/lib/rwlock.h b/bacula/src/lib/rwlock.h index 7c5847636d..a6c5c27bfa 100644 --- a/bacula/src/lib/rwlock.h +++ b/bacula/src/lib/rwlock.h @@ -1,19 +1,7 @@ -/* - * Bacula Thread Read/Write locking code. It permits - * multiple readers but only one writer. - * - * Kern Sibbald, January MMI - * - * This code adapted from "Programming with POSIX Threads", by - * David R. Butenhof - * - * Version $Id$ - * - */ /* Bacula® - The Network Backup Solution - Copyright (C) 2001-2006 Free Software Foundation Europe e.V. + Copyright (C) 2001-2010 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -37,6 +25,18 @@ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, Switzerland, email:ftf@fsfeurope.org. */ +/* + * Bacula Thread Read/Write locking code. It permits + * multiple readers but only one writer. + * + * Kern Sibbald, January MMI + * + * This code adapted from "Programming with POSIX Threads", by + * David R. Butenhof + * + * Version $Id$ + * + */ #ifndef __RWLOCK_H #define __RWLOCK_H 1 diff --git a/bacula/src/win32/lib/bacula32.def b/bacula/src/win32/lib/bacula32.def index 4eeae11964..109fefb704 100644 --- a/bacula/src/win32/lib/bacula32.def +++ b/bacula/src/win32/lib/bacula32.def @@ -641,7 +641,7 @@ _Z14rwl_readunlockP12s_rwlock_tag _Z15rwl_readtrylockP12s_rwlock_tag _Z15rwl_writeunlockP12s_rwlock_tag _Z16rwl_writetrylockP12s_rwlock_tag -_Z8rwl_initP12s_rwlock_tag +_Z8rwl_initP12s_rwlock_tagi ; scan.o _Z10parse_argsPcPS_PiS0_S0_i -- 2.39.5