From 58d1eeaafe9e534f7518f13b3560a66215eecf79 Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Thu, 18 Nov 1999 21:47:41 +0000
Subject: [PATCH] Fix for arm32 and fix for dbname with dash.

---
 src/bin/createdb/createdb.sh   | 4 ++--
 src/bin/destroydb/destroydb.sh | 4 ++--
 src/include/port/bsd.h         | 2 +-
 src/include/storage/s_lock.h   | 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/bin/createdb/createdb.sh b/src/bin/createdb/createdb.sh
index 5ee828660d3..df3f0c1d393 100644
--- a/src/bin/createdb/createdb.sh
+++ b/src/bin/createdb/createdb.sh
@@ -11,7 +11,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/createdb/Attic/createdb.sh,v 1.11 1998/09/03 02:12:14 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/createdb/Attic/createdb.sh,v 1.12 1999/11/18 21:47:37 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -111,7 +111,7 @@ else
 	fi
 fi
 
-psql $PASSWDOPT -tq $AUTHOPT $PGHOSTOPT $PGPORTOPT -c "create database $dbname $location $encoding" template1
+psql $PASSWDOPT -tq $AUTHOPT $PGHOSTOPT $PGPORTOPT -c "create database \"$dbname\" $location $encoding" template1
 
 if [ $? -ne 0 ]; then
 	echo "$CMDNAME: database creation failed on $dbname."
diff --git a/src/bin/destroydb/destroydb.sh b/src/bin/destroydb/destroydb.sh
index 92ee73a3906..71bafc8270b 100644
--- a/src/bin/destroydb/destroydb.sh
+++ b/src/bin/destroydb/destroydb.sh
@@ -11,7 +11,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/destroydb/Attic/destroydb.sh,v 1.8 1997/06/02 02:53:00 scrappy Exp $
+#    $Header: /cvsroot/pgsql/src/bin/destroydb/Attic/destroydb.sh,v 1.9 1999/11/18 21:47:37 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -75,7 +75,7 @@ fi
 
 if [ "$answer" = y ]
 then
-  psql -tq $AUTHOPT $PGHOSTOPT $PGPORTOPT -c "drop database $dbname" template1
+  psql -tq $AUTHOPT $PGHOSTOPT $PGPORTOPT -c "drop database \"$dbname\"" template1
     if [ $? -ne 0 ]
        then echo "$CMDNAME: database destroy failed on $dbname."
        exit 1
diff --git a/src/include/port/bsd.h b/src/include/port/bsd.h
index c3a6adb9538..8406844d079 100644
--- a/src/include/port/bsd.h
+++ b/src/include/port/bsd.h
@@ -24,7 +24,7 @@
 #define HAS_TEST_AND_SET
 #endif
 
-#if defined(__arm32__)
+#if defined(__arm__)
 #define HAS_TEST_AND_SET
 #endif
 
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index 04caa52960a..e23e2076e4b 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.65 1999/11/06 01:55:43 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.66 1999/11/18 21:47:41 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -124,7 +124,7 @@ __asm__("lock; xchgb %0,%1": "=q"(_res), "=m"(*lock):"0"(_res));
 
 
 
-#if defined(__arm32__) || defined(__arm__)
+#if defined(__arm__) || defined(__arm__)
 #define TAS(lock) tas(lock)
 
 static __inline__ int
@@ -136,7 +136,7 @@ __asm__("swpb %0, %0, [%3]": "=r"(_res), "=m"(*lock):"0"(_res), "r" (lock));
         return (int) _res;
 }
 
-#endif   /* __arm32__ */
+#endif   /* __arm__ */
 
 
 
-- 
GitLab