From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 70B097ED1D for ; Tue, 13 Oct 2015 14:24:24 +0200 (CEST) IronPort-PHdr: 9a23://Gv2hGezJAAhwuW4SQcnZ1GYnF86YWxBRYc798ds5kLTJ75osSwAkXT6L1XgUPTWs2DsrQf27aQ4/2rAjVIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/ni6biptaIOk1hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv50IbaKvWq0iTqFDRAsrMtcw7cvt/U3GRBGM+2BaTWgXiQFNCg7DxBD8GIvst232u7wu9jOdOJjfQao1VDLqya5nRQWg3C4LLT809knRjdBzyqVBr0Ty9FRE34fIbdTNZ7JFdaTHcIZCSA== Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=adrien@notk.org; spf=PermError smtp.mailfrom=adrien@notk.org; spf=None smtp.helo=postmaster@nautica.notk.org Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of adrien@notk.org) identity=pra; client-ip=91.121.71.147; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="adrien@notk.org"; x-conformance=sidf_compatible Received-SPF: PermError (mail2-smtp-roc.national.inria.fr: cannot correctly interpret sender authenticity information from domain of adrien@notk.org) identity=mailfrom; client-ip=91.121.71.147; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="adrien@notk.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@nautica.notk.org) identity=helo; client-ip=91.121.71.147; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="postmaster@nautica.notk.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ADBgCy9xxW/5NHeVtegyaEH7tCgVqDE4IKfwKBRDkTAQEBAQEBAQGBCYIfgggBAQQjDwFGEAsSBgICBRMOAgIPBRgdFIhFrSaTXQEBCAIBH4EihVOEfoUNB4JpMYEUBZYWjRIIWpsuIwE/hAQ8hyQBAQE X-IPAS-Result: A0ADBgCy9xxW/5NHeVtegyaEH7tCgVqDE4IKfwKBRDkTAQEBAQEBAQGBCYIfgggBAQQjDwFGEAsSBgICBRMOAgIPBRgdFIhFrSaTXQEBCAIBH4EihVOEfoUNB4JpMYEUBZYWjRIIWpsuIwE/hAQ8hyQBAQE X-IronPort-AV: E=Sophos;i="5.17,677,1437429600"; d="scan'208";a="182547707" Received: from nautica.notk.org ([91.121.71.147]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-GCM-SHA384; 13 Oct 2015 14:24:24 +0200 Received: by nautica.notk.org (Postfix, from userid 1003) id 72027C009; Tue, 13 Oct 2015 14:24:23 +0200 (CEST) Date: Tue, 13 Oct 2015 14:24:23 +0200 From: Adrien Nader To: Markus =?utf-8?B?V2Vpw59tYW5u?= Cc: caml-list@inria.fr Message-ID: <20151013122423.GA20981@notk.org> References: <4f63fa9ca9f594db57e700165c0dd674@in.tum.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4f63fa9ca9f594db57e700165c0dd674@in.tum.de> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] detecting 32/64 bit from C On Tue, Oct 13, 2015, Markus Weißmann wrote: > 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? Hi, I believe config.h has the info you want: #define ARCH_SIXTYFOUR // for instance Note how it's installed under $(libdir) and not $(includedir): its content is set at configure-time and depends on the architecture that ocaml has been configured for. -- Adrien Nader