lua-users home
lua-l archive

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


> > -#if defined(LUA_USE_POSIX)
> > +#if defined(LUA_USE_POSIX) && (!defined(__sun) || defined(_REENTRANT))
> 
> I prefer just adding _REENTRANT to the Solaris target CPPFLAGS, otherwise
> people will needlessly get different behavior on Solaris than on other Unix
> systems. Few will know to enable it, and there's no indication that they're
> getting less-than-desirable behavior.

The only difference is that they are getting "non-reentrant" code
(actually non thread-safe code), because they did not ask for it. This
already happens in all versions of Lua. Should everybody get reentrant
code, even if not needed? The Solaris documentation does not recommend
that:

  http://docs.oracle.com/cd/E19683-01/806-6867/compile-4/index.html

  Note –
  Compile single-threaded applications, not linked with either of the
  thread libraries (libthread.so.1 or libpthread.so.1), without the
  -D_REENTRANT flag. This eliminates performance degradation incurred when
  macros, such as putc(3s), are converted into reentrant function calls.


> At least with -work3 compilation fails.

??

-- Roberto