Re: PPC detected as little endian (!)
Gerd Stolpmann <[email protected]> Sun, 30 Sep 2012 13:55:50 +0200
| Newsgroups | gmane.comp.lang.ocaml.lib.net.devel |
|---|---|
| Message-ID | <1349006150.3117.0@samsung> |
Thanks Mat=EDas,
I've changed the test in svn.
Gerd
Am 27.09.2012 00:25:55 schrieb(en) Mat=EDas Giovannini:
> Hello,
> =
> after seeing ocamlnet 3.6 fail spectacularly on a Power Mac, I tried
> recompiling and watching closely the configuration options. Lo and =
> behold,
> configure proudly proclaims:
> =
> Checking endianess... little
> =
> which is of course completely wrong. The problem is that pointer =
> aliasing
> via unions is undefined behavior in C (barring packing pragmas and =
> other
> compiler wizardry), and GCC/LLVM do whatever they want with that =
> code. I've
> found that I can distinguish endianness reliably with the following =
> check:
> =
> value check(value d) {
> int i =3D 1;
> char *s =3D (char*) &i;
> return (s[0] =3D=3D 0 ? Val_true : Val_false);
> }
> =
> Regards,
> Mat=EDas.
> =
------Zitierte Anlage------
> -------------------------------------------------------------------------=
-----
> How fast is your code?
> 3 out of 4 devs don\\\'t know how their code performs in production.
> Find out how slow your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219672;13503038;z?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
------Zitierte Anlage------
> _______________________________________________
> Ocamlnet-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel
> =
-- =
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany [email protected]
Creator of GODI and camlcity.org.
Contact details: http://www.camlcity.org/contact.html
Company homepage: http://www.gerd-stolpmann.de
------------------------------------------------------------
---------------------------------------------------------------------------=
---
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html