]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
From: "Billy G. Allie" <Bill.Allie@mug.org>
authorMarc G. Fournier <scrappy@hub.org>
Sun, 1 Mar 1998 04:47:38 +0000 (04:47 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Sun, 1 Mar 1998 04:47:38 +0000 (04:47 +0000)
The following patches will allow postgreSQL 6.3 to compile and run on a
UNIXWARE 2.1.2 system with the native C compiler with the following library
change:

        The alloca function must be copied from the libucb.a archive and added
        to the libgen.a archive.

Also, the GNU flex program is needed to successfully build postgreSQL.

src/backend/port/dynloader/univel.c
src/backend/port/dynloader/univel.h
src/include/access/heapam.h
src/include/port/univel.h
src/include/storage/s_lock.h
src/template/univel

index d0cd246636e21bd525551ed83e12396f0eb4939e..98b6d61d30eba9faa0cff2ba670234c0f7187dac 100644 (file)
@@ -1,4 +1,4 @@
 /* Dummy file used for nothing at this point
  *
  * see univel.h
-  */\r
+ */
index 38e43833da0b5c8d5fca38d8ec1d7c5070f9b0b8..78222686fdf018cb9c5612c890388815bc3a13ea 100644 (file)
@@ -1,23 +1,23 @@
 /*-------------------------------------------------------------------------
  *
- * port-protos.h--
+ * univel.h--
  *       port-specific prototypes for Intel x86/UNIXWARE
  *
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * port-protos.h,v 1.2 1995/03/17 06:40:18 andrew Exp
+ * univel.h,v 1.2 1995/03/17 06:40:18 andrew Exp
  *
  *-------------------------------------------------------------------------
-  */\r
-#ifndef PORT_PROTOS_H\r
-#define PORT_PROTOS_H\r
-\r
-#include <dlfcn.h>\r
-#include "fmgr.h"                              /* for func_ptr */\r
-#include "utils/dynamic_loader.h"\r
-\r
- /* dynloader.c */\r
+  */
+#ifndef PORT_PROTOS_H
+#define PORT_PROTOS_H
+
+#include <dlfcn.h>
+#include "fmgr.h"                              /* for func_ptr */
+#include "utils/dynamic_loader.h"
+
+ /* dynloader.c */
 /*
  * Dynamic Loader on Intel x86/Intel SVR4.
  *
  * libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
  * library as the file to be dynamically loaded.
  *
-  */\r
-#define pg_dlopen(f)   dlopen(f,RTLD_LAZY)\r
-#define pg_dlsym               dlsym\r
-#define pg_dlclose             dlclose\r
-#define pg_dlerror             dlerror\r
-\r
-#endif /* PORT_PROTOS_H */\r
+  */
+#define pg_dlopen(f)   dlopen(f,RTLD_LAZY)
+#define pg_dlsym               dlsym
+#define pg_dlclose             dlclose
+#define pg_dlerror             dlerror
+
+#endif /* PORT_PROTOS_H */
index 7dc25337357f609ecc54f143f97e043eaabc0302..8e322b1d9157ff3100741d25672fe04e99a790d0 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: heapam.h,v 1.30 1998/02/26 04:40:05 momjian Exp $
+ * $Id: heapam.h,v 1.31 1998/03/01 04:46:56 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -88,6 +88,8 @@ typedef HeapAccessStatisticsData *HeapAccessStatistics;
  *
  * ----------------
  */
+#if !defined(USE_UNIVEL_CC)
+
 #define fastgetattr(tup, attnum, tupleDesc, isnull) \
 ( \
        AssertMacro((attnum) > 0) ? \
@@ -130,7 +132,57 @@ typedef HeapAccessStatisticsData *HeapAccessStatistics;
        ) \
 )
 
+#else /* !defined(USE_UNIVEL_CC) */
+
+extern Datum nocachegetattr(HeapTuple tup, int attnum,
+                                                TupleDesc att, bool *isnull);
+
+static Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
+                                                bool *isnull)
+{
+    return (
+               (attnum) > 0 ?
+               (
+                       ((isnull) ? (*(isnull) = false) : (dummyret)NULL),
+                       HeapTupleNoNulls(tup) ?
+                       (
+                               ((tupleDesc)->attrs[(attnum)-1]->attcacheoff != -1 ||
+                                (attnum) == 1) ?
+                               (
+                                       (Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]),
+                                               (char *) (tup) + (tup)->t_hoff +
+                                               (
+                                                       ((attnum) != 1) ?
+                                                               (tupleDesc)->attrs[(attnum)-1]->attcacheoff
+                                                       :
+                                                               0
+                                               )
+                                       )
+                               )
+                               :
+                                       nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
+                       )
+                       :
+                       (
+                               att_isnull((attnum)-1, (tup)->t_bits) ?
+                               (
+                                       ((isnull) ? (*(isnull) = true) : (dummyret)NULL),
+                                       (Datum)NULL
+                               )
+                               :
+                               (
+                                       nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
+                               )
+                       )
+               )
+               :
+               (
+                        (Datum)NULL
+               )
+       );
+}
 
+#endif
 
 /* ----------------
  *             heap_getattr
index a7daf59460de9af245a46b65f2b4686b5729daad..cd52bd76877bd06b2acd2e3bf8ff818445d8139d 100644 (file)
@@ -9,13 +9,14 @@
  * Define this if you are compiling with
  * the native UNIXWARE C compiler.
  ***************************************/
-#define USE_UNIVEL_CC_ASM
+#define USE_UNIVEL_CC
 typedef unsigned char slock_t;
 
 /***************************************************************
- * strcasecmp() is in c89, but is not in any include file :-(
+ * strcasecmp() is in c89.a. The following include will get the
+ * needed prototype. 
  ***************************************************************/
-int                    strcasecmp(char *, char *);
+#include <strings.h>
 
 #ifndef                        BIG_ENDIAN
 #define                        BIG_ENDIAN              4321
index f63a37193c7c6a3d50e2f4d005b6af8a40d0c883..89612c1b718b413933aa68da0e226dbab06671f1 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.27 1998/02/26 04:43:32 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.28 1998/03/01 04:47:24 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -305,21 +305,21 @@ tas_dummy()
 
 #if defined(NEED_I386_TAS_ASM)
 
-#if defined(USE_UNIVEL_CC_ASM)
+#if defined(USE_UNIVEL_CC)
 asm void
 S_LOCK(char *lval)
 {
-       %lab again;
+lab again;
 /* Upon entry, %eax will contain the pointer to the lock byte */
-       pushl % ebx
-               xchgl % eax, %ebx
-               movb $ - 1, %al
+       pushl %ebx
+       xchgl %eax, %ebx
+       movb $255, %al
 again:
        lock
-               xchgb % al, (%ebx)
-               cmpb $0, %al
-               jne again
-               popl % ebx
+       xchgb %al, (%ebx)
+       cmpb $0, %al
+       jne again
+       popl %ebx
 }
 
 #else
index 327769563cd55750835567b4f1497e0d97ba2195..21b85926638efe94c9cb006a79f2c135f0b69605 100644 (file)
@@ -5,6 +5,7 @@ SRCH_INC:
 SRCH_LIB:
 USE_LOCALE:no
 DLSUFFIX:.so
-YACC=/usr/ccs/bin/yacc
 YACC:yacc
+YFLAGS:-d
 CC:cc
+LIBS:-lc89