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

Commit7507b19

Browse files
committed
Don't expose the inline definition of MemoryContextSwitchTo when FRONTEND is
defined. Its reference to CurrentMemoryContext causes link failures on someplatforms, evidently because the inline function gets compiled despite lack ofuse. Per buildfarm member warthog.
1 parent8eccf76 commit7507b19

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

‎src/include/utils/palloc.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
2222
* Portions Copyright (c) 1994, Regents of the University of California
2323
*
24-
* $PostgreSQL: pgsql/src/include/utils/palloc.h,v 1.43 2010/02/1302:34:16 tgl Exp $
24+
* $PostgreSQL: pgsql/src/include/utils/palloc.h,v 1.44 2010/02/1320:46:52 tgl Exp $
2525
*
2626
*-------------------------------------------------------------------------
2727
*/
@@ -73,8 +73,12 @@ extern void *repalloc(void *pointer, Size size);
7373
/*
7474
* MemoryContextSwitchTo can't be a macro in standard C compilers.
7575
* But we can make it an inline function if the compiler supports it.
76+
*
77+
* This file has to be includable by some non-backend code such as
78+
* pg_resetxlog, so don't expose the CurrentMemoryContext reference
79+
* if FRONTEND is defined.
7680
*/
77-
#ifdefUSE_INLINE
81+
#if defined(USE_INLINE)&& !defined(FRONTEND)
7882

7983
staticinlineMemoryContext
8084
MemoryContextSwitchTo(MemoryContextcontext)
@@ -87,7 +91,7 @@ MemoryContextSwitchTo(MemoryContext context)
8791
#else
8892

8993
externMemoryContextMemoryContextSwitchTo(MemoryContextcontext);
90-
#endif/* USE_INLINE */
94+
#endif/* USE_INLINE&& !FRONTEND*/
9195

9296
/*
9397
* These are like standard strdup() except the copied string is

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp