https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114999
Revision: 114999
Author: vvv
Date: 2012-04-21 18:26:05 +0000 (Sat, 21 Apr 2012)
Log Message:
-----------
You cannot really use pkgconfig for librt, since it is a built-in API provided
by POSIX. Use standard autoconf macro for that.
Modified Paths:
--------------
trunk/php/luasandbox/config.m4
trunk/php/luasandbox/ustring.c
Modified: trunk/php/luasandbox/config.m4
===================================================================
--- trunk/php/luasandbox/config.m4 2012-04-21 10:29:30 UTC (rev 114998)
+++ trunk/php/luasandbox/config.m4 2012-04-21 18:26:05 UTC (rev 114999)
@@ -5,10 +5,6 @@
PHP_ARG_WITH(luasandbox, for luasandbox support,
[ --with-luasandbox Include luasandbox support])
-dnl RT is not available on Mac OS X so we need an easy way to
-dnl disable librt.
-PHP_ARG_WITH(librt, [whether to include librt],
-[ --without-librt Do not attempt to use librt, forced on Mac OS X], yes,
no)
if test "$PHP_LUASANDBOX" != "no"; then
dnl Include pkg-config macros definitions:
@@ -29,22 +25,12 @@
AC_CHECK_ICU( [4.0] )
- AC_MSG_CHECKING([whether to use librt])
- dnl librt does not exist on Mac OS X
- case "$host_alias" in
- *darwin*)
- AC_MSG_RESULT([no, not available on Mac OS X])
- PHP_LIBRT="no"
- ;;
- *)
- AC_MSG_RESULT($PHP_LIBRT)
- ;;
- esac
+ dnl Timers require real-time library on Linux and not supported on other
+ dnl platforms
+ AC_SEARCH_LIBS([timer_create], [rt], [
+ PHP_EVAL_LIBLINE($LIBS, LUASANDBOX_SHARED_LIBADD)
+ ])
- if test "$PHP_LIBRT" != "no"; then
- PKG_CHECK_MODULES([RT], [rt])
- fi
-
dnl LUA_LIBS and LUA_CFLAGS interprets them:
PHP_EVAL_INCLINE($LUA_CFLAGS)
PHP_EVAL_LIBLINE($LUA_LIBS, LUASANDBOX_SHARED_LIBADD)
@@ -52,9 +38,6 @@
PHP_EVAL_INCLINE($ICU_CFLAGS)
PHP_EVAL_LIBLINE($ICU_LIBS, LUASANDBOX_SHARED_LIBADD)
- PHP_EVAL_INCLINE($RT_CFLAGS)
- PHP_EVAL_LIBLINE($RT_LIBS, LUASANDBOX_SHARED_LIBADD)
-
PHP_SUBST(LUASANDBOX_SHARED_LIBADD)
PHP_NEW_EXTENSION(luasandbox, alloc.c data_conversion.c library.c
luasandbox.c timer.c ustring.c, $ext_shared)
fi
Modified: trunk/php/luasandbox/ustring.c
===================================================================
--- trunk/php/luasandbox/ustring.c 2012-04-21 10:29:30 UTC (rev 114998)
+++ trunk/php/luasandbox/ustring.c 2012-04-21 18:26:05 UTC (rev 114999)
@@ -66,9 +66,9 @@
{
luaL_newmetatable( L, "luasandbox_ustr" );
- lua_pushstring( L, "__len" );
- lua_pushcfunction( L, luasandbox_ustr_len );
- lua_rawset( L, -3 );
+ //lua_pushstring( L, "__len" );
+ //lua_pushcfunction( L, luasandbox_ustr_len );
+ //lua_rawset( L, -3 );
lua_pushstring( L, "__concat" );
lua_pushcfunction( L, luasandbox_ustr_concat );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs