Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4fbf809

Browse files
committed
In transam.h, don't expose static inline functions to frontend code.
That leads to unsatisfied external references if the C compiler fails to elide unused static functions. Apparently, we have no buildfarm members building HEAD that have that issue ... but such compilers still exist in the wild. Need to do something about that. In passing, fix Berkeley-era typo in comment. Discussion: https://postgr.es/m/27054.1558533367@sss.pgh.pa.us
1 parent b8c6014 commit 4fbf809

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/include/access/transam.h

+10-1
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,13 @@ extern void AdvanceOldestClogXid(TransactionId oldest_datfrozenxid);
231231
extern bool ForceTransactionIdLimitUpdate(void);
232232
extern Oid GetNewObjectId(void);
233233

234+
/*
235+
* Some frontend programs include this header. For compilers that emit static
236+
* inline functions even when they're unused, that leads to unsatisfied
237+
* external references; hence hide them with #ifndef FRONTEND.
238+
*/
239+
#ifndef FRONTEND
240+
234241
/*
235242
* For callers that just need the XID part of the next transaction ID.
236243
*/
@@ -240,4 +247,6 @@ ReadNewTransactionId(void)
240247
return XidFromFullTransactionId(ReadNextFullTransactionId());
241248
}
242249

243-
#endif /* TRAMSAM_H */
250+
#endif /* FRONTEND */
251+
252+
#endif /* TRANSAM_H */

0 commit comments

Comments
 (0)