Hi,
ack. Guess it would be nicer to replace the "change into a bigendian
buf" code
by some code that doesn't check for endian-ness.
E.g. to replace the following code
if (BIG_ENDIAN)
x = bswap_32(x);
memcmp(buffer, &x, 4);
by
write_bigendian(buffer, x);
where
static void write_endian(u8 buf, unsigned long x)
{
u8[3] = (u8) (x % 256);
x /= 256
u8[2] = (u8) (x % 256);
x /= 256
u8[1] = (u8) (x % 256);
x /= 256
u8[0] = (u8) x;
}
It's a some work to replace everything this way; unless someone has a better
idea I'll so it in the WE?
Cheers,
Stef
Ludovic Rousseau wrote:
On 16/06/06, Martin Paljak <[EMAIL PROTECTED]> wrote:
To build on intel mac attached patch was needed for me (endian.h
portability from google gives more insight and alternatives)
I am not sure it is the best way if you use configure.in.
Autoconf defines the macro AC_C_BIGENDIAN([action-if-true],
[action-if-false], [action-if-unknown]) [1] with the default behavior
to define WORDS_BIGENDIAN on the corresponding platforms.
I use this macro to define the host_to_ccid_32() macro in pcsc-lite
for example.
The problem is that configure has no effect if you recompile the code
using X Code on Mac OS X.
Bye,
[1]
http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_chapter/autoconf_5.html#SEC64
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel