From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 74279BB81 for ; Sun, 13 Nov 2005 00:20:59 +0100 (CET) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.202]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jACNKwgh002041 for ; Sun, 13 Nov 2005 00:20:59 +0100 Received: by zproxy.gmail.com with SMTP id x3so1003656nzd for ; Sat, 12 Nov 2005 15:20:58 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=udCmmzFduHVZftDqOoRzWUogxc8kcuQeTqdzpt81u8TN3hU7SaY2TQg5bt0/GTwhAd9O728NKJF3tF8eIAhIwWv+EGLlEnzHEc/YFAn3Pmc/sDV054NU5QbN3Squ6hqgNW3UxJTV4fys/Y/ZNy99p51K1C7ofNe8TXpoAPUY/Pg= Received: by 10.64.184.13 with SMTP id h13mr1143617qbf; Sat, 12 Nov 2005 15:20:58 -0800 (PST) Received: by 10.65.23.20 with HTTP; Sat, 12 Nov 2005 15:20:58 -0800 (PST) Message-ID: Date: Sun, 13 Nov 2005 12:20:58 +1300 From: Jonathan Roewen To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Annoying compiler magic In-Reply-To: <20051112222404.GB1784@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20051112222404.GB1784@localhost> X-Miltered: at nez-perce with ID 437678DA.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 compiler:01 stdlib:01 pervasives:01 desc:01 stdlib:01 desc:01 otherlibs:01 threads:01 pervasives:01 byterun:01 camlprim:01 runtime:01 compiler:01 libcamlrun:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 > grep is your friend. > > $ grep -r caml_sys_open . > ./stdlib/pervasives.ml:external open_desc: string -> open_flag list -> > int -> int =3D "caml_sys_open" > ./stdlib/filename.ml:external open_desc: string -> open_flag list -> > int -> int =3D "caml_sys_open" Both of these instances are commented out, and replaced by functions which raise an exception. > ./otherlibs/threads/pervasives.ml:external open_desc: string -> > open_flag list -> int -> int =3D "caml_sys_open" > ./byterun/sys.c:CAMLprim value caml_sys_open(value path, value vflags, > value vperm) My custom runtime also removes this function. This is a -custom- environment. The question is, why is the compiler adding references to these symbols when my code (stdlib.cma & libcamlrun.a) does NOT reference these. Jonathan