]> granicus.if.org Git - postgresql/commitdiff
Clean up c.h / postgres.h after Assert() move
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 8 Feb 2013 15:13:34 +0000 (12:13 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 8 Feb 2013 15:50:58 +0000 (12:50 -0300)
Per Tom

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

index 7c5ac8642ac02657a7405e3f20947c83167c21b3..d38788ec799b7666d3dc7a75bd7e0e81fcc5e0de 100644 (file)
@@ -582,7 +582,7 @@ typedef NameData *Name;
 #define AssertArg(condition) assert(condition)
 #define AssertState(condition) assert(condition)
 
-#else /* USE_ASSERT_CHECKING && FRONTEND */
+#else /* USE_ASSERT_CHECKING && !FRONTEND */
 
 /*
  * Trap
@@ -619,6 +619,10 @@ 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 207f7b8ffb2188f2c6e31090d0a8d13d9a1725d2..9808bdca467338aa287ebc1f0ca0e86d2dac3344 100644 (file)
@@ -638,10 +638,10 @@ 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.
+ */
 extern PGDLLIMPORT bool assert_enabled;
 
-extern void ExceptionalCondition(const char *conditionName,
-                                        const char *errorType,
-                        const char *fileName, int lineNumber) __attribute__((noreturn));
-
 #endif   /* POSTGRES_H */