mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-26 20:14:47 +01:00
for now, add files
This commit is contained in:
parent
3cfeca549c
commit
48dfbd42f6
10
Makefile.frag
Normal file
10
Makefile.frag
Normal file
@ -0,0 +1,10 @@
|
||||
dtrace-fixup:
|
||||
if test -f $(builddir)/.libs/phpuv.o ; then \
|
||||
dtrace -h -C -s $(srcdir)/phpuv.d $(builddir)/.libs/phpuv.o ; \
|
||||
else \
|
||||
dtrace -h -C -s $(srcdir)/phpuv.d phpuv.lo ; \
|
||||
fi
|
||||
|
||||
$(srcdir)/libuv/uv.a:
|
||||
$(MAKE) -C $(srcdir)/libuv
|
||||
cp $(srcdir)/libuv/uv.a $(srcdir)/libuv/libuv.a
|
15
config.m4
15
config.m4
@ -5,7 +5,11 @@ PHP_ARG_ENABLE(httpparser, Whether to enable the "httpparser" module,
|
||||
[ --enable-httpparser Enable "httpparser" module support])
|
||||
|
||||
PHP_ARG_ENABLE(uv-debug, for uv debug support,
|
||||
[ --enable-uv-debugEnable enable uv deubg support], no, no)
|
||||
[ --enable-uv-debug Enable enable uv deubg support], no, no)
|
||||
|
||||
PHP_ARG_ENABLE(dtrace, Whether to enable the "dtrace" debug,
|
||||
[ --enable-dtrace Enable "dtrace" support])
|
||||
|
||||
|
||||
if test -z "$PHP_DEBUG"; then
|
||||
AC_ARG_ENABLE(debug,
|
||||
@ -20,6 +24,14 @@ if test "$PHP_UV_DEBUG" != "no"; then
|
||||
AC_DEFINE(PHP_UV_DEBUG, 1, [Enable uv debug support])
|
||||
fi
|
||||
|
||||
if test "$PHP_UV_DTRACE" != "no"; then
|
||||
UV_SHARED_DEPENDENCIES=dtrace-fixup
|
||||
UV_SHARED_LIBADD="phpuv.o -Wl,-M$srcdir/kludge.map"
|
||||
|
||||
PHP_ADD_LIBRARY(dtrace, UV_SHARED_LIBADD)
|
||||
PHP_SUBST(UV_SHARED_DEPENDENCIES)
|
||||
fi
|
||||
|
||||
if test $PHP_UV != "no"; then
|
||||
SOURCES=""
|
||||
|
||||
@ -51,4 +63,5 @@ if test $PHP_UV != "no"; then
|
||||
|
||||
PHP_SUBST(UV_SHARED_LIBADD)
|
||||
PHP_SUBST([CFLAGS])
|
||||
PHP_ADD_MAKEFILE_FRAGMENT
|
||||
fi
|
||||
|
4
php_uv.c
4
php_uv.c
@ -24,6 +24,9 @@
|
||||
#define PHP_UV_DEBUG 0
|
||||
#endif
|
||||
|
||||
#include <dtrace.h>
|
||||
#include <sys/sdt.h>
|
||||
|
||||
#define PHP_UV_INIT_UV(uv, uv_type) \
|
||||
uv = (php_uv_t *)emalloc(sizeof(php_uv_t)); \
|
||||
if (!uv) { \
|
||||
@ -1708,6 +1711,7 @@ static void php_uv_udp_send(int type, INTERNAL_FUNCTION_PARAMETERS)
|
||||
|
||||
PHP_MINIT_FUNCTION(uv)
|
||||
{
|
||||
DTRACE_PROBE(phpuv, minit)
|
||||
php_uv_init(TSRMLS_C);
|
||||
|
||||
uv_resource_handle = zend_register_list_destructors_ex(destruct_uv, NULL, PHP_UV_RESOURCE_NAME, module_number);
|
||||
|
Loading…
Reference in New Issue
Block a user