Peter Bierman writes:
> Here are patches to CVS top of tree that allow darwin to completely
> build and install. Unfortunately, the sem...() shim does not function
> correctly yet, so it's not stable enough to use.
We've been through this before. Newer Darwin kernels have semaphore
support, which means that you'll at least have to compensate for that. I
believe we agreed that semaphore support for older kernels would be
available as a patch.
> #include "postgres.h"
> #include "storage/ipc.h"
> #include "storage/proc.h"
> -#include <sys/sem.h>
> +//#include <sys/sem.h>
> +#include "sem.h"
No C++ comments.
> -void *pg_dlopen(const char *filename)
> +void *pg_dlopen(char *filename)
> +#if defined(darwin) && defined(__ppc__)
> +static void
> + __asm__(" \n\
> + .globl tas \n\
> + .globl _tas \n\
> +_tas: \n\
> +tas: \n\
> + lwarx r5,0,r3 \n\
> + cmpwi r5,0 \n\
> + bne fail \n\
> + addi r5,r5,1 \n\
> + stwcx. r5,0,r3 \n\
> + beq success \n\
> +fail: li r3,1 \n\
> + blr \n\
> +success: \n\
> + li r3,0 \n\
> + blr \n\
> + ");
> +#endif /* __ppc__ && darwin */
Here the question was why the existing powerpc code doesn't work. There
are only syntax differences. Any idea?
> +#if defined(darwin)
> +#include "../backend/port/darwin/sem.h"
This doesn't work. There's no guarantee that the source tree is the same
as the build tree.
> < CFLAGS=-O0
> > #CFLAGS=-O2
No commented out things. Either you take -02 or -O0 or you set CFLAGS to
something else, but it has to be set to something.
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/
In response to
pgsql-patches by date
|Next:||From: Peter Bierman||Date: 2000-11-29 22:21:03|
|Subject: Re: darwin pgsql patches|
|Previous:||From: Tom Lane||Date: 2000-11-29 16:05:54|
|Subject: Re: darwin pgsql patches |