Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* [Caml-list] detecting 32/64 bit from C
@ 2015-10-13 12:04 Markus Weißmann
  2015-10-13 12:24 ` Adrien Nader
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Weißmann @ 2015-10-13 12:04 UTC (permalink / raw)
  To: caml-list

Hello,

is there some "official" way to detect -- from C -- if OCaml was 
compiled for 32 or 64 bit?
I'd love to have something like a #define that either says 32 or 64 
bit;
I need to know at compile time if the OCaml system uses 31 or 63 bit 
sized integers (in the C code).
I don't care what the underlying OS or hardware does, but just what 
OCaml is using.

Btw.: Is [Sys.word_size = 32] for 32 bit OCaml compilers on 64 bit 
machines?

Regards
-Markus

-- 
Markus Weißmann, M.Sc.
Technische Universität München
Institut für Informatik
Boltzmannstr. 3
D-85748 Garching
Germany
http://wwwknoll.in.tum.de/


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-13 14:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-13 12:04 [Caml-list] detecting 32/64 bit from C Markus Weißmann
2015-10-13 12:24 ` Adrien Nader
2015-10-13 14:07   ` Gerd Stolpmann
2015-10-13 14:19     ` Markus Weißmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox