Re: darwin pgsql patches

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: darwin pgsql patches
Дата
Msg-id Pine.LNX.4.21.0011291723070.796-100000@peter.localdomain
обсуждение исходный текст
Ответ на darwin pgsql patches  (Peter Bierman <bierman@apple.com>)
Ответы Re: darwin pgsql patches  (Peter Bierman <bierman@apple.com>)
Re: darwin pgsql patches  (Peter Bierman <bierman@apple.com>)
Список pgsql-patches
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)

Why?

> +#if defined(darwin) && defined(__ppc__)
> +static void
> +tas_dummy()
> +{
> +       __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"
> +#endif

This doesn't work.  There's no guarantee that the source tree is the same
as the build tree.


> 4c6,7
> < 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@gmx.net       http://yi.org/peter-e/


В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: darwin pgsql patches
Следующее
От: Peter Bierman
Дата:
Сообщение: Re: darwin pgsql patches