Eric Bollengier wrote:
> Hello Dan,
> 
> The "pthread" type is not defined on linux... (i have a pthread_t instead)
> And on linux, pthread_t is an integer, which seems to different on freebsd.
> 
> Maybe i can use a void * cast at this place ?

In addition to the casting issues, I've been unable to get Bacula 
regression testing to compile on FreeBSD 7.x:

NOTE: gcc 4.2.1

==>Entering directory 
/usr/home/dan/src/BaculaRegressionTesting-TRUNK/build/src/tools
/bin/rm -f -r .libs _libs
==>Entering directory 
/usr/home/dan/src/BaculaRegressionTesting-TRUNK/build/manpages
/bin/rm -f *~ 1 2 3 *.bak
make: illegal option -- -
usage: make [-BPSXeiknqrstv] [-C directory] [-D variable]
         [-d flags] [-E variable] [-f makefile] [-I directory]
         [-j max_jobs] [-m directory] [-V variable]
         [variable=value] [target ...]
test: =: unexpected operator
==>Entering directory 
/usr/home/dan/src/BaculaRegressionTesting-TRUNK/build/platforms
rm -f 1 2 3

Configuration on Fri Jan  9 22:58:50 EST 2009:

    Host:                    x86_64-unknown-freebsd7.0 -- freebsd 7.0-STABLE
    Bacula version:          Bacula 2.5.28-b1 (04 January 2009)
    Source code location:    .
    Install binaries: 
/usr/home/dan/src/BaculaRegressionTesting-TRUNK/bin
    Install libraries: 
/usr/home/dan/src/BaculaRegressionTesting-TRUNK/bin
    Install config files: 
/usr/home/dan/src/BaculaRegressionTesting-TRUNK/bin
    Scripts directory: 
/usr/home/dan/src/BaculaRegressionTesting-TRUNK/bin
    Archive directory: 
/usr/home/dan/src/BaculaRegressionTesting-TRUNK/tmp
    Working directory: 
/usr/home/dan/src/BaculaRegressionTesting-TRUNK/working
    PID directory: 
/usr/home/dan/src/BaculaRegressionTesting-TRUNK/working
    Subsys directory: 
/usr/home/dan/src/BaculaRegressionTesting-TRUNK/working
    Man directory: 
/usr/home/dan/src/BaculaRegressionTesting-TRUNK/bin
    Data directory:          /usr/share
    Plugin directory: 
/usr/home/dan/src/BaculaRegressionTesting-TRUNK/bin/plugins
    C Compiler:              gcc 4.2.1
    C++ Compiler:            /usr/bin/g++ 4.2.1
    Compiler flags:           -g -O2 -Wall -fno-strict-aliasing 
-fno-exceptions -fno-rtti
    Linker flags:


> 
> Bye
> 
> Le Friday 09 January 2009 19:42:18 Dan Langille, vous avez écrit :
>> Hi,
>>
>> In FreeBSD 7.x, we have a newer gcc, which is being extra picky about
>> precision when casting.
>> One of the FreeBSD porters has done some work in this area.  His
>> patches are here (and I have
>> pasted them to the end of this message):
>>
>>    http://www.atarininja.org/patches/bacula-server-devel.diff
>>
>> NOTE: Ignore the first two three patches (they apply only to the
>> FreeBSD ports skelton, and not
>> to Bacula code).
>>
>> I will apply these patches to my local working copy and run the
>> regression tests on them.  If all
>> goes well, I will commit them this weekend.
>>
>>
>> diff -N files/patch-src-cats-sql.c
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ files/patch-src-cats-sql.c       9 Jan 2009 17:03:48 -0000
>> @@ -0,0 +1,11 @@
>> +--- src/cats/sql.c.orig     2009-01-09 12:01:38.100486989 -0500
>> ++++ src/cats/sql.c  2009-01-09 12:02:01.559498120 -0500
>> +@@ -759,7 +759,7 @@
>> +    if (mdb->lock.valid == RWLOCK_VALID) {
>> +       fprintf(fp, "\tRWLOCK=%p w_active=%i w_wait=%i\n", &mdb->lock,
>> mdb->lock.w_active, mdb->lock.w_wait);
>> + #ifndef HAVE_WIN32
>> +-      fprintf(fp, "\t\tthreadid=0x%x mutex=%p\n", (int)mdb-
>>
>>  >lock.writer_id, &mdb->lock.mutex);
>>
>> ++      fprintf(fp, "\t\tthreadid=0x%x mutex=%p\n", (pthread *)mdb-
>>
>>  >lock.writer_id, &mdb->lock.mutex);
>>
>> + #endif
>> +    }
>> + }
>> Index: files/patch-src-lib-jcr.c
>> ===================================================================
>> RCS file: files/patch-src-lib-jcr.c
>> diff -N files/patch-src-lib-jcr.c
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ files/patch-src-lib-jcr.c        9 Jan 2009 16:46:17 -0000
>> @@ -0,0 +1,11 @@
>> +--- src/lib/jcr.c.orig      2009-01-09 11:31:00.223575817 -0500
>> ++++ src/lib/jcr.c   2009-01-09 11:31:31.054591212 -0500
>> +@@ -1064,7 +1064,7 @@
>> +               jcr->use_count());
>> + #else
>> +       fprintf(fp, "\tuse_count=%i threadid=0x%x\n",
>> +-              jcr->use_count(), (int)jcr->my_thread_id);
>> ++              jcr->use_count(), (pthread *)jcr->my_thread_id);
>> + #endif
>> +       fprintf(fp, "\tJobType=%c JobLevel=%c\n",
>> +               jcr->get_JobType(), jcr->get_JobLevel());
> 
> 


------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to