]> granicus.if.org Git - postgresql/commitdiff
Don't use 'bool' as a struct member name in help_config.c.
authorAndres Freund <andres@anarazel.de>
Wed, 12 Aug 2015 14:02:20 +0000 (16:02 +0200)
committerAndres Freund <andres@anarazel.de>
Sat, 15 Aug 2015 14:32:38 +0000 (16:32 +0200)
Doing so doesn't work if bool is a macro rather than a typedef.

Although c.h spends some effort to support configurations where bool is
a preexisting macro, help_config.c has existed this way since
2003 (b700a6), and there have not been any reports of
problems. Backpatch anyway since this is as riskless as it gets.

Discussion: 20150812084351.GD8470@awork2.anarazel.de
Backpatch: 9.0-master

src/backend/utils/misc/help_config.c

index 68f58b79052291c4a5f056dbba2e72b353f6e943..fe9dfabe99bb57e8801f3d9631d4e2bd09769a2a 100644 (file)
@@ -31,7 +31,7 @@
 typedef union
 {
        struct config_generic generic;
-       struct config_bool bool;
+       struct config_bool _bool;
        struct config_real real;
        struct config_int integer;
        struct config_string string;
@@ -98,7 +98,7 @@ printMixedStruct(mixedStruct *structToPrint)
 
                case PGC_BOOL:
                        printf("BOOLEAN\t%s\t\t\t",
-                                  (structToPrint->bool.reset_val == 0) ?
+                                  (structToPrint->_bool.reset_val == 0) ?
                                   "FALSE" : "TRUE");
                        break;