From: | Peter Bierman <pmb(at)squee(dot)sfgoth(dot)com> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | patch for darwin/macosx-publicbeta |
Date: | 2000-11-14 09:24:55 |
Message-ID: | 200011140924.eAE9Otm28273@squee.sfgoth.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)mac(dot)com
-pmb
From | Date | Subject | |
---|---|---|---|
Next Message | Alfred Perlstein | 2000-11-14 09:52:20 | got Postgresql working on FreeBSD-alpha |
Previous Message | Tatsuo Ishii | 2000-11-14 05:54:34 | Re: [PATCHES] A Patch for MIC to EUC_TW code converting in mbsupport |