mirror of
https://github.com/postgres/postgres.git
synced 2026-04-15 22:10:45 -04:00
Assume "inline" keyword is available.
This has been a keyword since C99, and we now require C11, so we no longer need to use __inline__ or to check for it at configure time. Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/aZdGbDaV4_yKCMc-%40nathan
This commit is contained in:
parent
6e466e1e83
commit
aa71a35a40
5 changed files with 13 additions and 62 deletions
42
configure
vendored
42
configure
vendored
|
|
@ -14741,48 +14741,6 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
|
|||
presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
|
||||
$as_echo_n "checking for inline... " >&6; }
|
||||
if ${ac_cv_c_inline+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_cv_c_inline=no
|
||||
for ac_kw in inline __inline__ __inline; do
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#ifndef __cplusplus
|
||||
typedef int foo_t;
|
||||
static $ac_kw foo_t static_foo () {return 0; }
|
||||
$ac_kw foo_t foo () {return 0; }
|
||||
#endif
|
||||
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
ac_cv_c_inline=$ac_kw
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
test "$ac_cv_c_inline" != no && break
|
||||
done
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
|
||||
$as_echo "$ac_cv_c_inline" >&6; }
|
||||
|
||||
case $ac_cv_c_inline in
|
||||
inline | yes) ;;
|
||||
*)
|
||||
case $ac_cv_c_inline in
|
||||
no) ac_val=;;
|
||||
*) ac_val=$ac_cv_c_inline;;
|
||||
esac
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#ifndef __cplusplus
|
||||
#define inline $ac_val
|
||||
#endif
|
||||
_ACEOF
|
||||
;;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C printf format archetype" >&5
|
||||
$as_echo_n "checking for C printf format archetype... " >&6; }
|
||||
if ${pgac_cv_printf_archetype+:} false; then :
|
||||
|
|
|
|||
|
|
@ -1712,7 +1712,6 @@ fi
|
|||
|
||||
m4_defun([AC_PROG_CC_STDC], []) dnl We don't want that.
|
||||
AC_C_BIGENDIAN
|
||||
AC_C_INLINE
|
||||
PGAC_PRINTF_ARCHETYPE
|
||||
PGAC_CXX_PRINTF_ARCHETYPE
|
||||
PGAC_C_STATEMENT_EXPRESSIONS
|
||||
|
|
|
|||
|
|
@ -780,12 +780,6 @@
|
|||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
/* Define to keyword to use for C99 restrict support, or to nothing if not
|
||||
supported */
|
||||
#undef pg_restrict
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ typedef struct pg_atomic_uint64
|
|||
*/
|
||||
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
|
||||
#define PG_HAVE_SPIN_DELAY
|
||||
static __inline__ void
|
||||
static inline void
|
||||
pg_spin_delay_impl(void)
|
||||
{
|
||||
__asm__ __volatile__(" rep; nop \n");
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ typedef unsigned char slock_t;
|
|||
|
||||
#define TAS(lock) tas(lock)
|
||||
|
||||
static __inline__ int
|
||||
static inline int
|
||||
tas(volatile slock_t *lock)
|
||||
{
|
||||
slock_t _res = 1;
|
||||
|
|
@ -164,7 +164,7 @@ tas(volatile slock_t *lock)
|
|||
|
||||
#define SPIN_DELAY() spin_delay()
|
||||
|
||||
static __inline__ void
|
||||
static inline void
|
||||
spin_delay(void)
|
||||
{
|
||||
/*
|
||||
|
|
@ -215,7 +215,7 @@ typedef unsigned char slock_t;
|
|||
*/
|
||||
#define TAS_SPIN(lock) (*(lock) ? 1 : TAS(lock))
|
||||
|
||||
static __inline__ int
|
||||
static inline int
|
||||
tas(volatile slock_t *lock)
|
||||
{
|
||||
slock_t _res = 1;
|
||||
|
|
@ -231,7 +231,7 @@ tas(volatile slock_t *lock)
|
|||
|
||||
#define SPIN_DELAY() spin_delay()
|
||||
|
||||
static __inline__ void
|
||||
static inline void
|
||||
spin_delay(void)
|
||||
{
|
||||
/*
|
||||
|
|
@ -259,7 +259,7 @@ spin_delay(void)
|
|||
|
||||
typedef int slock_t;
|
||||
|
||||
static __inline__ int
|
||||
static inline int
|
||||
tas(volatile slock_t *lock)
|
||||
{
|
||||
return __sync_lock_test_and_set(lock, 1);
|
||||
|
|
@ -277,7 +277,7 @@ tas(volatile slock_t *lock)
|
|||
|
||||
#define SPIN_DELAY() spin_delay()
|
||||
|
||||
static __inline__ void
|
||||
static inline void
|
||||
spin_delay(void)
|
||||
{
|
||||
/*
|
||||
|
|
@ -302,7 +302,7 @@ typedef unsigned int slock_t;
|
|||
|
||||
#define TAS(lock) tas(lock)
|
||||
|
||||
static __inline__ int
|
||||
static inline int
|
||||
tas(volatile slock_t *lock)
|
||||
{
|
||||
int _res = 0;
|
||||
|
|
@ -331,7 +331,7 @@ typedef unsigned char slock_t;
|
|||
|
||||
#define TAS(lock) tas(lock)
|
||||
|
||||
static __inline__ int
|
||||
static inline int
|
||||
tas(volatile slock_t *lock)
|
||||
{
|
||||
slock_t _res;
|
||||
|
|
@ -416,7 +416,7 @@ typedef unsigned int slock_t;
|
|||
* But if the spinlock is in ordinary memory, we can use lwsync instead for
|
||||
* better performance.
|
||||
*/
|
||||
static __inline__ int
|
||||
static inline int
|
||||
tas(volatile slock_t *lock)
|
||||
{
|
||||
slock_t _t;
|
||||
|
|
@ -482,7 +482,7 @@ typedef unsigned int slock_t;
|
|||
#define MIPS_SET_MIPS2
|
||||
#endif
|
||||
|
||||
static __inline__ int
|
||||
static inline int
|
||||
tas(volatile slock_t *lock)
|
||||
{
|
||||
volatile slock_t *_l = lock;
|
||||
|
|
@ -544,7 +544,7 @@ do \
|
|||
|
||||
typedef int slock_t;
|
||||
|
||||
static __inline__ int
|
||||
static inline int
|
||||
tas(volatile slock_t *lock)
|
||||
{
|
||||
return __sync_lock_test_and_set(lock, 1);
|
||||
|
|
@ -559,7 +559,7 @@ tas(volatile slock_t *lock)
|
|||
|
||||
typedef char slock_t;
|
||||
|
||||
static __inline__ int
|
||||
static inline int
|
||||
tas(volatile slock_t *lock)
|
||||
{
|
||||
return __sync_lock_test_and_set(lock, 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue