Commits

Ruslan Osmanov committed 354bcdb

Build errors without extra/ssl libs

Comments (0)

Files changed (3)

classes/buffer_event.c

 	long                port;
 	long                family;
 
+#if HAVE_EVENT_EXTRA_LIB
 	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O!sl|l",
 				&zdns_base, php_event_dns_base_ce, &hostname, &hostname_len,
 				&port, &family) == FAILURE) {
 		return;
 	}
+#else
+	zval *zunused;
+	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zsl|l",
+				&zunused, &hostname, &hostname_len,
+				&port, &family) == FAILURE) {
+		return;
+	}
+#endif
 	
 	if (family & ~(AF_INET | AF_INET6 | AF_UNSPEC)) {
 		php_error_docref(NULL TSRMLS_CC, E_WARNING,
 	 * didn't provide the file descriptor to the bufferevent before, e.g. with
 	 * bufferevent_socket_new() */
 
-#if HAVE_EVENT_EXTRA_LIB
+#ifdef HAVE_EVENT_EXTRA_LIB
 	php_event_dns_base_t *dnsb;
 
 	if (zdns_base) {
 [  --with-event-core        Include core libevent support])
 
 PHP_ARG_WITH(event-extra, for event extra functionality support,
-[  --with-event-extra       Include libevent protocol-specific functionality support including HTTP, DNS, and RPC], yes, yes)
+[  --with-event-extra       Include libevent protocol-specific functionality support including HTTP, DNS, and RPC], yes, no)
 
 PHP_ARG_WITH(event-openssl, for OpenSSL support in event,
-[  --with-event-extra       Include libevent OpenSSL support], yes, yes)
+[  --with-event-openssl Include libevent OpenSSL support], yes, no)
 
 PHP_ARG_WITH(openssl-dir, OpenSSL installation prefix,
-[  --with-openssl-dir[=DIR]  Event: openssl installation prefix], yes, yes)
+[  --with-openssl-dir[=DIR]  Event: openssl installation prefix], yes, no)
 
 PHP_ARG_WITH([event-libevent-dir], [],
-[  --with-event-libevent-dir[=DIR] Event: libevent installation prefix], $PHP_EVENT_CORE, $PHP_EVENT_CORE)
+[  --with-event-libevent-dir[=DIR] Event: libevent installation prefix], $PHP_EVENT_CORE, no)
 
 PHP_ARG_ENABLE(event-debug, Event: debug support,
 [  --enable-event-debug     Enable debug support in event], no, no)
 }
 /* }}} */
 
+#ifdef HAVE_EVENT_EXTRA_LIB
+
 /* {{{ event_dns_base_object_free_storage */
 static void event_dns_base_object_free_storage(void *ptr TSRMLS_DC)
 {
 }
 /* }}} */
 
+#endif /* HAVE_EVENT_EXTRA_LIB */
+
 /* {{{ event_buffer_pos_object_free_storage */
 static void event_buffer_pos_object_free_storage(void *ptr TSRMLS_DC)
 {
 }
 /* }}} */
 
+
+#ifdef HAVE_EVENT_OPENSSL_LIB
 /* {{{ event_ssl_context_object_free_storage */
 static void event_ssl_context_object_free_storage(void *ptr TSRMLS_DC)
 {
 	event_generic_object_free_storage(ptr TSRMLS_CC);
 }
 /* }}} */
+#endif
 
 
 /* {{{ register_object */
 	REGISTER_EVENT_CLASS_CONST_LONG(php_event_util_ce, AF_INET6,  AF_INET6);
 	REGISTER_EVENT_CLASS_CONST_LONG(php_event_util_ce, AF_UNSPEC, AF_UNSPEC);
 
+#ifdef HAVE_EVENT_EXTRA_LIB
 	/* DNS options */
 	REGISTER_EVENT_CLASS_CONST_LONG(php_event_dns_base_ce, OPTION_SEARCH,      DNS_OPTION_SEARCH);
 	REGISTER_EVENT_CLASS_CONST_LONG(php_event_dns_base_ce, OPTION_NAMESERVERS, DNS_OPTION_NAMESERVERS);
 	REGISTER_EVENT_CLASS_CONST_LONG(php_event_dns_base_ce, OPTION_HOSTSFILE,   DNS_OPTION_HOSTSFILE);
 	REGISTER_EVENT_CLASS_CONST_LONG(php_event_dns_base_ce, OPTIONS_ALL,        DNS_OPTIONS_ALL);
 
-#if HAVE_EVENT_EXTRA_LIB
 	REGISTER_EVENT_CLASS_CONST_LONG(php_event_listener_ce, OPT_LEAVE_SOCKETS_BLOCKING, LEV_OPT_LEAVE_SOCKETS_BLOCKING);
 	REGISTER_EVENT_CLASS_CONST_LONG(php_event_listener_ce, OPT_CLOSE_ON_FREE,          LEV_OPT_CLOSE_ON_FREE);
 	REGISTER_EVENT_CLASS_CONST_LONG(php_event_listener_ce, OPT_CLOSE_ON_EXEC,          LEV_OPT_CLOSE_ON_EXEC);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.