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

Commita40d09e

Browse files
committed
Move ExceptionalCondition back to postgres.h
It needs to be defined in the backend even when assertions are notenabled. It's cleaner to put it back, than create a separate #ifdefsection in c.h.Per trouble report from Jeff Janes
1 parent187492b commita40d09e

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

‎src/include/c.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -619,10 +619,6 @@ typedef NameData *Name;
619619
#defineAssertState(condition) \
620620
Trap(!(condition), "BadState")
621621

622-
externvoidExceptionalCondition(constchar*conditionName,
623-
constchar*errorType,
624-
constchar*fileName,intlineNumber) __attribute__((noreturn));
625-
626622
#endif/* USE_ASSERT_CHECKING && !FRONTEND */
627623

628624

‎src/include/postgres.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,9 +639,15 @@ extern Datum Float8GetDatum(float8 X);
639639
*/
640640

641641
/*
642-
* This declaration supports the assertion-related macros in c.h. This is here
643-
* because that file doesn't have PGDLLIMPORT in the right place.
642+
* These declarations supports the assertion-related macros in c.h.
643+
* assert_enabled is here because that file doesn't have PGDLLIMPORT in the
644+
* right place, and ExceptionalCondition must be present, for the backend only,
645+
* even when assertions are not enabled.
644646
*/
645647
externPGDLLIMPORTboolassert_enabled;
646648

649+
externvoidExceptionalCondition(constchar*conditionName,
650+
constchar*errorType,
651+
constchar*fileName,intlineNumber) __attribute__((noreturn));
652+
647653
#endif/* POSTGRES_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp