Skip to content

Commit b89284b

Browse files
committed
Replaced libevent dependency with the getdns default event loop
1 parent a27fb18 commit b89284b

File tree

8 files changed

+10
-47
lines changed

8 files changed

+10
-47
lines changed

ChangeLog

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* 2015-XX-XX: Version 0.8.1
2+
* Removed the libevent dependency to use the getdns default event
3+
loop instead.
4+
15
* 2015-07-13: Version 0.8.0
26
* Added php_getdns_context_set_dns_transport_list() function.
37
* Added php_getdns_context_set_idle_timeout() function.

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
getdns-php
22
==========
33

4-
A PHP language binding for the getdns API, version 0.8.0.
4+
A PHP language binding for the getdns API, version 0.8.1.
55
This implementation is licensed under the New BSD License (BSD-new).
66

77
NOTE: THIS IS A BETA RELEASE!
88

99
Dependencies:
1010

1111
* PHP 5.x (PHP 5.6.8 was used for development and testing)
12-
* libgetdns 0.3.0 (configured with --with-libevent)
13-
* libgetdns_ext_event 0.3.0
12+
* libgetdns 0.3.*
1413
* getdns library header files
1514

1615
The configure script will confirm that the dependencies have been met,

config.m4

+2-18
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,9 @@ if test "$PHP_GETDNS" != "no"; then
1818
AC_MSG_ERROR(Please install the libgetdns library)
1919
fi
2020

21-
AC_MSG_CHECKING(for libgetdns_ext_event in default path)
22-
for i in /usr/local /usr; do
23-
for j in so dylib; do
24-
if test -r $i/lib/libgetdns_ext_event.$j; then
25-
GETDNS_EVENT_DIR=$i
26-
AC_MSG_RESULT(found libgetdns_ext_event.$j in $i)
27-
fi
28-
done
29-
done
30-
31-
if test -z "$GETDNS_EVENT_DIR"; then
32-
AC_MSG_RESULT(not found)
33-
AC_MSG_ERROR(Please install the libgetdns_ext_event library)
34-
fi
35-
3621
AC_MSG_CHECKING([getdns header files])
3722
GETDNS_INC_DIR="/usr/local/include/getdns"
38-
INC_FILES="$GETDNS_INC_DIR/getdns.h $GETDNS_INC_DIR/getdns_extra.h $GETDNS_INC_DIR/getdns_ext_libevent.h"
23+
INC_FILES="$GETDNS_INC_DIR/getdns.h $GETDNS_INC_DIR/getdns_extra.h"
3924
for i in $INC_FILES; do
4025
if test ! -f $i; then
4126
AC_MSG_ERROR([getdns header files not found in $GETDNS_INC_DIR])
@@ -51,13 +36,12 @@ if test "$PHP_GETDNS" != "no"; then
5136
AC_MSG_ERROR([Invalid libgetdns.])
5237
],
5338
[
54-
-L$GETDNS_DIR/lib -lgetdns -lgetdns_ext_event
39+
-L$GETDNS_DIR/lib -lgetdns
5540
]
5641
)
5742

5843
PHP_SUBST(GETDNS_SHARED_LIBADD)
5944
PHP_ADD_LIBRARY_WITH_PATH(getdns, $GETDNS_DIR/lib, GETDNS_SHARED_LIBADD)
60-
PHP_ADD_LIBRARY_WITH_PATH(getdns_ext_event, $GETDNS_DIR/lib, GETDNS_SHARED_LIBADD)
6145
PHP_ADD_INCLUDE($GETDNS_INC_DIR)
6246
AC_DEFINE(HAVE_GETDNS, 1, [whether the getdns extension is enabled])
6347
PHP_NEW_EXTENSION(getdns, phpgetdns.c, $ext_shared)

doc-in/setup.xml

+1-6
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@
1111
<itemizedlist>
1212
<listitem>
1313
<para>
14-
libgetdns 0.2.0
15-
</para>
16-
</listitem>
17-
<listitem>
18-
<para>
19-
libgetdns_ext_event 0.2.0
14+
libgetdns 0.3.0
2015
</para>
2116
</listitem>
2217
<listitem>

doc-out/index.sqlite

0 Bytes
Binary file not shown.

doc-out/php-chunked-xhtml/getdns.requirements.html

-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ <h2 class="title">Requirements</h2>
2121
</p>
2222
</li>
2323
<li class="listitem">
24-
<p class="para">
25-
libgetdns_ext_event 0.3.0
26-
</p>
27-
</li>
28-
<li class="listitem">
2924
<p class="para">
3025
getdns library header files
3126
</p>

php_getdns.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ ZEND_END_MODULE_GLOBALS(getdns)
5757

5858
/* Miscellaneous definitions. */
5959

60-
#define PHP_GETDNS_VERSION "0.8.0"
60+
#define PHP_GETDNS_VERSION "0.8.1"
6161
#define PHP_GETDNS_EXTNAME "getdns"
6262

6363
/* PHP environment setup functions. */

phpgetdns.c

-14
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
#include "php_ini.h"
4747
#include "php_getdns.h"
4848
#include "getdns.h"
49-
#include "getdns_ext_libevent.h"
5049
#include "getdns_extra.h"
5150

5251
ZEND_DECLARE_MODULE_GLOBALS(getdns)
@@ -1461,19 +1460,6 @@ PHP_FUNCTION(php_getdns_context_create)
14611460
/* Store the context value and return the result. */
14621461
convert_to_long(phpOut);
14631462
ZVAL_LONG(phpOut, (long) context);
1464-
1465-
/* Create an event base for async functions. */
1466-
if (result == GETDNS_RETURN_GOOD) {
1467-
struct event_base *eventBase = (struct event_base *) (intptr_t) event_base_new();
1468-
if (eventBase == NULL) {
1469-
result = GETDNS_RETURN_GENERIC_ERROR;
1470-
ZVAL_LONG(phpOut, 0);
1471-
getdns_context_destroy(context);
1472-
}
1473-
else {
1474-
(void) getdns_extension_set_libevent_base(context, eventBase);
1475-
}
1476-
}
14771463
RETURN_LONG((long) result);
14781464
}
14791465

0 commit comments

Comments
 (0)