lua-users home
lua-l archive

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


> _REENTRANT is a very common way to signal use of a threaded environment, and
> it's orthogonal to the other feature macros on a platform, so you don't run
> the risk of accidentally triggering a conformance mode.

Maybe a better sollution is to change liolib.c like this:

@@ -81,7 +81,7 @@
 
 #if !defined(l_getc)		/* { */
 
-#if defined(LUA_USE_POSIX)
+#if defined(LUA_USE_POSIX) && (!defined(__sun) || defined(_REENTRANT))
 #define l_getc(f)		getc_unlocked(f)
 #define l_lockfile(f)		flockfile(f)
 #define l_unlockfile(f)		funlockfile(f)


-- Roberto