[PATCH 02/17] boolean is a typedef under MSVC, so rename variable to 'i_boolean'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With MSVC 'boolean' is already a typedef to unsigned char in
the rpcndr.h in the SDK. So, just rename to 'i_boolean' to avoid
conflicts in this one file, instead of any include magic.

Signed-off-by: Marius Storm-Olsen <mstormo@xxxxxxxxx>
---
 test-parse-options.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/test-parse-options.c b/test-parse-options.c
index efa734b..0c2d327 100644
--- a/test-parse-options.c
+++ b/test-parse-options.c
@@ -1,7 +1,7 @@
 #include "cache.h"
 #include "parse-options.h"
 
-static int boolean = 0;
+static int i_boolean = 0;
 static int integer = 0;
 static unsigned long timestamp;
 static int abbrev = 7;
@@ -34,10 +34,10 @@ int main(int argc, const char **argv)
 		NULL
 	};
 	struct option options[] = {
-		OPT_BOOLEAN('b', "boolean", &boolean, "get a boolean"),
-		OPT_BIT('4', "or4", &boolean,
+		OPT_BOOLEAN('b', "boolean", &i_boolean, "get a boolean"),
+		OPT_BIT('4', "or4", &i_boolean,
 			"bitwise-or boolean with ...0100", 4),
-		OPT_NEGBIT(0, "neg-or4", &boolean, "same as --no-or4", 4),
+		OPT_NEGBIT(0, "neg-or4", &i_boolean, "same as --no-or4", 4),
 		OPT_GROUP(""),
 		OPT_INTEGER('i', "integer", &integer, "get a integer"),
 		OPT_INTEGER('j', NULL, &integer, "get a integer, too"),
@@ -57,7 +57,7 @@ int main(int argc, const char **argv)
 		OPT_ARGUMENT("quux", "means --quux"),
 		OPT_NUMBER_CALLBACK(&integer, "set integer to NUM",
 			number_callback),
-		{ OPTION_BOOLEAN, '+', NULL, &boolean, NULL, "same as -b",
+		{ OPTION_BOOLEAN, '+', NULL, &i_boolean, NULL, "same as -b",
 		  PARSE_OPT_NOARG | PARSE_OPT_NONEG | PARSE_OPT_NODASH },
 		OPT_GROUP("Standard options"),
 		OPT__ABBREV(&abbrev),
@@ -70,7 +70,7 @@ int main(int argc, const char **argv)
 
 	argc = parse_options(argc, argv, prefix, options, usage, 0);
 
-	printf("boolean: %d\n", boolean);
+	printf("boolean: %d\n", i_boolean);
 	printf("integer: %u\n", integer);
 	printf("timestamp: %lu\n", timestamp);
 	printf("string: %s\n", string ? string : "(not set)");
-- 
1.6.2.1.418.g33d56.dirty

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]