Re: Win32 tablespace - Mailing list pgsql-patches
From | Bruce Momjian |
---|---|
Subject | Re: Win32 tablespace |
Date | |
Msg-id | 200408080359.i783xPk25190@candle.pha.pa.us Whole thread Raw |
In response to | Re: Win32 tablespace (markir@coretech.co.nz) |
Responses |
Re: Win32 tablespace
|
List | pgsql-patches |
OK, I have just applied a patch to src/timezone/Makefile which will fix this by compiling dirmod.c specially like we do in other Makefiles. Patch attached. --------------------------------------------------------------------------- markir@coretech.co.nz wrote: > I get a build failure (win 2000 pro): > > gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations > zic.o ialloc.o scheck.o localtime.o -L../../src/port -lpgport -lwsock32 -lm > -lws2_32 -o zic.exe > ../../src/port/libpgport.a(dirmod.o)(.text+0xc6):dirmod.c: undefined reference > to `pgwin32_backend_usleep' > ../../src/port/libpgport.a(dirmod.o)(.text+0xe4):dirmod.c: undefined reference > to `errstart' > ../../src/port/libpgport.a(dirmod.o)(.text+0xf2):dirmod.c: undefined reference > to `elog_finish' > ../../src/port/libpgport.a(dirmod.o)(.text+0x11d):dirmod.c: undefined reference > to `errstart' > ../../src/port/libpgport.a(dirmod.o)(.text+0x12b):dirmod.c: undefined reference > to `elog_finish' > ../../src/port/libpgport.a(dirmod.o)(.text+0x1c3):dirmod.c: undefined reference > to `pgwin32_backend_usleep' > ../../src/port/libpgport.a(dirmod.o)(.text+0x1e1):dirmod.c: undefined reference > to `errstart' > ../../src/port/libpgport.a(dirmod.o)(.text+0x1f1):dirmod.c: undefined reference > to `elog_finish' > ../../src/port/libpgport.a(dirmod.o)(.text+0x21c):dirmod.c: undefined reference > to `errstart' > ../../src/port/libpgport.a(dirmod.o)(.text+0x22c):dirmod.c: undefined reference > to `elog_finish' > ../../src/port/libpgport.a(dirmod.o)(.text+0x459):dirmod.c: undefined reference > to `errstart' > ../../src/port/libpgport.a(dirmod.o)(.text+0x4aa):dirmod.c: undefined reference > to `errmsg' > ../../src/port/libpgport.a(dirmod.o)(.text+0x4b4):dirmod.c: undefined reference > to `errcode_for_file_access' > ../../src/port/libpgport.a(dirmod.o)(.text+0x4bc):dirmod.c: undefined reference > to `errfinish' > ../../src/port/libpgport.a(dirmod.o)(.text+0x51a):dirmod.c: undefined reference > to `pfree' > ../../src/port/libpgport.a(dirmod.o)(.text+0x5ea):dirmod.c: undefined reference > to `_imp__CurrentMemoryContext' > ../../src/port/libpgport.a(dirmod.o)(.text+0x5f2):dirmod.c: undefined reference > to `MemoryContextAlloc' > ../../src/port/libpgport.a(dirmod.o)(.text+0x64d):dirmod.c: undefined reference > to `_imp__CurrentMemoryContext' > ../../src/port/libpgport.a(dirmod.o)(.text+0x656):dirmod.c: undefined reference > to `MemoryContextStrdup' > ../../src/port/libpgport.a(dirmod.o)(.text+0x50a):dirmod.c: undefined reference > to `pfree' > make[2]: *** [zic] Error 1 > make[2]: Leaving directory > `/home/Administrator/develop/c/postgresql-8.0devel/src/timezone' > make[1]: *** [all] Error 2 > make[1]: Leaving directory > `/home/Administrator/develop/c/postgresql-8.0devel/src' > make: *** [all] Error 2 > > > Quoting Bruce Momjian <pgman@candle.pha.pa.us>: > > > > OK, got them all. Thanks. Patch attached. > > > > Would someone retest on Win32? > > > > --------------------------------------------------------------------------- > > > > Andreas Pflug wrote: > > > Bruce Momjian wrote: > > > > OK, applied. I moved the funciton into port/dirmod.c and cleaned up the > > > > interface for Win32. > > > > > > > > Would someone test this on Win32 in case I broke something? > > > > > > Yes, something's broken, see patch. > > > > > > Second, HAVE_SYMLINK must be defined somewhere (configure?). > > > > > > Third, a junction is a directory, not a file, so DROP tablespace must > > > use rmdir, not unlink to remove the junction; see my original patch. > > > > > > Regards, > > > Andreas > > > > > > > > > > > > > > > > ---------------------------(end of broadcast)--------------------------- > > > TIP 2: you can get off all lists at once with the unregister command > > > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > > > > -- > > Bruce Momjian | http://candle.pha.pa.us > > pgman@candle.pha.pa.us | (610) 359-1001 > > + If your life is a hard drive, | 13 Roberts Road > > + Christ can be your backup. | Newtown Square, Pennsylvania 19073 > > > > > > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 Index: Makefile =================================================================== RCS file: /cvsroot/pgsql-server/src/timezone/Makefile,v retrieving revision 1.12 retrieving revision 1.13 diff -c -c -r1.12 -r1.13 *** Makefile 28 May 2004 03:53:33 -0000 1.12 --- Makefile 8 Aug 2004 03:57:35 -0000 1.13 *************** *** 13,19 **** include $(top_builddir)/src/Makefile.global # files to build into backend ! OBJS= localtime.o strftime.o pgtz.o # files needed to build zic utility program ZICOBJS= zic.o ialloc.o scheck.o localtime.o --- 13,19 ---- include $(top_builddir)/src/Makefile.global # files to build into backend ! OBJS= localtime.o strftime.o pgtz.o dirmod.o # files needed to build zic utility program ZICOBJS= zic.o ialloc.o scheck.o localtime.o *************** *** 31,36 **** --- 31,39 ---- zic: $(ZICOBJS) $(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o $@$(X) + dirmod.c: % : $(top_srcdir)/src/port/% + rm -f $@ && $(LN_S) $< . + install: all installdirs ./zic -d $(DESTDIR)$(datadir)/timezone $(TZDATAFILES) *************** *** 38,41 **** $(mkinstalldirs) $(DESTDIR)$(datadir) clean distclean maintainer-clean: ! rm -f SUBSYS.o zic $(OBJS) $(ZICOBJS) --- 41,44 ---- $(mkinstalldirs) $(DESTDIR)$(datadir) clean distclean maintainer-clean: ! rm -f SUBSYS.o zic $(OBJS) $(ZICOBJS) dirmod.c
pgsql-patches by date: