Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Avoid redefining simplehash_allocate/simplehash_free.
authorRobert Haas <rhaas@postgresql.org>
Tue, 7 Feb 2017 21:20:05 +0000 (16:20 -0500)
committerRobert Haas <rhaas@postgresql.org>
Tue, 7 Feb 2017 21:20:05 +0000 (16:20 -0500)
There's no generic guard against multiple inclusion in this file,
for good reason.  But these typedefs need one, as per a report
from Jeff Janes.

src/include/lib/simplehash.h

index fd7063c216f0b0ba0c25ac5cf700bf3306d6a8ca..359c7b8aa0c123c88fc22cdcfe5a2f3d7cde2203 100644 (file)
 #define SH_ENTRY_HASH SH_MAKE_NAME(entry_hash)
 
 /* Allocation function for hash table elements */
+#ifndef SIMPLEHASH_TYPEDEFS
+#define SIMPLEHASH_TYPEDEFS
 typedef void *(*simplehash_allocate) (Size size, void *args);
 typedef void (*simplehash_free) (void *pointer, void *args);
+#endif
 
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE