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 F035C7EE79 for ; Fri, 6 May 2016 23:42:04 +0200 (CEST) IronPort-PHdr: 9a23:hz3e2BIIO2tcBjlH2NmcpTZWNBhigK39O0sv0rFitYgUIvvxwZ3uMQTl6Ol3ixeRBMOAu6MC07Wd6/6ocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC3oLviKvqpdX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD89pozcNLUL37cqIkVvQYSW1+ayFmrPHs4CjKVwyJrl4dVH4Vg1IcEg3E6gr5T7/zuy33rfZn1SSGe8bxSOZndy6l6vJJyQV0jSpPHTM/92DLwphygbhcpR/nrRF5xI/ISI6POfx5Y6LZed5cTm1ECJUCHxddC5+xOtNcR9EKOvxV+syk/wMD Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jerome.benoit@grenouille.com; spf=Pass smtp.mailfrom=jerome.benoit@grenouille.com; spf=None smtp.helo=postmaster@laposte.grenouille.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jerome.benoit@grenouille.com) identity=pra; client-ip=91.121.8.57; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jerome.benoit@grenouille.com"; x-sender="jerome.benoit@grenouille.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of jerome.benoit@grenouille.com designates 91.121.8.57 as permitted sender) identity=mailfrom; client-ip=91.121.8.57; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jerome.benoit@grenouille.com"; x-sender="jerome.benoit@grenouille.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@laposte.grenouille.com) identity=helo; client-ip=91.121.8.57; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jerome.benoit@grenouille.com"; x-sender="postmaster@laposte.grenouille.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DuAQDvDi1X/zkIeVtehA19gnuuE4d/AQ2BdhqFdgKBcRQBAQEBAQEBAWQngi2CFQEBAwEMF0sLBQsJAg4TIQICD0gGE4gVAwsMAZAnnR2MPg2EPQEBAQcBAQEBHIpshCIBAYMbglkFmB+FfYgUglmMR0WObwIeAQFCgjaBNzoyhmuBNQEBAQ X-IPAS-Result: A0DuAQDvDi1X/zkIeVtehA19gnuuE4d/AQ2BdhqFdgKBcRQBAQEBAQEBAWQngi2CFQEBAwEMF0sLBQsJAg4TIQICD0gGE4gVAwsMAZAnnR2MPg2EPQEBAQcBAQEBHIpshCIBAYMbglkFmB+FfYgUglmMR0WObwIeAQFCgjaBNzoyhmuBNQEBAQ X-IronPort-AV: E=Sophos;i="5.24,588,1454972400"; d="scan'208";a="176910696" Received: from ns37873.ovh.net (HELO laposte.grenouille.com) ([91.121.8.57]) by mail3-smtp-sop.national.inria.fr with ESMTP; 06 May 2016 23:42:03 +0200 Received: from localhost (localhost.localdomain [127.0.0.1]) by laposte.grenouille.com (Postfix) with ESMTP id 3B7887F61D; Fri, 6 May 2016 23:42:01 +0200 (CEST) X-Virus-Scanned: spam & virus filtering at laposte.grenouille.com X-Spam-Flag: NO X-Spam-Score: -1.902 X-Spam-Level: Received: from laposte.grenouille.com ([127.0.0.1]) by localhost (ns37873.ovh.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fzFYyOph_6SJ; Fri, 6 May 2016 23:41:38 +0200 (CEST) Date: Fri, 6 May 2016 23:41:33 +0200 From: =?UTF-8?B?SsOpcsO0bWU=?= Benoit To: Yaron Minsky Cc: "Soegtrop, Michael" , "caml-list@inria.fr" , "ocaml-core@googlegroups.com" Message-ID: <20160506234133.6f1cb28c@nemesis> In-Reply-To: References: <0F7D3B1B3C4B894D824F5B822E3E5A172CEEEA4D@IRSMSX102.ger.corp.intel.com> Organization: Grenouille.com X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/jNZbaz8N8l4.bpc1/0vvOdh"; protocol="application/pgp-signature" Subject: Re: [Caml-list] How to handle system decencies in Ocaml (like O_ASYNC not implemented in cygwin) --Sig_/jNZbaz8N8l4.bpc1/0vvOdh Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, 6 May 2016 10:33:32 -0400 in , Yaron Minsky wrote: > Looping in the Core mailing list, since this seems like a > core-specific issue. > > I already have a convenient script to setup cygwin with all modules > > and to compile opam and it works fine. Just when compiling core, > > there are two Unix features not implemented in cygwin. One is > > O_ASYNC. It is easy to patch it away and also easy to make this > > system dependent in the C file (unix_stubs.c), but I wonder how I > > could handle this in a portable way in the OCaml wrapper. It looks > > like this: > > Most people that need to make portable code handle flag dependencies on open() - or other flags on standard functions - in the buildsystem with a little piece of C code that open() a file created by the buildsystem with different flags and catch the return code :=20 #include #include #include ... int retasync =3D open(/path/to/test/file, O_ASYNC); ... =20 then define a boolean inside the buildsystem to make conditional compilation based on the boolean.=20 Cheers.=20 --=20 J=C3=A9r=C3=B4me Benoit aka fraggle Piment Noir - http://piment-noir.org OpenPGP Key ID : 9FE9161D Key fingerprint : 9CA4 0249 AF57 A35B 34B3 AC15 FAA0 CB50 9FE9 161D --Sig_/jNZbaz8N8l4.bpc1/0vvOdh Content-Type: application/pgp-signature Content-Description: Signature digitale OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlctD40ACgkQ+qDLUJ/pFh2AhACgnhDWxB6bexY2WwaJMHWNSoTX gUkAoKx+9L9r7+SbrfJgY/im1rJjPSPw =k3vx -----END PGP SIGNATURE----- --Sig_/jNZbaz8N8l4.bpc1/0vvOdh--