From: H.Merijn Brand Date: Wed, 30 Jul 2008 12:16:56 GMT Subject: [PATCH] 64bit issue in test-parse-options.c Message-ID: <20080730141656.41ce02ec@pc09.procura.nl> git-1.5.6.4 - HP-UX 11.23 64bit compile * expecting success: test-parse-options -s123 -b -i 1729 -b -vv -n > output 2> output.err && test_cmp expect output && test ! -s output.err --- expect 2008-07-30 11:52:05 +0000 +++ output 2008-07-30 11:52:05 +0000 @@ -1,5 +1,5 @@ boolean: 2 -integer: 1729 +integer: 7425998454784 string: 123 abbrev: 7 verbose: 2 * FAIL 2: short options I'm sure you can come up with a more sensible change, but the current code is definitely wrong --8<--- --- test-parse-options.c.org 2008-07-30 11:57:16 +0000 +++ test-parse-options.c 2008-07-30 12:08:56 +0000 @@ -2,6 +2,7 @@ #include "parse-options.h" static int boolean = 0; +static unsigned int int_integer = 0; static unsigned long integer = 0; static int abbrev = 7; static int verbose = 0, dry_run = 0, quiet = 0; @@ -29,9 +30,9 @@ int main(int argc, const char **argv) OPT_BIT('4', "or4", &boolean, "bitwise-or boolean with ...0100", 4), OPT_GROUP(""), - OPT_INTEGER('i', "integer", &integer, "get a integer"), - OPT_INTEGER('j', NULL, &integer, "get a integer, too"), - OPT_SET_INT(0, "set23", &integer, "set integer to 23", 23), + OPT_INTEGER('i', "integer", &int_integer, "get a integer"), + OPT_INTEGER('j', NULL, &int_integer, "get a integer, too"), + OPT_SET_INT(0, "set23", &int_integer, "set integer to 23", 23), OPT_DATE('t', NULL, &integer, "get timestamp of