patch for darwin/macosx-publicbeta - Mailing list pgsql-patches

From Peter Bierman
Subject patch for darwin/macosx-publicbeta
Date
Msg-id 200011140924.eAE9Otm28273@squee.sfgoth.com
Whole thread Raw
Responses Re: patch for darwin/macosx-publicbeta
Re: patch for darwin/macosx-publicbeta
List pgsql-patches
Follows is a tiny patch to make top of tree compile up to the IPC section
on Mac OS X Public Beta. I have not yet chased down what will be needed for
IPC, but this patch corrects a incorrect return type in the dyloader code
to match how the qnx and hpux files use PGFunction. This also fixes the
Makefile to use a tab instead of 8 spaces. (please make sure it is patched
as a tab!)

Index: src/makefiles/Makefile.darwin
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/makefiles/Makefile.darwin,v
retrieving revision 1.1
diff -u -r1.1 Makefile.darwin
--- src/makefiles/Makefile.darwin       2000/10/31 19:55:19     1.1
+++ src/makefiles/Makefile.darwin       2000/11/14 09:15:13
@@ -4,4 +4,4 @@
 CFLAGS_SL = -bundle -undefined suppress

 %.so: %.o
-        $(CC) $(CFLAGS) $(CFLAGS_SL) -o $@ $<
+       $(CC) $(CFLAGS) $(CFLAGS_SL) -o $@ $<


Index: src/backend/port/dynloader/darwin.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/port/dynloader/darwin.c,v
retrieving revision 1.2
diff -u -r1.2 darwin.c
--- src/backend/port/dynloader/darwin.c 2000/11/09 19:00:50     1.2
+++ src/backend/port/dynloader/darwin.c 2000/11/14 09:15:11
@@ -7,6 +7,9 @@
  */

 #include <mach-o/dyld.h>
+#include "c.h"
+#include "postgres_ext.h"
+#include "utils/palloc.h"
 #include "dynloader.h"

 void *pg_dlopen(const char *filename)
@@ -25,7 +28,7 @@
        return;
 }

-PGFunction *pg_dlsym(void *handle, const char *funcname)
+PGFunction pg_dlsym(void *handle, const char *funcname)
 {
        NSSymbol symbol;
        char *symname = (char*)malloc(strlen(funcname)+2);
@@ -33,7 +36,7 @@
        sprintf(symname, "_%s", funcname);
        symbol = NSLookupAndBindSymbol(symname);
        free(symname);
-       return (PGFunction *) NSAddressOfSymbol(symbol);
+       return (PGFunction) NSAddressOfSymbol(symbol);
 }

 const char *pg_dlerror(void)
eturn (PGFunction) NSAddressOfSymbol(symbol);
 }

 const char *pg_dlerror(void)



Since I am not subscribed to this list, please send replies to pmb@mac.com

-pmb

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [ANNOUNCE] PyGreSQL 3.1 released
Next
From: Alfred Perlstein
Date:
Subject: got Postgresql working on FreeBSD-alpha