Commit f46baf60 authored by Alvaro Herrera's avatar Alvaro Herrera

Rename USE_INLINE to PG_USE_INLINE

The former name was too likely to conflict with symbols from external
headers; and, as seen in recent buildfarm failures in member spoonbill,
it has now happened at least in plpython.
parent 0b77aeba
...@@ -20,7 +20,7 @@ fi])# PGAC_C_SIGNED ...@@ -20,7 +20,7 @@ fi])# PGAC_C_SIGNED
# PGAC_C_INLINE # PGAC_C_INLINE
# ------------- # -------------
# Check if the C compiler understands inline functions. # Check if the C compiler understands inline functions.
# Defines: inline, USE_INLINE # Defines: inline, PG_USE_INLINE
AC_DEFUN([PGAC_C_INLINE], AC_DEFUN([PGAC_C_INLINE],
[AC_C_INLINE [AC_C_INLINE
AC_CACHE_CHECK([for quiet inline (no complaint if unreferenced)], pgac_cv_c_inline_quietly, AC_CACHE_CHECK([for quiet inline (no complaint if unreferenced)], pgac_cv_c_inline_quietly,
...@@ -33,7 +33,7 @@ AC_CACHE_CHECK([for quiet inline (no complaint if unreferenced)], pgac_cv_c_inli ...@@ -33,7 +33,7 @@ AC_CACHE_CHECK([for quiet inline (no complaint if unreferenced)], pgac_cv_c_inli
ac_c_werror_flag=$pgac_c_inline_save_werror ac_c_werror_flag=$pgac_c_inline_save_werror
fi]) fi])
if test "$pgac_cv_c_inline_quietly" != no; then if test "$pgac_cv_c_inline_quietly" != no; then
AC_DEFINE_UNQUOTED([USE_INLINE], 1, AC_DEFINE_UNQUOTED([PG_USE_INLINE], 1,
[Define to 1 if "static inline" works without unwanted warnings from ] [Define to 1 if "static inline" works without unwanted warnings from ]
[compilations where static inline functions are defined but not called.]) [compilations where static inline functions are defined but not called.])
fi fi
......
...@@ -15182,7 +15182,7 @@ $as_echo "$pgac_cv_c_inline_quietly" >&6; } ...@@ -15182,7 +15182,7 @@ $as_echo "$pgac_cv_c_inline_quietly" >&6; }
if test "$pgac_cv_c_inline_quietly" != no; then if test "$pgac_cv_c_inline_quietly" != no; then
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define USE_INLINE 1 #define PG_USE_INLINE 1
_ACEOF _ACEOF
fi fi
......
...@@ -758,13 +758,13 @@ typedef NameData *Name; ...@@ -758,13 +758,13 @@ typedef NameData *Name;
* definitions are pulled in by the .c file as regular (not inline) symbols. * definitions are pulled in by the .c file as regular (not inline) symbols.
* *
* The header must also declare the functions' prototypes, protected by * The header must also declare the functions' prototypes, protected by
* !USE_INLINE. * !PG_USE_INLINE.
*/ */
#ifdef USE_INLINE #ifdef PG_USE_INLINE
#define STATIC_IF_INLINE static inline #define STATIC_IF_INLINE static inline
#else #else
#define STATIC_IF_INLINE #define STATIC_IF_INLINE
#endif /* USE_INLINE */ #endif /* PG_USE_INLINE */
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* Section 7: random stuff * Section 7: random stuff
......
...@@ -75,12 +75,12 @@ struct ListCell ...@@ -75,12 +75,12 @@ struct ListCell
* if supported by the compiler, or as regular functions otherwise. * if supported by the compiler, or as regular functions otherwise.
* See STATIC_IF_INLINE in c.h. * See STATIC_IF_INLINE in c.h.
*/ */
#ifndef USE_INLINE #ifndef PG_USE_INLINE
extern ListCell *list_head(const List *l); extern ListCell *list_head(const List *l);
extern ListCell *list_tail(List *l); extern ListCell *list_tail(List *l);
extern int list_length(const List *l); extern int list_length(const List *l);
#endif /* USE_INLINE */ #endif /* PG_USE_INLINE */
#if defined(USE_INLINE) || defined(PG_LIST_INCLUDE_DEFINITIONS) #if defined(PG_USE_INLINE) || defined(PG_LIST_INCLUDE_DEFINITIONS)
STATIC_IF_INLINE ListCell * STATIC_IF_INLINE ListCell *
list_head(const List *l) list_head(const List *l)
{ {
...@@ -98,7 +98,7 @@ list_length(const List *l) ...@@ -98,7 +98,7 @@ list_length(const List *l)
{ {
return l ? l->length : 0; return l ? l->length : 0;
} }
#endif /* USE_INLINE || PG_LIST_INCLUDE_DEFINITIONS */ #endif /*-- PG_USE_INLINE || PG_LIST_INCLUDE_DEFINITIONS */
/* /*
* NB: There is an unfortunate legacy from a previous incarnation of * NB: There is an unfortunate legacy from a previous incarnation of
......
...@@ -681,6 +681,10 @@ ...@@ -681,6 +681,10 @@
/* PostgreSQL major version as a string */ /* PostgreSQL major version as a string */
#undef PG_MAJORVERSION #undef PG_MAJORVERSION
/* Define to 1 if "static inline" works without unwanted warnings from
compilations where static inline functions are defined but not called. */
#undef PG_USE_INLINE
/* PostgreSQL version as a string */ /* PostgreSQL version as a string */
#undef PG_VERSION #undef PG_VERSION
...@@ -749,10 +753,6 @@ ...@@ -749,10 +753,6 @@
(--enable-float8-byval) */ (--enable-float8-byval) */
#undef USE_FLOAT8_BYVAL #undef USE_FLOAT8_BYVAL
/* Define to 1 if "static inline" works without unwanted warnings from
compilations where static inline functions are defined but not called. */
#undef USE_INLINE
/* Define to 1 if you want 64-bit integer timestamp and interval support. /* Define to 1 if you want 64-bit integer timestamp and interval support.
(--enable-integer-datetimes) */ (--enable-integer-datetimes) */
#undef USE_INTEGER_DATETIMES #undef USE_INTEGER_DATETIMES
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* HAVE_CBRT, HAVE_FUNCNAME_FUNC, HAVE_GETOPT, HAVE_GETOPT_H, HAVE_INTTYPES_H, * HAVE_CBRT, HAVE_FUNCNAME_FUNC, HAVE_GETOPT, HAVE_GETOPT_H, HAVE_INTTYPES_H,
* HAVE_GETOPT_LONG, HAVE_LOCALE_T, HAVE_RINT, HAVE_STRINGS_H, HAVE_STRTOLL, * HAVE_GETOPT_LONG, HAVE_LOCALE_T, HAVE_RINT, HAVE_STRINGS_H, HAVE_STRTOLL,
* HAVE_STRTOULL, HAVE_STRUCT_OPTION, ENABLE_THREAD_SAFETY, * HAVE_STRTOULL, HAVE_STRUCT_OPTION, ENABLE_THREAD_SAFETY,
* USE_INLINE, inline * PG_USE_INLINE, inline
*/ */
/* Define to the type of arg 1 of 'accept' */ /* Define to the type of arg 1 of 'accept' */
...@@ -623,7 +623,7 @@ ...@@ -623,7 +623,7 @@
/* Define to 1 if "static inline" works without unwanted warnings from /* Define to 1 if "static inline" works without unwanted warnings from
compilations where static inline functions are defined but not called. */ compilations where static inline functions are defined but not called. */
#define USE_INLINE 1 #define PG_USE_INLINE 1
/* Define to 1 if you want 64-bit integer timestamp and interval support. /* Define to 1 if you want 64-bit integer timestamp and interval support.
(--enable-integer-datetimes) */ (--enable-integer-datetimes) */
......
...@@ -81,10 +81,10 @@ extern void *repalloc(void *pointer, Size size); ...@@ -81,10 +81,10 @@ extern void *repalloc(void *pointer, Size size);
*/ */
#ifndef FRONTEND #ifndef FRONTEND
#ifndef USE_INLINE #ifndef PG_USE_INLINE
extern MemoryContext MemoryContextSwitchTo(MemoryContext context); extern MemoryContext MemoryContextSwitchTo(MemoryContext context);
#endif /* !USE_INLINE */ #endif /* !PG_USE_INLINE */
#if defined(USE_INLINE) || defined(MCXT_INCLUDE_DEFINITIONS) #if defined(PG_USE_INLINE) || defined(MCXT_INCLUDE_DEFINITIONS)
STATIC_IF_INLINE MemoryContext STATIC_IF_INLINE MemoryContext
MemoryContextSwitchTo(MemoryContext context) MemoryContextSwitchTo(MemoryContext context)
{ {
...@@ -93,9 +93,8 @@ MemoryContextSwitchTo(MemoryContext context) ...@@ -93,9 +93,8 @@ MemoryContextSwitchTo(MemoryContext context)
CurrentMemoryContext = context; CurrentMemoryContext = context;
return old; return old;
} }
#endif #endif /* PG_USE_INLINE || MCXT_INCLUDE_DEFINITIONS */
#endif /* !FRONTEND */
#endif /* !FRONTEND */
/* /*
* These are like standard strdup() except the copied string is * These are like standard strdup() except the copied string is
......
...@@ -105,12 +105,12 @@ typedef struct SortSupportData ...@@ -105,12 +105,12 @@ typedef struct SortSupportData
* ApplySortComparator should be inlined if possible. See STATIC_IF_INLINE * ApplySortComparator should be inlined if possible. See STATIC_IF_INLINE
* in c.h. * in c.h.
*/ */
#ifndef USE_INLINE #ifndef PG_USE_INLINE
extern int ApplySortComparator(Datum datum1, bool isNull1, extern int ApplySortComparator(Datum datum1, bool isNull1,
Datum datum2, bool isNull2, Datum datum2, bool isNull2,
SortSupport ssup); SortSupport ssup);
#endif /* !USE_INLINE */ #endif /* !PG_USE_INLINE */
#if defined(USE_INLINE) || defined(SORTSUPPORT_INCLUDE_DEFINITIONS) #if defined(PG_USE_INLINE) || defined(SORTSUPPORT_INCLUDE_DEFINITIONS)
/* /*
* Apply a sort comparator function and return a 3-way comparison result. * Apply a sort comparator function and return a 3-way comparison result.
* This takes care of handling reverse-sort and NULLs-ordering properly. * This takes care of handling reverse-sort and NULLs-ordering properly.
...@@ -147,7 +147,7 @@ ApplySortComparator(Datum datum1, bool isNull1, ...@@ -147,7 +147,7 @@ ApplySortComparator(Datum datum1, bool isNull1,
return compare; return compare;
} }
#endif /* USE_INLINE || SORTSUPPORT_INCLUDE_DEFINITIONS */ #endif /*-- PG_USE_INLINE || SORTSUPPORT_INCLUDE_DEFINITIONS */
/* Other functions in utils/sort/sortsupport.c */ /* Other functions in utils/sort/sortsupport.c */
extern void PrepareSortSupportComparisonShim(Oid cmpFunc, SortSupport ssup); extern void PrepareSortSupportComparisonShim(Oid cmpFunc, SortSupport ssup);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment