1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-29 22:49:41 +03:00
Files
postgres/src/include/postgres_fe.h
Peter Eisentraut 74938d1320 IWYU widely useful pragmas
Add various widely useful "IWYU pragma" annotations, such as

- Common header files such as c.h, postgres.h should be "always_keep".

- System headers included in c.h, postgres.h etc. should be considered
  "export".

- Some portability headers such as getopt_long.h should be
  "always_keep", so they are not considered superfluous on some
  platforms.

- Certain system headers included from portability headers should be
  considered "export" because the purpose of the portability header is
  to wrap them.

- Superfluous includes marked as "for backward compatibility" get a
  formal IWYU annotation.

- Generated header included in utils/syscache.h is marked exported.
  This is a very commonly used include and this avoids lots of
  complaints.

Discussion: https://www.postgresql.org/message-id/flat/9395d484-eff4-47c2-b276-8e228526c8ae@eisentraut.org
2025-01-15 18:57:53 +01:00

35 lines
864 B
C

/*-------------------------------------------------------------------------
*
* postgres_fe.h
* Primary include file for PostgreSQL client-side .c files
*
* This should be the first file included by PostgreSQL client libraries and
* application programs --- but not by backend modules, which should include
* postgres.h.
*
*
* Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
* Portions Copyright (c) 1995, Regents of the University of California
*
* src/include/postgres_fe.h
*
*-------------------------------------------------------------------------
*/
/* IWYU pragma: always_keep */
#ifndef POSTGRES_FE_H
#define POSTGRES_FE_H
#ifndef FRONTEND
#define FRONTEND 1
#endif
/* IWYU pragma: begin_exports */
#include "c.h"
#include "common/fe_memutils.h"
/* IWYU pragma: end_exports */
#endif /* POSTGRES_FE_H */