[prev in list] [next in list] [prev in thread] [next in thread] 

List:       racket-users
Subject:    [plt-scheme] Simple ffi problem
From:       mflatt () cs ! utah ! edu (Matthew Flatt)
Date:       2006-06-28 1:04:45
Message-ID: 20060628010450.24F4D650080 () mail-svr1 ! cs ! utah ! edu
[Download RAW message or body]

At Mon, 19 Jun 2006 07:49:59 -0600, Evan Farrer wrote:
> > Under Windows, I think #f searches only exports of the current
> > program's ".exe", whereas #f under Unix searches all shared libraries
> > that are part of the program.
> 
> It appears that there has been some change in the behavior of how Windows 
> handles #f to ffi-lib.  Looking at mzlib/os.ss the truncate-file function does 
> a file security check via ffi before proceding the code that it uses is:
> 
> (define msvcrt
>   (if (eq? 'windows (system-type))
>     (delay (ffi-lib "msvcrt"))
>     (delay #f)))
> 
> I'm pretty sure that at one time this worked but it's currently broken.

I imagine it worked before I added the security check, and I forgot to
test after adding it.

I've changed v350.2 for Windows so that `(ffi-lib #f)' represents all
DLLs open in the process. So, the specific "msvcrt" lookup isn't needed
anymore, and the file-security-check function is also found correctly.

Matthew



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic