Lists: | pgsql-hackers |
---|
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | 'pgsql-hackers' <pgsql-hackers(at)postgresql(dot)org> |
Subject: | pgcrypto missing header file inclusions |
Date: | 2013-12-29 03:36:19 |
Message-ID: | 1388288179.18242.8.camel@vanquo.pezone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
While playing around with the pginclude tools, I noticed that pgcrypto
header files are failing to include some header files whose symbols they
use. This change would fix it:
diff --git a/contrib/pgcrypto/pgp.h b/contrib/pgcrypto/pgp.h
index 3022abf..f856e07 100644
--- a/contrib/pgcrypto/pgp.h
+++ b/contrib/pgcrypto/pgp.h
@@ -29,6 +29,9 @@
* contrib/pgcrypto/pgp.h
*/
+#include "mbuf.h"
+#include "px.h"
+
enum PGP_S2K_TYPE
{
PGP_S2K_SIMPLE = 0,
Does that look reasonable?
From: | Marko Kreen <markokr(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | 'pgsql-hackers' <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgcrypto missing header file inclusions |
Date: | 2013-12-30 10:02:54 |
Message-ID: | 20131230100254.GA5381@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Sat, Dec 28, 2013 at 10:36:19PM -0500, Peter Eisentraut wrote:
> While playing around with the pginclude tools, I noticed that pgcrypto
> header files are failing to include some header files whose symbols they
> use. This change would fix it:
>
> diff --git a/contrib/pgcrypto/pgp.h b/contrib/pgcrypto/pgp.h
> index 3022abf..f856e07 100644
> --- a/contrib/pgcrypto/pgp.h
> +++ b/contrib/pgcrypto/pgp.h
> @@ -29,6 +29,9 @@
> * contrib/pgcrypto/pgp.h
> */
>
> +#include "mbuf.h"
> +#include "px.h"
> +
> enum PGP_S2K_TYPE
> {
> PGP_S2K_SIMPLE = 0,
>
> Does that look reasonable?
It's a style question - currently pgp.h expects other headers to be
included in .c files. Including them in pgp.h might be better style,
but then please sync .c files with it too.
--
marko