1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Implement compiler #error if spinlock code not found, add configure flag

to bypass the error, --without-spinlocks.
This commit is contained in:
Bruce Momjian
2003-09-12 16:10:27 +00:00
parent 69a46e9ce1
commit 06e3ec7a54
5 changed files with 80 additions and 6 deletions

View File

@ -357,6 +357,9 @@
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have spinlocks. */
#undef HAVE_SPINLOCKS
/* Define to 1 if you have the `srandom' function. */
#undef HAVE_SRANDOM

View File

@ -63,7 +63,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: s_lock.h,v 1.112 2003/08/04 02:40:15 momjian Exp $
* $Id: s_lock.h,v 1.113 2003/09/12 16:10:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -537,7 +537,11 @@ extern slock_t wc_tas(volatile slock_t *lock);
#else /* !HAS_TEST_AND_SET */
#else /* HAS_TEST_AND_SET */
#ifdef HAVE_SPINLOCKS
#error This platform does not support native spinlocks. To continue the compile, rerun configure using --without-spinlocks. However, performance will be poor. Please report this to pgsql-bugs@postgresql.org.
#endif
/*
* Fake spinlock implementation using semaphores --- slow and prone