On Tue, Jun 27 2017, Liam R. Howlett jotted:
> This compressed logic is causing a lot of issues. Could we just rewrite
> it as a whole lot of #if/#else, statements to avoid running across the
> issue where the precompiler does not short-circuit the checks? Would
> this cause any other issues?
* Junio C Hamano [170627 13:38]:
> "Liam R. Howlett" writes:
>
> > How about:
> >
> > 8<
> > diff --git a/sha1dc/sha1.c b/sha1dc/sha1.c
> > index facea1bb5..ed8c63f2d 100644
> > --- a/sha1dc/sha1.c
> > +++ b/sha1dc/sha1.c
> > @@ -38,9 +38,18
On Tue, Jun 27 2017, Liam R. Howlett jotted:
> How about:
>
> 8<
> diff --git a/sha1dc/sha1.c b/sha1dc/sha1.c
> index facea1bb5..ed8c63f2d 100644
> --- a/sha1dc/sha1.c
> +++ b/sha1dc/sha1.c
> @@ -38,9 +38,18 @@
>
> #if (defined(_BYTE_ORDER) || defined(__BYTE_ORDER) ||
>
"Liam R. Howlett" writes:
> How about:
>
> 8<
> diff --git a/sha1dc/sha1.c b/sha1dc/sha1.c
> index facea1bb5..ed8c63f2d 100644
> --- a/sha1dc/sha1.c
> +++ b/sha1dc/sha1.c
> @@ -38,9 +38,18 @@
>
> #if (defined(_BYTE_ORDER) || defined(__BYTE_ORDER) ||
>
How about:
8<
diff --git a/sha1dc/sha1.c b/sha1dc/sha1.c
index facea1bb5..ed8c63f2d 100644
--- a/sha1dc/sha1.c
+++ b/sha1dc/sha1.c
@@ -38,9 +38,18 @@
#if (defined(_BYTE_ORDER) || defined(__BYTE_ORDER) || defined(__BYTE_ORDER__))
+#define EMPTY_VAL(x) x ## 1
+#define EMPTY(x)
On the Solaris system here __BYTE_ORDER__ set to 4321 and _BIG_ENDIAN
is defined, but has no value.
The problem is the not short circuiting macro...
-8<--
#undef _FOO1
#undef _FOO2
#undef _FOO2
#undef _BAR1
#undef _BAR2
#undef _BAR3
#define
2017-06-26 22:27 GMT+02:00 Ævar Arnfjörð Bjarmason :
> Could you (or anyone else for that matter) please test it with:
>
> git clone --branch bigend-detect-solaris-again
> https://github.com/avar/sha1collisiondetection.git &&
> cd sha1collisiondetection &&
> make
On Mon, Jun 26 2017, Michael Kebe jotted:
> Still no luck, with one or both patches.
Could you please attach (or pastebin or whatever) your copy of
/usr/include/sys/isa_defs.h? And what Solaris/Illumos/Whatever version
is this?
Maybe this patch works for you:
diff --git a/sha1dc/sha1.c
* ?var Arnfj?r? Bjarmason [170626 08:47]:
>
> On Mon, Jun 26 2017, Michael Kebe jotted:
>
> > No luck with the patch.
> >
> > Still got:
> >
> > CC sha1dc/sha1.o
> > sha1dc/sha1.c:43:58: error: operator '==' has no right operand
> > (defined(_BYTE_ORDER) &&
Still no luck, with one or both patches.
Greetings
Michael
2017-06-26 14:47 GMT+02:00 Ævar Arnfjörð Bjarmason :
>
> On Mon, Jun 26 2017, Michael Kebe jotted:
>
>> No luck with the patch.
>>
>> Still got:
>>
>> CC sha1dc/sha1.o
>> sha1dc/sha1.c:43:58: error: operator '=='
On Mon, Jun 26 2017, Michael Kebe jotted:
> No luck with the patch.
>
> Still got:
>
> CC sha1dc/sha1.o
> sha1dc/sha1.c:43:58: error: operator '==' has no right operand
> (defined(_BYTE_ORDER) && (_BYTE_ORDER == _BIG_ENDIAN)) || \
>
No luck with the patch.
Still got:
CC sha1dc/sha1.o
sha1dc/sha1.c:43:58: error: operator '==' has no right operand
(defined(_BYTE_ORDER) && (_BYTE_ORDER == _BIG_ENDIAN)) || \
^
gmake: *** [sha1dc/sha1.o] Error 1
Greetings
When compiling 2.13.2 on Solaris SPARC I get this error:
CC sha1dc/sha1.o
sha1dc/sha1.c:41:58: error: operator '==' has no right operand
#if ((defined(_BYTE_ORDER) && (_BYTE_ORDER == _BIG_ENDIAN)) || \
^
gmake: *** [sha1dc/sha1.o]
13 matches
Mail list logo