OSDN Git Service

We have tested the patches on three platforms:
authorBruce Momjian <bruce@momjian.us>
Sun, 14 Mar 1999 16:03:33 +0000 (16:03 +0000)
committerBruce Momjian <bruce@momjian.us>
Sun, 14 Mar 1999 16:03:33 +0000 (16:03 +0000)
NetBSD/macppc
LinuxPPC
FreeBSD 2.2.6-RELEASE

All of them seem happy with the regression test. Note that, however,
compiling with optimization enabled on NetBSD/macppc causes an initdb
failure (other two platforms are ok). After checking the asm code, we
are suspecting that might be a compiler(egcs) bug.

Tatsuo Ishii

src/Makefile.shlib
src/backend/port/dynloader/bsd.c
src/backend/storage/buffer/s_lock.c
src/backend/utils/adt/dt.c
src/config.guess
src/configure.in
src/include/port/bsd.h
src/include/port/linux.h
src/include/utils/dt.h
src/makefiles/Makefile.bsd
src/test/regress/expected/euc_jp.out

index 7f1d083..c35bf8d 100644 (file)
@@ -6,7 +6,7 @@
 # Copyright (c) 1998, Regents of the University of California
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.6 1999/01/17 06:18:08 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.7 1999/03/14 16:02:57 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -73,7 +73,11 @@ ifeq ($(PORTNAME), bsd)
   ifdef BSD_SHLIB
     install-shlib-dep  := install-shlib
     shlib              := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
-    LDFLAGS_SL         := -x -Bshareable -Bforcearchive
+    ifdef ELF_SYSTEM
+      LDFLAGS_SL       := -x -Bshareable -soname $(shlib)
+    else
+      LDFLAGS_SL       := -x -Bshareable -Bforcearchive
+    endif
     CFLAGS             += $(CFLAGS_SL)
   endif
 endif
index 48d0d3c..c54b2e0 100644 (file)
@@ -79,6 +79,8 @@ BSD44_derived_dlsym(void *handle, const char *name)
 #if defined(__mips__) || (defined(__NetBSD__) && defined(vax))
        sprintf(error_message, "dlsym (%s) failed", name);
        return NULL;
+#elif defined(__ELF__)
+       return dlsym(handle, name);
 #else
        void       *vp;
        char            buf[BUFSIZ];
index 10b649f..788d67d 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.17 1999/02/13 23:18:02 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.18 1999/03/14 16:03:00 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -118,7 +118,7 @@ _success:                   \n\
 
 #endif  /* __m68k__ */
 
-#if defined(PPC)
+#if defined(__powerpc__)
 /* Note: need a nice gcc constrained asm version so it can be inlined */
 static void
 tas_dummy()
@@ -140,7 +140,7 @@ success:                    \n\
        ");
 }
 
-#endif  /* PPC */
+#endif  /* __powerpc__ */
 
 #if defined(__mips)
 static void
index a971e50..84411f2 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.65 1999/02/13 23:19:11 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.66 1999/03/14 16:03:04 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -4533,7 +4533,7 @@ EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str)
 }      /* EncodeTimeSpan() */
 
 
-#if defined(linux) && defined(PPC)
+#if defined(linux) && defined(__powerpc__)
 int
 datetime_is_epoch(double j)
 {
index 0db17ea..851ed5f 100755 (executable)
@@ -129,6 +129,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     mac68k:OpenBSD:*:*)
        echo m68k-apple-openbsd${UNAME_RELEASE}
        exit 0 ;;
+    macppc:NetBSD:*:*)
+       echo powerpc-apple-netbsd${UNAME_RELEASE}
+       exit 0;;
     powerpc:machten:*:*)
        echo powerpc-apple-machten${UNAME_RELEASE}
        exit 0 ;;
index cf1b969..11f7f1a 100644 (file)
@@ -22,7 +22,12 @@ case "$host_os" in
     bsdi*) os=bsdi need_tas=no ;;
  freebsd3*|freebsd4*) os=freebsd need_tas=no elf=yes ;;
  freebsd1*|freebsd2*) os=freebsd need_tas=no ;;
-  netbsd*|openbsd*) os=bsd need_tas=no ;;
+  netbsd*)
+       os=bsd need_tas=no
+       case "$host_cpu" in
+         powerpc) elf=yes ;;
+       esac ;;
+  openbsd*) os=bsd need_tas=no ;;
     dgux*) os=dgux need_tas=no ;;
      aix*) os=aix need_tas=no ;;
 nextstep*) os=nextstep need_tas=no ;;
index 4e754e7..cfd0d28 100644 (file)
 #define HAS_TEST_AND_SET
 #endif
 
+#if defined(__powerpc__)
+#define HAS_TEST_AND_SET
+typedef unsigned int slock_t;
+#endif
 #if defined(__mips__)
 /* #   undef HAS_TEST_AND_SET */
 #endif
+#if !defined(__powerpc__)
 typedef unsigned char slock_t;
+#endif
index 81169b2..da57b2b 100644 (file)
@@ -8,7 +8,7 @@
 #define USE_POSIX_TIME
 #define HAS_TEST_AND_SET
 
-#if defined(PPC)
+#if defined(__powerpc__)
 typedef unsigned int slock_t;
 
 #elif defined(__alpha)
@@ -34,6 +34,6 @@ typedef unsigned char slock_t;
 /* #define HAVE_SIGSETJMP 1 */
 #endif
 
-#if defined(PPC)
+#if defined(__powerpc__)
 #undef HAVE_INT_TIMEZONE
 #endif
index ff3ae46..024acb4 100644 (file)
@@ -8,7 +8,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: dt.h,v 1.37 1999/03/06 22:58:11 tgl Exp $
+ * $Id: dt.h,v 1.38 1999/03/14 16:03:16 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -228,7 +228,7 @@ typedef struct
 #define DATETIME_IS_NOEND(j)   (j == DT_NOEND)
 
 #define DATETIME_CURRENT(j)            {j = DT_CURRENT;}
-#if defined(linux) && defined(PPC)
+#if defined(linux) && defined(__powerpc__)
 extern int     datetime_is_current(double j);
 
 #define DATETIME_IS_CURRENT(j) datetime_is_current(j)
@@ -237,7 +237,7 @@ extern int  datetime_is_current(double j);
 #endif
 
 #define DATETIME_EPOCH(j)              {j = DT_EPOCH;}
-#if defined(linux) && defined(PPC)
+#if defined(linux) && defined(__powerpc__)
 extern int     datetime_is_epoch(double j);
 
 #define DATETIME_IS_EPOCH(j)   datetime_is_epoch(j)
index 1c17504..58df0e9 100644 (file)
@@ -1,4 +1,10 @@
+ifdef ELF_SYSTEM
+LDFLAGS += -Wl,-E
+endif
 %.so: %.o
+ifdef ELF_SYSTEM
+       $(LD) -x -Bshareable -o $@ $<
+else
        $(LD) -x -r -o $<.obj $<
        @echo building shared object $@
        @rm -f $@.pic
@@ -7,3 +13,4 @@
        @rm -f $@
        $(LD) -x -Bshareable -Bforcearchive \
          -o $@ $@.pic
+endif
index f976010..b0bdfba 100644 (file)
@@ -1,5 +1,5 @@
 QUERY: drop table ·×»»µ¡ÍѸì;
-ERROR:  Relation ·×»»µ¡ÍѸì Does Not Exist!
+ERROR:  Relation '·×»»µ¡ÍѸì' does not exist
 QUERY: create table ·×»»µ¡ÍѸì (ÍѸì text, Ê¬Îॳ¡¼¥É varchar, È÷¹Í1A¤À¤è char(16));
 QUERY: create index ·×»»µ¡ÍѸìindex1 on ·×»»µ¡ÍѸì using btree (ÍѸì);
 QUERY: create index ·×»»µ¡ÍѸìindex2 on ·×»»µ¡ÍѸì using hash (ʬÎॳ¡¼¥É);