Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Annoying compiler magic
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jonathan Roewen <jonathan.roewen@g...>
Subject: Re: [Caml-list] Annoying compiler magic
> grep is your friend.
>
> $ grep -r caml_sys_open .
> ./stdlib/pervasives.ml:external open_desc: string -> open_flag list ->
> int -> int = "caml_sys_open"
> ./stdlib/filename.ml:external open_desc: string -> open_flag list ->
> int -> int = "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 = "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