]> granicus.if.org Git - postgresql/commitdiff
Move ExceptionalCondition back to postgres.h
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 18 Feb 2013 21:53:32 +0000 (18:53 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 18 Feb 2013 21:53:32 +0000 (18:53 -0300)
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

src/include/c.h
src/include/postgres.h

index d38788ec799b7666d3dc7a75bd7e0e81fcc5e0de..ca7ff8663a713354e31b129fb2df80467d1b5e4f 100644 (file)
@@ -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 */
 
 
index 9808bdca467338aa287ebc1f0ca0e86d2dac3344..f9c5527932e51fc6f6576f530e096ae70d5ca0d2 100644 (file)
@@ -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 */