mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Move ExceptionalCondition back to postgres.h
It needs to be defined in the backend even when assertions are not enabled. It's cleaner to put it back, than create a separate #ifdef section in c.h. Per trouble report from Jeff Janes
This commit is contained in:
parent
187492b6c2
commit
a40d09e27f
@ -619,10 +619,6 @@ typedef NameData *Name;
|
||||
#define AssertState(condition) \
|
||||
Trap(!(condition), "BadState")
|
||||
|
||||
extern void ExceptionalCondition(const char *conditionName,
|
||||
const char *errorType,
|
||||
const char *fileName, int lineNumber) __attribute__((noreturn));
|
||||
|
||||
#endif /* USE_ASSERT_CHECKING && !FRONTEND */
|
||||
|
||||
|
||||
|
@ -639,9 +639,15 @@ extern Datum Float8GetDatum(float8 X);
|
||||
*/
|
||||
|
||||
/*
|
||||
* This declaration supports the assertion-related macros in c.h. This is here
|
||||
* because that file doesn't have PGDLLIMPORT in the right place.
|
||||
* These declarations supports the assertion-related macros in c.h.
|
||||
* assert_enabled is here because that file doesn't have PGDLLIMPORT in the
|
||||
* right place, and ExceptionalCondition must be present, for the backend only,
|
||||
* even when assertions are not enabled.
|
||||
*/
|
||||
extern PGDLLIMPORT bool assert_enabled;
|
||||
|
||||
extern void ExceptionalCondition(const char *conditionName,
|
||||
const char *errorType,
|
||||
const char *fileName, int lineNumber) __attribute__((noreturn));
|
||||
|
||||
#endif /* POSTGRES_H */
|
||||
|
Loading…
Reference in New Issue
Block a user