0002-Add-required-headers-to-postgres_ext.h.patch
text/x-patch
Filename: 0002-Add-required-headers-to-postgres_ext.h.patch
Type: text/x-patch
Part: 1
Patch
Format: format-patch
Series: patch 0002
Subject: Add required headers to postgres_ext.h.
| File | + | − |
|---|---|---|
| src/include/postgres_ext.h | 2 | 3 |
From caa89e1176977f26167e0b7ca8b6396a7e4dbba9 Mon Sep 17 00:00:00 2001 From: Thomas Munro <thomas.munro@gmail.com> Date: Thu, 5 Dec 2024 11:31:52 +1300 Subject: [PATCH 2/2] Add required headers to postgres_ext.h. A couple of macros defined by postgres_ext.h historically required their users to include necessary headers themselves before use. They couldn't be included by postgres_ext.h itself due to inclusion ordering rules in c.h. Since we've now changed the order in c.h, we might as well be nicer to users by including them. --- src/include/postgres_ext.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/include/postgres_ext.h b/src/include/postgres_ext.h index 202eb049622..88480402d8a 100644 --- a/src/include/postgres_ext.h +++ b/src/include/postgres_ext.h @@ -23,7 +23,9 @@ #ifndef POSTGRES_EXT_H #define POSTGRES_EXT_H +#include <limits.h> #include <stdint.h> +#include <stdlib.h> /* * Object ID is a fundamental type in Postgres. @@ -37,10 +39,7 @@ typedef unsigned int Oid; #endif #define OID_MAX UINT_MAX -/* you will need to include <limits.h> to use the above #define */ - #define atooid(x) ((Oid) strtoul((x), NULL, 10)) -/* the above needs <stdlib.h> */ /* Define a signed 64-bit integer type for use in client API declarations. */ -- 2.47.0