lua-users home
lua-l archive

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


Compiling the standalone lua interpreter with mingw also shows an issue with printing to stderr. It seems that stderr is not flushed immediatly (as it happens with other Windows compilers, lcc for example). I personally added
 
  #ifdef __MINGW32__
    fflush(stderr);
  #endif

in lua.c at the end of both l_message() and print_usage().

Remo D.

> The correct fix is to change
>   #define LUA_LDIR  "!lua"
>   #define LUA_CDIR  "!dll"
> and then use strrchr to find the last backslash and use
> everything up to _and including it_ to replace the "!".
> 
> Not doing it this way fails for the root directory because
> an executable C:\lua.exe needs to resolve the path to
> C:\lua\?.lua and not to C:lua\?.lua or C:\\lua\?.lua.
> 
> Bye,
>      Mike