Skip to content

Commit 409b38f

Browse files
committed
Fix TAS assembly stuff for Solaris/386. (I'm not in a position to
actually test this, but it couldn't be broken any worse than it was...)
1 parent ae169e8 commit 409b38f

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

src/include/storage/s_lock.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
6767
* Portions Copyright (c) 1994, Regents of the University of California
6868
*
69-
* $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.129 2004/09/02 17:10:58 tgl Exp $
69+
* $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.130 2004/09/24 00:21:29 tgl Exp $
7070
*
7171
*-------------------------------------------------------------------------
7272
*/
@@ -658,6 +658,18 @@ typedef unsigned char slock_t;
658658
#endif
659659

660660

661+
/* out-of-line assembler from src/backend/port/tas/*.s */
662+
663+
#if defined(__sun) && defined(__i386)
664+
/*
665+
* Solaris/386 (we only get here for non-gcc case)
666+
*/
667+
#define HAS_TEST_AND_SET
668+
669+
typedef unsigned char slock_t;
670+
#endif
671+
672+
661673
#endif /* !defined(HAS_TEST_AND_SET) */
662674

663675

src/template/solaris

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,21 @@ if test "$GCC" != yes ; then
33
CFLAGS="-O -v" # -v is like gcc -Wall
44
fi
55

6-
# Pick right test-and-set (TAS) code.
6+
# Pick right test-and-set (TAS) code. We need out-of-line assembler
7+
# when not using gcc.
78
case $host in
8-
sparc-*-solaris*) need_tas=yes; tas_file=solaris_sparc.s ;;
9-
i?86-*-solaris*) need_tas=yes; tas_file=solaris_i386.s ;;
9+
sparc-*-solaris*)
10+
if test "$GCC" != yes ; then
11+
need_tas=yes
12+
tas_file=solaris_sparc.s
13+
fi
14+
;;
15+
i?86-*-solaris*)
16+
if test "$GCC" != yes ; then
17+
need_tas=yes
18+
tas_file=solaris_i386.s
19+
fi
20+
;;
1021
esac
1122

1223
# -D_POSIX_PTHREAD_SEMANTICS enables 5-arg getpwuid_r, among other things

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy