Subject: small header problem with Postgres for Linux

From: [email-masked] (Kai Petzke)
Date: Thu, 7 Apr 1994 12:17:48 +0200 (MET DST)

Hi,

There is a small problem with postgres-v4r2.beta.1 for Linux.  It
is caused by different declarations of the functions aclitemin(),
aclitemout(), aclinsert(), aclremove() and aclcontains() in
the header files src/backend/utils/builtins.h and tmp/acl.h.
With the changed parser routines, the file src/backend/parser/ylib.c
includes both of them -- and bang, GCC complains about the different
declarations.

For a fast fix, see the patch below.

Kai

--- src/backend/utils/builtins.h.old	Sat Apr  2 00:44:09 1994
+++ src/backend/utils/builtins.h	Thu Apr  7 12:03:52 1994
@@ -612,11 +612,16 @@
 extern void to_basename ARGS((char *fname, char *bname, char *tname));
 
 /* acl.c */
-/* public interfaces only -- these are fake, the real ones are in tmp/acl.h */
+/*
+ * public interfaces only -- these are fake, the real ones are in tmp/acl.h.
+ * Don't  define these here, if tmp/acl.h has already been included!
+ */
+#ifndef AclHIncluded
 extern struct varlena *aclitemin ARGS((char *s));
 extern char *aclitemout ARGS((struct varlena *s));
 extern struct varlena *aclinsert ARGS((struct varlena *acl, char *aclitem));
 extern struct varlena *aclremove ARGS((struct varlena *acl, char *aclitem));
 extern int aclcontains ARGS((struct varlena *acl, char *aclitem));
+#endif
 
 #endif !BuiltinsIncluded