On 1/26/12 12:42 PM, Jan Honza Odvarko wrote:
> To do a little bug workaround I need to recognize whether Firefox is running in 32 or 64 bits.
>
> I am getting following values when using:
>
> Cc["@
mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime).XPCOMABI
>
> Mac VM on Windows Vista: x86_64-gcc3
> Ubuntu 9.04 VM on Windows Vista: x86-gcc3
> Windows XP& Vista: x86-msvc
>
> Is this safe way to get such information?
>
> What values I am supposed to get on real Mac 32/64 installation and Linux 32/64 installation?
I get "x86-gcc3" in a 32-bit Mac build, and "x86_64-gcc3" in a 64-bit
Mac build.
I suspect that for your specific use case (which really cares about
32-bit GCC, not 32-bit in general), just testing for "x86-gcc3" is fine.
-Boris