{"thread":{"id":"14759","subject":"[PATCH] 64bit issue in test-parse-options.c","startedAt":"2008-07-30T12:16:56Z","lastAt":"2008-07-31T11:07:08Z","messageCount":8,"participants":["H.Merijn Brand","Pierre Habouzit","Junio C Hamano","Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"85605","messageId":"20080730141656.41ce02ec@pc09.procura.nl","threadId":"14759","inReplyTo":null,"subject":"[PATCH] 64bit issue in test-parse-options.c","fromName":"H.Merijn Brand","fromEmail":"h.m.brand@xs4all.nl","sentAt":"2008-07-30T12:16:56Z","receivedAt":"2008-07-30T12:16:56Z","isPatch":true,"sender":{"key":"h.m.brand@xs4all.nl","avatar":"https://gravatar.com/avatar/5b8f83ee35c427a646cbea3b104346e00ab3663b99bbf435cddeb75cd4b3857b?d=mp&s=160"},"body":"git-1.5.6.4 - HP-UX 11.23 64bit compile\n\n* expecting success:\n        test-parse-options -s123 -b -i 1729 -b -vv -n > output 2> output.err &&\n        test_cmp expect output &&\n        test ! -s output.err\n\n--- expect      2008-07-30 11:52:05 +0000\n+++ output      2008-07-30 11:52:05 +0000\n@@ -1,5 +1,5 @@\n boolean: 2\n-integer: 1729\n+integer: 7425998454784\n string: 123\n abbrev: 7\n verbose: 2\n* FAIL 2: short options\n\nI'm sure you can come up with a more sensible change, but the current\ncode is definitely wrong\n\n\n--8<---\n--- test-parse-options.c.org    2008-07-30 11:57:16 +0000\n+++ test-parse-options.c        2008-07-30 12:08:56 +0000\n@@ -2,6 +2,7 @@\n #include \"parse-options.h\"\n\n static int boolean = 0;\n+static unsigned int int_integer = 0;\n static unsigned long integer = 0;\n static int abbrev = 7;\n static int verbose = 0, dry_run = 0, quiet = 0;\n@@ -29,9 +30,9 @@ int main(int argc, const char **argv)\n                OPT_BIT('4', \"or4\", &boolean,\n                        \"bitwise-or boolean with ...0100\", 4),\n                OPT_GROUP(\"\"),\n-               OPT_INTEGER('i', \"integer\", &integer, \"get a integer\"),\n-               OPT_INTEGER('j', NULL, &integer, \"get a integer, too\"),\n-               OPT_SET_INT(0, \"set23\", &integer, \"set integer to 23\", 23),\n+               OPT_INTEGER('i', \"integer\", &int_integer, \"get a integer\"),\n+               OPT_INTEGER('j', NULL, &int_integer, \"get a integer, too\"),\n+               OPT_SET_INT(0, \"set23\", &int_integer, \"set integer to 23\", 23),\n                OPT_DATE('t', NULL, &integer, \"get timestamp of <time>\"),\n                OPT_CALLBACK('L', \"length\", &integer, \"str\",\n                        \"get length of <str>\", length_callback),\n@@ -53,7 +54,9 @@ int main(int argc, const char **argv)\n        };\n        int i;\n\n+       integer = 0x12345678;\n        argc = parse_options(argc, argv, options, usage, 0);\n+       if (integer == 0x12345678) integer = int_integer;\n\n        printf(\"boolean: %d\\n\", boolean);\n        printf(\"integer: %lu\\n\", integer);\n-->8---\n\n-- \nH.Merijn Brand          Amsterdam Perl Mongers  http://amsterdam.pm.org/\nusing & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,\n11.11, 11.23, and 11.31, SuSE 10.1, 10.2, and 10.3, AIX 5.2, and Cygwin.\nhttp://mirrors.develooper.com/hpux/           http://www.test-smoke.org/\nhttp://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/\n"},{"id":"85609","messageId":"20080730123713.GA31392@artemis.madism.org","threadId":"14759","inReplyTo":"20080730141656.41ce02ec@pc09.procura.nl","subject":"Re: [PATCH] 64bit issue in test-parse-options.c","fromName":"Pierre Habouzit","fromEmail":"madcoder@debian.org","sentAt":"2008-07-30T12:37:13Z","receivedAt":"2008-07-30T12:37:13Z","isPatch":true,"sender":{"key":"madcoder@debian.org","avatar":"https://avatars.githubusercontent.com/u/44708?v=4"},"body":"On Wed, Jul 30, 2008 at 12:16:56PM +0000, H.Merijn Brand wrote:\n> git-1.5.6.4 - HP-UX 11.23 64bit compile\n> \n> * expecting success:\n>         test-parse-options -s123 -b -i 1729 -b -vv -n > output 2> output.err &&\n>         test_cmp expect output &&\n>         test ! -s output.err\n> \n> --- expect      2008-07-30 11:52:05 +0000\n> +++ output      2008-07-30 11:52:05 +0000\n> @@ -1,5 +1,5 @@\n>  boolean: 2\n> -integer: 1729\n> +integer: 7425998454784\n>  string: 123\n>  abbrev: 7\n>  verbose: 2\n> * FAIL 2: short options\n> \n> I'm sure you can come up with a more sensible change, but the current\n> code is definitely wrong\n> \n> \n> --8<---\n> --- test-parse-options.c.org    2008-07-30 11:57:16 +0000\n> +++ test-parse-options.c        2008-07-30 12:08:56 +0000\n> @@ -2,6 +2,7 @@\n>  #include \"parse-options.h\"\n> \n>  static int boolean = 0;\n> +static unsigned int int_integer = 0;\n>  static unsigned long integer = 0;\n\n  long is wrong in the first place, parse-opt only uses ints.\n\n\n-- \n·O·  Pierre Habouzit\n··O                                                madcoder@debian.org\nOOO                                                http://www.madism.org\n"},{"id":"85610","messageId":"20080730144452.797d8686@pc09.procura.nl","threadId":"14759","inReplyTo":"20080730123713.GA31392@artemis.madism.org","subject":"Re: [PATCH] 64bit issue in test-parse-options.c","fromName":"H.Merijn Brand","fromEmail":"h.m.brand@xs4all.nl","sentAt":"2008-07-30T12:44:52Z","receivedAt":"2008-07-30T12:44:52Z","isPatch":true,"sender":{"key":"h.m.brand@xs4all.nl","avatar":"https://gravatar.com/avatar/5b8f83ee35c427a646cbea3b104346e00ab3663b99bbf435cddeb75cd4b3857b?d=mp&s=160"},"body":"On Wed, 30 Jul 2008 14:37:13 +0200, Pierre Habouzit\n<madcoder@debian.org> wrote:\n\n> On Wed, Jul 30, 2008 at 12:16:56PM +0000, H.Merijn Brand wrote:\n> > git-1.5.6.4 - HP-UX 11.23 64bit compile\n> > \n> > * expecting success:\n> >         test-parse-options -s123 -b -i 1729 -b -vv -n > output 2> output.err &&\n> >         test_cmp expect output &&\n> >         test ! -s output.err\n> > \n> > --- expect      2008-07-30 11:52:05 +0000\n> > +++ output      2008-07-30 11:52:05 +0000\n> > @@ -1,5 +1,5 @@\n> >  boolean: 2\n> > -integer: 1729\n> > +integer: 7425998454784\n> >  string: 123\n> >  abbrev: 7\n> >  verbose: 2\n> > * FAIL 2: short options\n> > \n> > I'm sure you can come up with a more sensible change, but the current\n> > code is definitely wrong\n> > \n> > \n> > --8<---\n> > --- test-parse-options.c.org    2008-07-30 11:57:16 +0000\n> > +++ test-parse-options.c        2008-07-30 12:08:56 +0000\n> > @@ -2,6 +2,7 @@\n> >  #include \"parse-options.h\"\n> > \n> >  static int boolean = 0;\n> > +static unsigned int int_integer = 0;\n> >  static unsigned long integer = 0;\n> \n>   long is wrong in the first place, parse-opt only uses ints.\n\nIf I change it to int, the date parsing goes bogus.\n\n-- \nH.Merijn Brand          Amsterdam Perl Mongers  http://amsterdam.pm.org/\nusing & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,\n11.11, 11.23, and 11.31, SuSE 10.1, 10.2, and 10.3, AIX 5.2, and Cygwin.\nhttp://mirrors.develooper.com/hpux/           http://www.test-smoke.org/\nhttp://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/\n"},{"id":"85624","messageId":"20080730140523.GC31392@artemis.madism.org","threadId":"14759","inReplyTo":"20080730144452.797d8686@pc09.procura.nl","subject":"Re: [PATCH] 64bit issue in test-parse-options.c","fromName":"Pierre Habouzit","fromEmail":"madcoder@debian.org","sentAt":"2008-07-30T14:05:23Z","receivedAt":"2008-07-30T14:05:23Z","isPatch":true,"sender":{"key":"madcoder@debian.org","avatar":"https://avatars.githubusercontent.com/u/44708?v=4"},"body":"On Wed, Jul 30, 2008 at 12:44:52PM +0000, H.Merijn Brand wrote:\n> On Wed, 30 Jul 2008 14:37:13 +0200, Pierre Habouzit\n> <madcoder@debian.org> wrote:\n> \n> > On Wed, Jul 30, 2008 at 12:16:56PM +0000, H.Merijn Brand wrote:\n> > > git-1.5.6.4 - HP-UX 11.23 64bit compile\n> > > \n> > > * expecting success:\n> > >         test-parse-options -s123 -b -i 1729 -b -vv -n > output 2> output.err &&\n> > >         test_cmp expect output &&\n> > >         test ! -s output.err\n> > > \n> > > --- expect      2008-07-30 11:52:05 +0000\n> > > +++ output      2008-07-30 11:52:05 +0000\n> > > @@ -1,5 +1,5 @@\n> > >  boolean: 2\n> > > -integer: 1729\n> > > +integer: 7425998454784\n> > >  string: 123\n> > >  abbrev: 7\n> > >  verbose: 2\n> > > * FAIL 2: short options\n> > > \n> > > I'm sure you can come up with a more sensible change, but the current\n> > > code is definitely wrong\n> > > \n> > > \n> > > --8<---\n> > > --- test-parse-options.c.org    2008-07-30 11:57:16 +0000\n> > > +++ test-parse-options.c        2008-07-30 12:08:56 +0000\n> > > @@ -2,6 +2,7 @@\n> > >  #include \"parse-options.h\"\n> > > \n> > >  static int boolean = 0;\n> > > +static unsigned int int_integer = 0;\n> > >  static unsigned long integer = 0;\n> > \n> >   long is wrong in the first place, parse-opt only uses ints.\n> \n> If I change it to int, the date parsing goes bogus.\n\nThat is because OPT_DATE indeed expect a long (why not a time_t I don't\nknow btw... but time_t is a long on linux so it doesn't change things a\nlot).\n\nThe proper fix is to let integer be an *INT* (long integer is bogus\nanyways) and to put the date in a long using static unsigned long date,\nand make OPT_DATE use this long.\n\n-- \n·O·  Pierre Habouzit\n··O                                                madcoder@debian.org\nOOO                                                http://www.madism.org\n"},{"id":"85669","messageId":"7vej5b5grc.fsf@gitster.siamese.dyndns.org","threadId":"14759","inReplyTo":"20080730140523.GC31392@artemis.madism.org","subject":"Re: [PATCH] 64bit issue in test-parse-options.c","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-30T19:11:35Z","receivedAt":"2008-07-30T19:11:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pierre Habouzit <madcoder@debian.org> writes:\n\n> The proper fix is to let integer be an *INT* (long integer is bogus\n> anyways) and to put the date in a long using static unsigned long date,\n> and make OPT_DATE use this long.\n\nI am still puzzled by the original report of the breakage, as H. Merijn\ncannot be the first person to ever ran test-parse-options on 64-bit\nmachine.  Maybe there is a bytesex issue involved as well?\n\nIn any case, this should work.\n\n test-parse-options.c     |    8 +++++---\n t/t0040-parse-options.sh |   11 ++++++++++-\n 2 files changed, 15 insertions(+), 4 deletions(-)\n\ndiff --git a/test-parse-options.c b/test-parse-options.c\nindex 2a79e72..6e18083 100644\n--- a/test-parse-options.c\n+++ b/test-parse-options.c\n@@ -2,7 +2,8 @@\n #include \"parse-options.h\"\n \n static int boolean = 0;\n-static unsigned long integer = 0;\n+static int integer = 0;\n+static unsigned long timestamp;\n static int abbrev = 7;\n static int verbose = 0, dry_run = 0, quiet = 0;\n static char *string = NULL;\n@@ -32,7 +33,7 @@ int main(int argc, const char **argv)\n \t\tOPT_INTEGER('i', \"integer\", &integer, \"get a integer\"),\n \t\tOPT_INTEGER('j', NULL, &integer, \"get a integer, too\"),\n \t\tOPT_SET_INT(0, \"set23\", &integer, \"set integer to 23\", 23),\n-\t\tOPT_DATE('t', NULL, &integer, \"get timestamp of <time>\"),\n+\t\tOPT_DATE('t', NULL, &timestamp, \"get timestamp of <time>\"),\n \t\tOPT_CALLBACK('L', \"length\", &integer, \"str\",\n \t\t\t\"get length of <str>\", length_callback),\n \t\tOPT_GROUP(\"String options\"),\n@@ -56,7 +57,8 @@ int main(int argc, const char **argv)\n \targc = parse_options(argc, argv, options, usage, 0);\n \n \tprintf(\"boolean: %d\\n\", boolean);\n-\tprintf(\"integer: %lu\\n\", integer);\n+\tprintf(\"integer: %u\\n\", integer);\n+\tprintf(\"timestamp: %lu\\n\", timestamp);\n \tprintf(\"string: %s\\n\", string ? string : \"(not set)\");\n \tprintf(\"abbrev: %d\\n\", abbrev);\n \tprintf(\"verbose: %d\\n\", verbose);\n\n\ndiff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh\nindex 03dbe00..e38241c 100755\n--- a/t/t0040-parse-options.sh\n+++ b/t/t0040-parse-options.sh\n@@ -47,6 +47,7 @@ test_expect_success 'test help' '\n cat > expect << EOF\n boolean: 2\n integer: 1729\n+timestamp: 0\n string: 123\n abbrev: 7\n verbose: 2\n@@ -63,6 +64,7 @@ test_expect_success 'short options' '\n cat > expect << EOF\n boolean: 2\n integer: 1729\n+timestamp: 0\n string: 321\n abbrev: 10\n verbose: 2\n@@ -88,6 +90,7 @@ test_expect_success 'missing required value' '\n cat > expect << EOF\n boolean: 1\n integer: 13\n+timestamp: 0\n string: 123\n abbrev: 7\n verbose: 0\n@@ -108,6 +111,7 @@ test_expect_success 'intermingled arguments' '\n cat > expect << EOF\n boolean: 0\n integer: 2\n+timestamp: 0\n string: (not set)\n abbrev: 7\n verbose: 0\n@@ -135,6 +139,7 @@ test_expect_success 'ambiguously abbreviated option' '\n cat > expect << EOF\n boolean: 0\n integer: 0\n+timestamp: 0\n string: 123\n abbrev: 7\n verbose: 0\n@@ -161,6 +166,7 @@ test_expect_success 'detect possible typos' '\n cat > expect <<EOF\n boolean: 0\n integer: 0\n+timestamp: 0\n string: (not set)\n abbrev: 7\n verbose: 0\n@@ -177,7 +183,8 @@ test_expect_success 'keep some options as arguments' '\n \n cat > expect <<EOF\n boolean: 0\n-integer: 1\n+integer: 0\n+timestamp: 1\n string: default\n abbrev: 7\n verbose: 0\n@@ -197,6 +204,7 @@ cat > expect <<EOF\n Callback: \"four\", 0\n boolean: 5\n integer: 4\n+timestamp: 0\n string: (not set)\n abbrev: 7\n verbose: 0\n@@ -223,6 +231,7 @@ test_expect_success 'OPT_CALLBACK() and callback errors work' '\n cat > expect <<EOF\n boolean: 1\n integer: 23\n+timestamp: 0\n string: (not set)\n abbrev: 7\n verbose: 0\n"},{"id":"85674","messageId":"20080730193516.GC24164@artemis.madism.org","threadId":"14759","inReplyTo":"7vej5b5grc.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] 64bit issue in test-parse-options.c","fromName":"Pierre Habouzit","fromEmail":"madcoder@debian.org","sentAt":"2008-07-30T19:35:17Z","receivedAt":"2008-07-30T19:35:17Z","isPatch":true,"sender":{"key":"madcoder@debian.org","avatar":"https://avatars.githubusercontent.com/u/44708?v=4"},"body":"On Wed, Jul 30, 2008 at 07:11:35PM +0000, Junio C Hamano wrote:\n> Pierre Habouzit <madcoder@debian.org> writes:\n> \n> > The proper fix is to let integer be an *INT* (long integer is bogus\n> > anyways) and to put the date in a long using static unsigned long date,\n> > and make OPT_DATE use this long.\n> \n> I am still puzzled by the original report of the breakage, as H. Merijn\n> cannot be the first person to ever ran test-parse-options on 64-bit\n> machine.  Maybe there is a bytesex issue involved as well?\n\n  Yes there is: I assume HP-UX works on big endian machines, else on\nmachines where longs are 64 bits, we put timestamps in it which are\nprobably current dates, which still fit on 31 (or 32) bits, hence do not\ntouch the most significant 32 bits hence work on 64 bits little endian\nmachines (like ... x86_64).\n\n  So when we parse an integer in it again, the 32 most significant bits\nremain 0 hence the test passes.\n\n> In any case, this should work.\n> \n>  test-parse-options.c     |    8 +++++---\n>  t/t0040-parse-options.sh |   11 ++++++++++-\n>  2 files changed, 15 insertions(+), 4 deletions(-)\n\n  Ack. I wanted to write it but hadn't the time yet, I was just pointing\nto the right fix. Thanks for writing the patch :)\n\n-- \n·O·  Pierre Habouzit\n··O                                                madcoder@debian.org\nOOO                                                http://www.madism.org\n"},{"id":"85677","messageId":"20080730215500.5b4ec69e@pc09.procura.nl","threadId":"14759","inReplyTo":"7vej5b5grc.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] 64bit issue in test-parse-options.c","fromName":"H.Merijn Brand","fromEmail":"h.m.brand@xs4all.nl","sentAt":"2008-07-30T19:55:00Z","receivedAt":"2008-07-30T19:55:00Z","isPatch":true,"sender":{"key":"h.m.brand@xs4all.nl","avatar":"https://gravatar.com/avatar/5b8f83ee35c427a646cbea3b104346e00ab3663b99bbf435cddeb75cd4b3857b?d=mp&s=160"},"body":"On Wed, 30 Jul 2008 12:11:35 -0700, Junio C Hamano <gitster@pobox.com>\nwrote:\n\n> Pierre Habouzit <madcoder@debian.org> writes:\n> \n> > The proper fix is to let integer be an *INT* (long integer is bogus\n> > anyways) and to put the date in a long using static unsigned long date,\n> > and make OPT_DATE use this long.\n> \n> I am still puzzled by the original report of the breakage, as H. Merijn\n> cannot be the first person to ever ran test-parse-options on 64-bit\n> machine.  Maybe there is a bytesex issue involved as well?\n\nItanium 2 / 64, and endianness indeed\n\n> In any case, this should work.\n\nYes, that was what I was thinking too, but I had no time to go for the\ntest cases too. I had it to get to work ASAP.\n\n>  test-parse-options.c     |    8 +++++---\n>  t/t0040-parse-options.sh |   11 ++++++++++-\n>  2 files changed, 15 insertions(+), 4 deletions(-)\n> \n> diff --git a/test-parse-options.c b/test-parse-options.c\n> index 2a79e72..6e18083 100644\n> --- a/test-parse-options.c\n> +++ b/test-parse-options.c\n> @@ -2,7 +2,8 @@\n>  #include \"parse-options.h\"\n>  \n>  static int boolean = 0;\n> -static unsigned long integer = 0;\n> +static int integer = 0;\n> +static unsigned long timestamp;\n>  static int abbrev = 7;\n>  static int verbose = 0, dry_run = 0, quiet = 0;\n>  static char *string = NULL;\n> @@ -32,7 +33,7 @@ int main(int argc, const char **argv)\n>  \t\tOPT_INTEGER('i', \"integer\", &integer, \"get a integer\"),\n>  \t\tOPT_INTEGER('j', NULL, &integer, \"get a integer, too\"),\n>  \t\tOPT_SET_INT(0, \"set23\", &integer, \"set integer to 23\", 23),\n> -\t\tOPT_DATE('t', NULL, &integer, \"get timestamp of <time>\"),\n> +\t\tOPT_DATE('t', NULL, &timestamp, \"get timestamp of <time>\"),\n>  \t\tOPT_CALLBACK('L', \"length\", &integer, \"str\",\n>  \t\t\t\"get length of <str>\", length_callback),\n>  \t\tOPT_GROUP(\"String options\"),\n> @@ -56,7 +57,8 @@ int main(int argc, const char **argv)\n>  \targc = parse_options(argc, argv, options, usage, 0);\n>  \n>  \tprintf(\"boolean: %d\\n\", boolean);\n> -\tprintf(\"integer: %lu\\n\", integer);\n> +\tprintf(\"integer: %u\\n\", integer);\n> +\tprintf(\"timestamp: %lu\\n\", timestamp);\n>  \tprintf(\"string: %s\\n\", string ? string : \"(not set)\");\n>  \tprintf(\"abbrev: %d\\n\", abbrev);\n>  \tprintf(\"verbose: %d\\n\", verbose);\n> \n> \n> diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh\n> index 03dbe00..e38241c 100755\n> --- a/t/t0040-parse-options.sh\n> +++ b/t/t0040-parse-options.sh\n> @@ -47,6 +47,7 @@ test_expect_success 'test help' '\n>  cat > expect << EOF\n>  boolean: 2\n>  integer: 1729\n> +timestamp: 0\n>  string: 123\n>  abbrev: 7\n>  verbose: 2\n> @@ -63,6 +64,7 @@ test_expect_success 'short options' '\n>  cat > expect << EOF\n>  boolean: 2\n>  integer: 1729\n> +timestamp: 0\n>  string: 321\n>  abbrev: 10\n>  verbose: 2\n> @@ -88,6 +90,7 @@ test_expect_success 'missing required value' '\n>  cat > expect << EOF\n>  boolean: 1\n>  integer: 13\n> +timestamp: 0\n>  string: 123\n>  abbrev: 7\n>  verbose: 0\n> @@ -108,6 +111,7 @@ test_expect_success 'intermingled arguments' '\n>  cat > expect << EOF\n>  boolean: 0\n>  integer: 2\n> +timestamp: 0\n>  string: (not set)\n>  abbrev: 7\n>  verbose: 0\n> @@ -135,6 +139,7 @@ test_expect_success 'ambiguously abbreviated option' '\n>  cat > expect << EOF\n>  boolean: 0\n>  integer: 0\n> +timestamp: 0\n>  string: 123\n>  abbrev: 7\n>  verbose: 0\n> @@ -161,6 +166,7 @@ test_expect_success 'detect possible typos' '\n>  cat > expect <<EOF\n>  boolean: 0\n>  integer: 0\n> +timestamp: 0\n>  string: (not set)\n>  abbrev: 7\n>  verbose: 0\n> @@ -177,7 +183,8 @@ test_expect_success 'keep some options as arguments' '\n>  \n>  cat > expect <<EOF\n>  boolean: 0\n> -integer: 1\n> +integer: 0\n> +timestamp: 1\n>  string: default\n>  abbrev: 7\n>  verbose: 0\n> @@ -197,6 +204,7 @@ cat > expect <<EOF\n>  Callback: \"four\", 0\n>  boolean: 5\n>  integer: 4\n> +timestamp: 0\n>  string: (not set)\n>  abbrev: 7\n>  verbose: 0\n> @@ -223,6 +231,7 @@ test_expect_success 'OPT_CALLBACK() and callback errors work' '\n>  cat > expect <<EOF\n>  boolean: 1\n>  integer: 23\n> +timestamp: 0\n>  string: (not set)\n>  abbrev: 7\n>  verbose: 0\n\n\n-- \nH.Merijn Brand          Amsterdam Perl Mongers  http://amsterdam.pm.org/\nusing & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,\n11.11, 11.23, and 11.31, SuSE 10.1, 10.2, and 10.3, AIX 5.2, and Cygwin.\nhttp://mirrors.develooper.com/hpux/           http://www.test-smoke.org/\nhttp://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/\n"},{"id":"85758","messageId":"20080731110708.GN32184@machine.or.cz","threadId":"14759","inReplyTo":"20080730140523.GC31392@artemis.madism.org","subject":"Re: [PATCH] 64bit issue in test-parse-options.c","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2008-07-31T11:07:08Z","receivedAt":"2008-07-31T11:07:08Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"On Wed, Jul 30, 2008 at 04:05:23PM +0200, Pierre Habouzit wrote:\n> On Wed, Jul 30, 2008 at 12:44:52PM +0000, H.Merijn Brand wrote:\n> > On Wed, 30 Jul 2008 14:37:13 +0200, Pierre Habouzit\n> > <madcoder@debian.org> wrote:\n> > >   long is wrong in the first place, parse-opt only uses ints.\n> > \n> > If I change it to int, the date parsing goes bogus.\n> \n> That is because OPT_DATE indeed expect a long (why not a time_t I don't\n> know btw... but time_t is a long on linux so it doesn't change things a\n> lot).\n\nStill, I think converting to time_t for timestamps would be a good\ncleanup; I have added it to http://git.or.cz/gitwiki/Janitor.\n\n\t\t\t\tPetr \"Pasky\" Baudis\n"}]}