mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
Prevent compilation of frontend-only files in src/common/ with backend
Any frontend-only file of src/common/ should include a protection to prevent such code to be included in the backend compilation. fe_memutils.c and restricted_token.c have been doing that, while file_utils.c (since bf5bb2e) and logging.c (since fc9a62a) forgot it. Reviewed-by: Daniel Gustafsson Discussion: https://postgr.es/m/20200625080757.GI130132@paquier.xyz
This commit is contained in:
parent
ee0202d552
commit
324435eb14
@ -12,6 +12,11 @@
|
|||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef FRONTEND
|
||||||
|
#error "This file is not expected to be compiled for backend code"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
@ -7,6 +7,11 @@
|
|||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef FRONTEND
|
||||||
|
#error "This file is not expected to be compiled for backend code"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user