lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

My understanding is that cygwin and MSDev coexistence gets
more difficult as the MS version numbers get higher.

Some points to note:

 - I have had most of the functions you mention implmeneted for some
time. Let me know if you want code.
 -  errno() should call GetLastError() rather than use errno.
 - I would add to your list the following (I have them implemented),
  dir, exec, files, getpid, getppid, kill and unlink
 Note that the unlink direct equivalent is something like -

#ifdef _WIN32
static int l_unlink(lua_State  *L)
    const char* s = fixpath(L, 1);
          (LPSECURITY_ATTRIBUTES)0,	// address of security descriptor
          (HANDLE)0);				 	   // handle of file with attributes to copy

        if (h!=INVALID_HANDLE_VALUE) {
          return 1;
        return pusherrstr(L, GetLastError());


This simulates the *nix unlink semantics.

- In luasocket Diego has a very good sleep implementation that
sounds similar to what you have done. Check it out.


On 1/15/06, Chris Marrin <> wrote:
> I have been trying to port lposix to compile and link under MSDev. ...