Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
FreeBSD 6.0 Port - Updated 12/09/05 Port and package made
anonuser:
I've sent mandrav an updated configure and bootstrap and make files to alleviate these problems.
He said thanks not sure if they ever made them in. Also made prefix more c99 happy. Taking out implicit casting which you had to do. Also the Pthread init was a bit off so I re did that. So what Im in the process of doing is making a patch set for each thing. Rather I was doing. SOmeone beat me to it and already submitted it to FreeBSD.
Over all I didn't need to change much code. CVS (SVN now) version had some make file issues for me, may have been fxied by now. But glad to see it working for you. I didn't bother with a screen shot because there's already a C::B SS in the gallery.
anonuser:
The new port was sent to pr and waiting on feedback.
Der Meister:
--- Quote from: anonuser on December 03, 2005, 02:37:48 am ---Also the Pthread init was a bit off so I re did that.
--- End quote ---
I think you mean line 225 with that. Before it was:
--- Code: ---static pthread_once_t br_thread_key_once = PTHREAD_ONCE_INIT;
--- End code ---
Now it is:
--- Code: ---static pthread_once_t br_thread_key_once = {0, (pthread_mutex_t)NULL};//PTHREAD_ONCE_INIT;
--- End code ---
I have no idea why this should be changed. Anyway, I am not a pthread expert so I assume you know what you are doing. But: This line seems to break the Linux-version:
--- Quote from: gcc3.4.4 ---prefix.cpp:225: error: no matching function for call to `pthread_mutex_t::._10(NULL)'
/usr/include/bits/pthreadtypes.h:89: note: candidates are: pthread_mutex_t::._10()
/usr/include/bits/pthreadtypes.h:89: note: pthread_mutex_t::._10(const pthread_mutex_t&)
prefix.cpp:225: error: initializer for scalar variable requires one element
--- End quote ---
Well, if I undo the change made in rev1482 to the old version (which even can be found in the manpage for pthread_once!) everything seems to be ok.
anonuser:
hrrm, odd, PTHREAD_ONCE_INIT is defined as follows in pthread.h
#define PTHREAD_NEEDS_INIT 0
#define PTHREAD_ONCE_INIT { PTHREAD_NEEDS_INIT, NULL }
I suppose I'll wrap in defines it for FreeBSD.
Der Meister:
At the moment I don't have access to a linux machine, so I can't check this. But from your quote and from the error message I got from gcc today I would assume that pthread_once_t is implemented differently on Linux and FreeBSD. This would declare the problems. But what is the problem with PTHREAD_ONCE_INIT on FreeBSD?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version