35 messages in com.mysql.lists.bugsRe: compile failure with patch BSD/OS...
FromSent OnAttachments
md...@nyvlem.mine.nu30 Jul 2002 06:14 
Sinisa Milivojevic30 Jul 2002 06:29 
Melvyn Sopacua30 Jul 2002 07:40 
Sinisa Milivojevic30 Jul 2002 08:09 
Melvyn Sopacua30 Jul 2002 08:15 
Melvyn Sopacua30 Jul 2002 09:26 
Sinisa Milivojevic31 Jul 2002 03:28 
Melvyn Sopacua31 Jul 2002 07:28 
Sinisa Milivojevic31 Jul 2002 07:35 
Melvyn Sopacua31 Jul 2002 08:06 
Sinisa Milivojevic31 Jul 2002 08:28 
Melvyn Sopacua31 Jul 2002 10:36 
Melvyn Sopacua01 Aug 2002 08:09 
Sinisa Milivojevic01 Aug 2002 08:26 
Melvyn Sopacua05 Aug 2002 13:47 
Peter Zaitsev05 Aug 2002 23:53 
Michael Widenius06 Aug 2002 01:07 
Michael Widenius06 Aug 2002 01:12 
Melvyn Sopacua06 Aug 2002 01:45 
Peter Zaitsev06 Aug 2002 02:05 
Melvyn Sopacua06 Aug 2002 02:39 
Sinisa Milivojevic06 Aug 2002 05:10 
Peter Zaitsev07 Aug 2002 01:19 
Melvyn Sopacua07 Aug 2002 02:06 
Peter Zaitsev07 Aug 2002 02:53 
Melvyn Sopacua07 Aug 2002 05:12 
Peter Zaitsev08 Aug 2002 01:10 
Melvyn Sopacua08 Aug 2002 09:53 
Melvyn Sopacua09 Aug 2002 00:59 
Michael Widenius17 Aug 2002 02:48 
Melvyn Sopacua17 Aug 2002 11:59 
Michael Widenius18 Aug 2002 06:52 
Melvyn Sopacua18 Aug 2002 10:39 
Michael Widenius20 Aug 2002 01:05 
Melvyn Sopacua06 Sep 2002 16:46 
Subject:Re: compile failure with patch BSD/OS 4.1
From:Melvyn Sopacua (md@nyvlem.mine.nu)
Date:09/06/2002 04:46:24 PM
List:com.mysql.lists.bugs

On Tue, 6 Aug 2002, Michael Widenius wrote:

MW>>>Date: Tue, 6 Aug 2002 11:12:38 +0300 MW>>>From: Michael Widenius <mon@mysql.com> MW>>>To: Melvyn Sopacua <md@nyvlem.mine.nu> MW>>>Cc: Sinisa Milivojevic <sin@mysql.com>, bu@lists.mysql.com MW>>>Subject: Re: compile failure with patch BSD/OS 4.1 MW>>> MW>>> MW>>>Hi! MW>>> MW>>>>>>>> "Melvyn" == Melvyn Sopacua <md@nyvlem.mine.nu> writes: MW>>> MW>>>Melvyn> On Wed, 31 Jul 2002, Sinisa Milivojevic wrote: MW>>>SM> OK, then please try this : MW>>>SM> MW>>>SM> ..... MW>>>SM> MW>>>SM> #ifdef HAVE_SEMAPHORE_H MW>>>SM> #include <semaphore.h> MW>>>SM> #else MW>>>SM> #ifdef __bsdi__ MW>>>SM> #include <sys/errno.h> MW>>>SM> #else MW>>>SM> #ifdef __WIN__ MW>>>SM> typedef HANDLE sem_t; MW>>>SM> #else MW>>>SM> typedef struct { MW>>>SM> pthread_mutex_t mutex; MW>>>SM> pthread_cond_t cond; MW>>>SM> uint count; MW>>>SM> } sem_t; MW>>>SM> #endif MW>>>SM> #endif MW>>> MW>>>Melvyn> Yes. That's compiling nicely. MW>>>Melvyn> Do you know of anything I should test, that it's not only compiling
but MW>>>Melvyn> also working correctly? MW>>>Melvyn> Then let me know. MW>>> MW>>>First, the original error was probably because my_semaphore.c didn't MW>>>contain an #include <errno.h> directive. (I have now fixed this in MW>>>4.0.3)

Correct - that's actually all that was needed.

MW>>> MW>>>The above patch is quite strange as the main thing it does is disables MW>>>our definition of sem_t, but my_semaphore.cc still will use it's own MW>>>version of the semaphore code (which is not a good idea).

Agreed. Especially since struct sem_t is not in <semaphore.h>, but <sys/semaphore.h>.

MW>>> MW>>>I have now reverted this patch until I understand what is going on. MW>>>

The combination/revert/semi-patch in 4.0.3 resulted in a non working source.

MW>>>Melvyn, is it possible to get a temporary access to your server to MW>>>check this out ?

I have sent details regarding that. If you need me to send them again, let me know, but I'll sum it up here (also applies to BSD/OS 4.2):

* Semaphore functions are in sys/sem.h and sys/semaphore.h * There's a ocmment in the sys/semaphore.h header, that explains the differences in implementation: /* * XXX NOTE: We expect to switch to a POSIX-style mutex interface shortly. */

* The current sem_t struct is defined as:

typedef struct semaphore { u_short spins; /* times to spin before blocking */ u_short want; /* want flag */ u_char lock; /* lock */ } sem_t;

* The only sem_ functions defined in sys/semaphore.h are: int sem_lock __P((sem_t *)); int sem_wakeup __P((sem_t *));

Hope this helps.