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

Commit324435e

Browse files
committed
Prevent compilation of frontend-only files in src/common/ with backend
Any frontend-only file of src/common/ should include a protection toprevent such code to be included in the backend compilation.fe_memutils.c and restricted_token.c have been doing that, whilefile_utils.c (sincebf5bb2e) and logging.c (sincefc9a62a) forgot it.Reviewed-by: Daniel GustafssonDiscussion:https://postgr.es/m/20200625080757.GI130132@paquier.xyz
1 parentee0202d commit324435e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

‎src/common/file_utils.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
15+
16+
#ifndefFRONTEND
17+
#error "This file is not expected to be compiled for backend code"
18+
#endif
19+
1520
#include"postgres_fe.h"
1621

1722
#include<dirent.h>

‎src/common/logging.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
*
88
*-------------------------------------------------------------------------
99
*/
10+
11+
#ifndefFRONTEND
12+
#error "This file is not expected to be compiled for backend code"
13+
#endif
14+
1015
#include"postgres_fe.h"
1116

1217
#include<unistd.h>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp