From f1ab71ec5f2614540587282bcaa4dad44a54efa7 Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Fri, 11 Sep 1998 16:56:24 +0000
Subject: [PATCH] The attached patches fix the following problems:

1.  The UnixWare tas macro was reformatted (by indent or it like?) which caused
    it to break.  The asm macro construct is very particular about the %mem
    construct -- it has to start in column 1.

2.  When compiling libpq++, g++ was used even if configure found the C++ com-
    piler to be CC.

3.  When compiling libpq++, '-Wno-error' was added to CXXFLAGS, even if the
    compiler wasn't g++.

Billy G. Allie
---
 src/configure.in                                 |  2 +-
 src/include/storage/s_lock.h                     | 11 ++++++-----
 src/interfaces/libpq++/{Makefile => Makefile.in} |  8 +++++++-
 src/tools/pgindent/README                        |  2 +-
 4 files changed, 15 insertions(+), 8 deletions(-)
 rename src/interfaces/libpq++/{Makefile => Makefile.in} (97%)

diff --git a/src/configure.in b/src/configure.in
index a893083c320..4a633a71f54 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -811,4 +811,4 @@ then
 	LDFLAGS="$ice_save_LDFLAGS"
 fi
 
-AC_OUTPUT(GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh interfaces/libpq/Makefile interfaces/libpgtcl/Makefile interfaces/ecpg/lib/Makefile include/version.h)
+AC_OUTPUT(GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh interfaces/libpq/Makefile interfaces/libpq++/Makefile interfaces/libpgtcl/Makefile interfaces/ecpg/lib/Makefile include/version.h)
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index a475d21274f..2a0c31cd9f2 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.45 1998/09/01 04:38:32 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.46 1998/09/11 16:56:20 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -198,13 +198,14 @@ tas(volatile slock_t *lock)
 asm int
 tas(slock_t *s_lock)
 {
-	%mem s_lock
-	pushl % ebx
+/* UNIVEL wants %mem in column 1, so we don't pg_indent this file */
+%mem s_lock
+	pushl %ebx
 	movl s_lock, %ebx
 	movl $255, %eax
 	lock
-	xchgb % al, (%ebx)
-	popl % ebx
+	xchgb %al, (%ebx)
+	popl %ebx
 }
 
 #endif	 /* USE_UNIVEL_CC */
diff --git a/src/interfaces/libpq++/Makefile b/src/interfaces/libpq++/Makefile.in
similarity index 97%
rename from src/interfaces/libpq++/Makefile
rename to src/interfaces/libpq++/Makefile.in
index 9ccbe946578..38c56c12a4c 100644
--- a/src/interfaces/libpq++/Makefile
+++ b/src/interfaces/libpq++/Makefile.in
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.20 1998/08/22 04:24:35 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile.in,v 1.1 1998/09/11 16:56:23 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -18,11 +18,17 @@ LIBPQHEADERDIR = $(SRCHEADERDIR)/libpq
 
 LIBNAME= libpq++
 
+CXX=@CXX@
+
 # We have to override -Werror, which makes warnings, fatal, because we
 # inevitably get the warning, "abstract declarator used as declaration"
 # because of our inclusion of c.h and we don't know how to stop that.
 
+ifeq ($(CXX), g++)
 CXXFLAGS= $(CFLAGS) -Wno-error
+else
+CXXFLAGS= $(CFLAGS)
+endif
 
 INCLUDE_OPT= \
              -I$(SRCDIR)/backend \
diff --git a/src/tools/pgindent/README b/src/tools/pgindent/README
index 8c95b6a1adf..d0f3324d6ce 100644
--- a/src/tools/pgindent/README
+++ b/src/tools/pgindent/README
@@ -3,7 +3,7 @@ This can format all PostgreSQL *.c and *.h files, excluding libpq++,
 
 On 09/06/1997, from the top directory, I ran:
 
-  find . -name '*.[ch]' -type f -print | grep -v '++' | grep -v '/odbc/' | xargs -n100 pgindent
+  find . -name '*.[ch]' -type f -print | egrep -v '++|/odbc/|s_lock.h' | xargs -n100 pgindent
 
 The stock BSD indent has two bugs.  First, a comment after the word 'else' 
 causes the rest of the file to be ignored.  Second, it silently ignores
-- 
GitLab