Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf46baf6

Browse files
committed
Rename USE_INLINE to PG_USE_INLINE
The former name was too likely to conflict with symbols from externalheaders; and, as seen in recent buildfarm failures in member spoonbill,it has now happened at least in plpython.
1 parent0b77aeb commitf46baf6

File tree

8 files changed

+25
-26
lines changed

8 files changed

+25
-26
lines changed

‎config/c-compiler.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fi])# PGAC_C_SIGNED
2020
# PGAC_C_INLINE
2121
# -------------
2222
# Check if the C compiler understands inline functions.
23-
# Defines: inline,USE_INLINE
23+
# Defines: inline,PG_USE_INLINE
2424
AC_DEFUN([PGAC_C_INLINE],
2525
[AC_C_INLINE
2626
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
3333
ac_c_werror_flag=$pgac_c_inline_save_werror
3434
fi])
3535
if test "$pgac_cv_c_inline_quietly" != no; then
36-
AC_DEFINE_UNQUOTED([USE_INLINE],1,
36+
AC_DEFINE_UNQUOTED([PG_USE_INLINE],1,
3737
[Define to 1 if "static inline" works without unwanted warnings from]
3838
[compilations where static inline functions are defined but not called.])
3939
fi

‎configure

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15182,7 +15182,7 @@ $as_echo "$pgac_cv_c_inline_quietly" >&6; }
1518215182
if test "$pgac_cv_c_inline_quietly" != no; then
1518315183

1518415184
cat >>confdefs.h <<_ACEOF
15185-
#defineUSE_INLINE 1
15185+
#definePG_USE_INLINE 1
1518615186
_ACEOF
1518715187

1518815188
fi

‎src/include/c.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -758,13 +758,13 @@ typedef NameData *Name;
758758
* definitions are pulled in by the .c file as regular (not inline) symbols.
759759
*
760760
* The header must also declare the functions' prototypes, protected by
761-
* !USE_INLINE.
761+
* !PG_USE_INLINE.
762762
*/
763-
#ifdefUSE_INLINE
763+
#ifdefPG_USE_INLINE
764764
#defineSTATIC_IF_INLINE static inline
765765
#else
766766
#defineSTATIC_IF_INLINE
767-
#endif/*USE_INLINE */
767+
#endif/*PG_USE_INLINE */
768768

769769
/* ----------------------------------------------------------------
770770
*Section 7:random stuff

‎src/include/nodes/pg_list.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ struct ListCell
7575
* if supported by the compiler, or as regular functions otherwise.
7676
* See STATIC_IF_INLINE in c.h.
7777
*/
78-
#ifndefUSE_INLINE
78+
#ifndefPG_USE_INLINE
7979
externListCell*list_head(constList*l);
8080
externListCell*list_tail(List*l);
8181
externintlist_length(constList*l);
82-
#endif/*USE_INLINE */
83-
#if defined(USE_INLINE)|| defined(PG_LIST_INCLUDE_DEFINITIONS)
82+
#endif/*PG_USE_INLINE */
83+
#if defined(PG_USE_INLINE)|| defined(PG_LIST_INCLUDE_DEFINITIONS)
8484
STATIC_IF_INLINEListCell*
8585
list_head(constList*l)
8686
{
@@ -98,7 +98,7 @@ list_length(const List *l)
9898
{
9999
returnl ?l->length :0;
100100
}
101-
#endif/* USE_INLINE || PG_LIST_INCLUDE_DEFINITIONS */
101+
#endif/*-- PG_USE_INLINE || PG_LIST_INCLUDE_DEFINITIONS */
102102

103103
/*
104104
* NB: There is an unfortunate legacy from a previous incarnation of

‎src/include/pg_config.h.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,10 @@
681681
/* PostgreSQL major version as a string */
682682
#undef PG_MAJORVERSION
683683

684+
/* Define to 1 if "static inline" works without unwanted warnings from
685+
compilations where static inline functions are defined but not called. */
686+
#undef PG_USE_INLINE
687+
684688
/* PostgreSQL version as a string */
685689
#undef PG_VERSION
686690

@@ -749,10 +753,6 @@
749753
(--enable-float8-byval) */
750754
#undef USE_FLOAT8_BYVAL
751755

752-
/* Define to 1 if "static inline" works without unwanted warnings from
753-
compilations where static inline functions are defined but not called. */
754-
#undef USE_INLINE
755-
756756
/* Define to 1 if you want 64-bit integer timestamp and interval support.
757757
(--enable-integer-datetimes) */
758758
#undef USE_INTEGER_DATETIMES

‎src/include/pg_config.h.win32

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* HAVE_CBRT, HAVE_FUNCNAME_FUNC, HAVE_GETOPT, HAVE_GETOPT_H, HAVE_INTTYPES_H,
88
* HAVE_GETOPT_LONG, HAVE_LOCALE_T, HAVE_RINT, HAVE_STRINGS_H, HAVE_STRTOLL,
99
* HAVE_STRTOULL, HAVE_STRUCT_OPTION, ENABLE_THREAD_SAFETY,
10-
*USE_INLINE, inline
10+
*PG_USE_INLINE, inline
1111
*/
1212

1313
/* Define to the type of arg 1 of 'accept' */
@@ -623,7 +623,7 @@
623623

624624
/* Define to 1 if "static inline" works without unwanted warnings from
625625
compilations where static inline functions are defined but not called. */
626-
#defineUSE_INLINE 1
626+
#definePG_USE_INLINE 1
627627

628628
/* Define to 1 if you want 64-bit integer timestamp and interval support.
629629
(--enable-integer-datetimes) */

‎src/include/utils/palloc.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ extern void *repalloc(void *pointer, Size size);
8181
*/
8282
#ifndefFRONTEND
8383

84-
#ifndefUSE_INLINE
84+
#ifndefPG_USE_INLINE
8585
externMemoryContextMemoryContextSwitchTo(MemoryContextcontext);
86-
#endif/* !USE_INLINE */
87-
#if defined(USE_INLINE)|| defined(MCXT_INCLUDE_DEFINITIONS)
86+
#endif/* !PG_USE_INLINE */
87+
#if defined(PG_USE_INLINE)|| defined(MCXT_INCLUDE_DEFINITIONS)
8888
STATIC_IF_INLINEMemoryContext
8989
MemoryContextSwitchTo(MemoryContextcontext)
9090
{
@@ -93,9 +93,8 @@ MemoryContextSwitchTo(MemoryContext context)
9393
CurrentMemoryContext=context;
9494
returnold;
9595
}
96-
#endif
97-
98-
#endif/* !FRONTEND */
96+
#endif/* PG_USE_INLINE || MCXT_INCLUDE_DEFINITIONS */
97+
#endif/* !FRONTEND */
9998

10099
/*
101100
* These are like standard strdup() except the copied string is

‎src/include/utils/sortsupport.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ typedef struct SortSupportData
105105
* ApplySortComparator should be inlined if possible. See STATIC_IF_INLINE
106106
* in c.h.
107107
*/
108-
#ifndefUSE_INLINE
108+
#ifndefPG_USE_INLINE
109109
externintApplySortComparator(Datumdatum1,boolisNull1,
110110
Datumdatum2,boolisNull2,
111111
SortSupportssup);
112-
#endif/* !USE_INLINE */
113-
#if defined(USE_INLINE)|| defined(SORTSUPPORT_INCLUDE_DEFINITIONS)
112+
#endif/* !PG_USE_INLINE */
113+
#if defined(PG_USE_INLINE)|| defined(SORTSUPPORT_INCLUDE_DEFINITIONS)
114114
/*
115115
* Apply a sort comparator function and return a 3-way comparison result.
116116
* This takes care of handling reverse-sort and NULLs-ordering properly.
@@ -147,7 +147,7 @@ ApplySortComparator(Datum datum1, bool isNull1,
147147

148148
returncompare;
149149
}
150-
#endif/* USE_INLINE || SORTSUPPORT_INCLUDE_DEFINITIONS */
150+
#endif/*-- PG_USE_INLINE || SORTSUPPORT_INCLUDE_DEFINITIONS */
151151

152152
/* Other functions in utils/sort/sortsupport.c */
153153
externvoidPrepareSortSupportComparisonShim(OidcmpFunc,SortSupportssup);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp