Hi all,

As subject tells, we have in src/common/ four files that are only
compiled as part of the frontend: fe_memutils.c, file_utils.c,
logging.c and restricted_token.c.  Two of them are missing the
following, to make sure that we never try to compile them with the
backend:
+#ifndef FRONTEND
+#error "This file is not expected to be compiled for backend code"
+#endif

So, shouldn't that stuff be added as per the attached?

Thanks.
--
Michael
diff --git a/src/common/file_utils.c b/src/common/file_utils.c
index 7584c1f2fb..a2faafdf13 100644
--- a/src/common/file_utils.c
+++ b/src/common/file_utils.c
@@ -12,6 +12,11 @@
  *
  *-------------------------------------------------------------------------
  */
+
+#ifndef FRONTEND
+#error "This file is not expected to be compiled for backend code"
+#endif
+
 #include "postgres_fe.h"
 
 #include <dirent.h>
diff --git a/src/common/logging.c b/src/common/logging.c
index f3fc0b8262..6a3a437a34 100644
--- a/src/common/logging.c
+++ b/src/common/logging.c
@@ -7,6 +7,11 @@
  *
  *-------------------------------------------------------------------------
  */
+
+#ifndef FRONTEND
+#error "This file is not expected to be compiled for backend code"
+#endif
+
 #include "postgres_fe.h"
 
 #include <unistd.h>

Attachment: signature.asc
Description: PGP signature

Reply via email to