Support Sun's compiler on SunOS4 (a/k/a Solaris 9). Per [email protected]
authorTom Lane
Wed, 29 Dec 2004 23:47:40 +0000 (23:47 +0000)
committerTom Lane
Wed, 29 Dec 2004 23:47:40 +0000 (23:47 +0000)
src/backend/storage/lmgr/s_lock.c
src/template/sunos4

index 56af61db68a263cf7a737b130010afe9e93a82d6..80693a541916e754243413fa7e80b5fa8bf914d7 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.33 2004/12/18 22:12:52 momjian Exp $
+ *   $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.34 2004/12/29 23:47:38 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -240,8 +240,15 @@ static void
 tas_dummy()                        /* really means: extern int tas(slock_t
                                 * *lock); */
 {
+
+#ifdef SUNOS4_CC
    asm(".seg \"data\"");
    asm(".seg \"text\"");
+#else
+   asm(".section \"data\"");
+   asm(".section \"text\"");
+#endif
+
    asm("_tas:");
 
    /*
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..782fe6ee6c728d955276b3e2eaf340dce7b936fc 100644 (file)
@@ -0,0 +1,7 @@
+if test "$GCC" != yes ; then
+  CC="$CC -Xa"         # relaxed ISO C mode
+  CFLAGS="-v -DSUNOS4_CC"  # -v is like gcc -Wall
+  if test "$enable_debug" != yes; then
+    CFLAGS="$CFLAGS -O"        # any optimization breaks debug
+  fi
+fi