From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr 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 87C617ED1D for ; Tue, 13 Oct 2015 16:19:39 +0200 (CEST) IronPort-PHdr: 9a23:MPg0qxJRPgWNTnng9dmcpTZWNBhigK39O0sv0rFitYgUIvXxwZ3uMQTl6Ol3ixeRBMOAu64C27ed7vGocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC04LniqvvqtX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD89pozcNLUL37cqIkVvQYSW1+ayFmrPHs4DbOVwfH3WcbVn0TmxxOS1zE6h/9dpj8qCe/rfZ63DGfNMvwC7w5D2eM9aBuHTrhkiQaLAkG/WBgj8V2iuoPpRu7pAFkhZHZYZqOMfN4eIvce5UGWG8HUssHBH8JOZ+1c4ZaV7lJBu1ftYSo4gJW9RY= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=markus.weissmann@in.tum.de; spf=None smtp.mailfrom=markus.weissmann@in.tum.de; spf=None smtp.helo=postmaster@mail-out1.informatik.tu-muenchen.de Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of markus.weissmann@in.tum.de) identity=pra; client-ip=131.159.0.8; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="markus.weissmann@in.tum.de"; x-sender="markus.weissmann@in.tum.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of markus.weissmann@in.tum.de) identity=mailfrom; client-ip=131.159.0.8; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="markus.weissmann@in.tum.de"; x-sender="markus.weissmann@in.tum.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-out1.informatik.tu-muenchen.de) identity=helo; client-ip=131.159.0.8; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="markus.weissmann@in.tum.de"; x-sender="postmaster@mail-out1.informatik.tu-muenchen.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AKAQCnEh1WnAgAn4Neg3puv3sdgnaCCn8CgT88EAEBAQEBAQEBEAEBAQEBCAsJCSEugh+CCAEBBCMPAQVBEAQHDgQGAgImAgJJDgYbiCatTZNiAQEBBwEBAQEegSKKUYUNB4JpgUUFlhaNE4Inhm+SeTiCUoFdPDOGcQEBAQ X-IPAS-Result: A0AKAQCnEh1WnAgAn4Neg3puv3sdgnaCCn8CgT88EAEBAQEBAQEBEAEBAQEBCAsJCSEugh+CCAEBBCMPAQVBEAQHDgQGAgImAgJJDgYbiCatTZNiAQEBBwEBAQEegSKKUYUNB4JpgUUFlhaNE4Inhm+SeTiCUoFdPDOGcQEBAQ X-IronPort-AV: E=Sophos;i="5.17,678,1437429600"; d="scan'208";a="182581614" Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 13 Oct 2015 16:19:38 +0200 Received: from webmail.in.tum.de (localhost [127.0.0.1]) by vmwebmail1.informatik.tu-muenchen.de (Postfix) with ESMTP id 038C1240357; Tue, 13 Oct 2015 16:19:38 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 13 Oct 2015 16:19:37 +0200 From: =?UTF-8?Q?Markus_Wei=C3=9Fmann?= To: Gerd Stolpmann Cc: Adrien Nader , In-Reply-To: <1444745220.3982.2.camel@e130.lan.sumadev.de> References: <4f63fa9ca9f594db57e700165c0dd674@in.tum.de> <20151013122423.GA20981@notk.org> <1444745220.3982.2.camel@e130.lan.sumadev.de> Message-ID: X-Sender: markus.weissmann@in.tum.de User-Agent: Roundcube Webmail/0.8.1 Subject: Re: [Caml-list] detecting 32/64 bit from C Perfect -- thanks a lot! -Markus On 2015-10-13 16:07, Gerd Stolpmann wrote: > Am Dienstag, den 13.10.2015, 14:24 +0200 schrieb Adrien Nader: >> 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? > > Yes. > >> >> Hi, >> >> I believe config.h has the info you want: >> #define ARCH_SIXTYFOUR // for instance > > Exactly. > >> 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. > > config.h should be available in $stdlib/caml. It is included from the > other header files. > > Gerd > >> -- >> Adrien Nader >> -- 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/