[erlang-questions] Determine architecture - the erlang way??

Emad El-Haraty <>
Sat Jun 2 01:29:41 CEST 2007


begin Logan, Martin quotation:
> Let me rephrase my ambiguous request and elaborate.  I am looking for a
> library written in Erlang that will allow me to determine the
> architecture of a system in such a way as to ensure that C code
> previously compiled for that architecture class will run on it.  
> 
>  



Would using some combination of
erlang:system_info(system_architecture)
erlang:system_info(hipe_architecture)
work ?

The output on various systems:
1> erlang:system_info(system_architecture).
"i686-pc-linux-gnu"

1> erlang:system_info(system_architecture).
"i386-unknown-freebsd6.2"

1> erlang:system_info(system_architecture).
"i386-apple-darwin8.8.1"


-- 
 Emad El-Haraty    



More information about the erlang-questions mailing list