Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/pgedge_vectorizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@
#error "pgedge_vectorizer requires PostgreSQL 14 or later"
#endif

/* pg_noreturn compatibility for PostgreSQL 18+ */
/*
* pg_noreturn compatibility for PostgreSQL 18+.
*
* On a C23 compiler (gcc 15 defaults to -std=gnu23) pg_noreturn expands to the
* [[noreturn]] attribute, which the standard only allows at the very start of a
* declaration. PGEDGE_NORETURN must therefore be written before "extern", not
* between the storage class and the return type.
*/
#if PG_VERSION_NUM < 180000
#define PGEDGE_NORETURN
#define PGEDGE_NORETURN_SUFFIX pg_attribute_noreturn()
Expand Down Expand Up @@ -191,8 +198,8 @@ List *parse_markdown_structure(const char *content);
void free_markdown_elements(List *elements);

/* worker.c */
extern PGDLLEXPORT PGEDGE_NORETURN void pgedge_vectorizer_launcher_main(Datum main_arg) PGEDGE_NORETURN_SUFFIX;
extern PGDLLEXPORT PGEDGE_NORETURN void pgedge_vectorizer_worker_main(Datum main_arg) PGEDGE_NORETURN_SUFFIX;
PGEDGE_NORETURN extern PGDLLEXPORT void pgedge_vectorizer_launcher_main(Datum main_arg) PGEDGE_NORETURN_SUFFIX;
PGEDGE_NORETURN extern PGDLLEXPORT void pgedge_vectorizer_worker_main(Datum main_arg) PGEDGE_NORETURN_SUFFIX;
void register_background_workers(void);

/*
Expand Down
Loading