From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id CC1E37F106 for ; Mon, 18 Jul 2016 10:43:52 +0200 (CEST) IronPort-PHdr: 9a23:lxT4yBRZ7c+VvAn/PQnOltjFV9psv+yvbD5Q0YIujvd0So/mwa64Zh2N2/xhgRfzUJnB7Loc0qyN4vimBT1IyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWD14LrhqibwN76W01wnj2zYLd/fl2djD76kY0ou7ZkMbs70RDTo3FFKKx8zGJsIk+PzV6nvp/jtM0rzyMFsPsk84tEUL7mV6U+V71RSjo8YE4v48i+/yPCRguG/HdUbSMz1FJqBA7I91uyCo3wuSvSv+x71TmbNIvxV79iCmfq1LtiVBK90HRPDDU+6myC0sE= Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=rich@annexia.org; spf=Pass smtp.mailfrom=rich@annexia.org; spf=Pass smtp.helo=postmaster@annexia.org Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of rich@annexia.org) identity=pra; client-ip=80.68.91.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="rich@annexia.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of rich@annexia.org designates 80.68.91.176 as permitted sender) identity=mailfrom; client-ip=80.68.91.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="rich@annexia.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of postmaster@annexia.org designates 80.68.91.176 as permitted sender) identity=helo; client-ip=80.68.91.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="postmaster@annexia.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CBCAAIlYxX/7BbRFBcgz+ESKEQBpZmh0w8EAEBAQEBAQEBZCdBDgGBYhWCVnsTIQUoiGihYZ11hWI+iWOCYIIvBZNjhUEBjlSBXwGNYUiPVjUfgToMgi47giaFSgEBAQ X-IPAS-Result: A0CBCAAIlYxX/7BbRFBcgz+ESKEQBpZmh0w8EAEBAQEBAQEBZCdBDgGBYhWCVnsTIQUoiGihYZ11hWI+iWOCYIIvBZNjhUEBjlSBXwGNYUiPVjUfgToMgi47giaFSgEBAQ X-IronPort-AV: E=Sophos;i="5.28,383,1464645600"; d="scan'208";a="185078630" Received: from annexia.org ([80.68.91.176]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 18 Jul 2016 10:43:52 +0200 Received: from rich by annexia.org with local (Exim 4.84_2) (envelope-from ) id 1bP49V-0000Gb-KU; Mon, 18 Jul 2016 09:43:49 +0100 Date: Mon, 18 Jul 2016 09:43:49 +0100 From: "Richard W.M. Jones" To: caml-list@inria.fr Message-ID: <20160718084349.GC27249@annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Subject: [Caml-list] OCaml max_int and min_int in C This almost feels like an FAQ but I can't find the answer anywhere. We need to check that an integer being returned from some C bindings isn't larger or smaller than Pervasives.max_int / min_int. Are there C macros or constants containing these bounds? Obviously we can define our own but it seems better to use ones from OCaml if they exist. Rich. -- Richard Jones