From 0f67656c2ef655dced658062eabe333395e7689b Mon Sep 17 00:00:00 2001 From: kakaroto Date: Thu, 29 Sep 2011 21:05:32 +0000 Subject: [PATCH] Ecore-con: Allow to disable local sockets support, and disable them on ps3 git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@63683 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- configure.ac | 27 ++++++++++++++++++++++++++- src/lib/ecore_con/ecore_con_local.c | 6 ++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a37a142..49e881f 100644 --- a/configure.ac +++ b/configure.ac @@ -95,6 +95,7 @@ AC_CANONICAL_HOST # dependencies and options want_curl="no" +want_local_sockets="yes" want_abstract_sockets="no" want_gnutls="no" want_openssl="no" @@ -224,6 +225,11 @@ case "$host_os" in ;; esac +case "$host_vendor" in + ps3*) + want_local_sockets="no" + ;; +esac requirements_ecore="" requirements_ecore_con="" #requirements_ecore_config="" @@ -293,6 +299,22 @@ if test "x${want_glib_integration_always}" = "xyes" -a "x${want_g_main_loop}" = AC_MSG_ERROR([--enable-glib-integration-always and --enable-glib-main-loop are mutually exclusive]) fi +# local sockets (ecore_con.c) +AC_ARG_ENABLE([local-sockets], + [AC_HELP_STRING([--disable-local-sockets], [disable local sockets.])], + [ + if test "x${enableval}" = "xyes" ; then + want_ecore_con_local_sockets="yes" + else + want_ecore_con_local_sockets="no" + fi + ], + [want_ecore_con_local_sockets=${want_local_sockets}]) + +if test "x${want_ecore_con_local_sockets}" = "xyes" ; then + AC_DEFINE([HAVE_LOCAL_SOCKETS], [1], [Have local sockets support]) +fi + # abstract sockets (ecore_con.c) AC_ARG_ENABLE([abstract-sockets], [AC_HELP_STRING([--disable-abstract-sockets], [disable abstract sockets.])], @@ -1780,7 +1802,10 @@ else fi echo " GnuTLS.....................: $have_gnutls" echo " CURL.......................: $have_curl" - echo " Abstract Sockets...........: $want_abstract_sockets" + echo " Local Sockets..............: $want_local_sockets" +if test "x$want_local_sockets" = "xyes" ; then + echo " Abstract Sockets.........: $want_abstract_sockets" +fi echo " c-ares.....................: $have_cares" fi echo " Ecore_Ipc....................: $have_ecore_ipc" diff --git a/src/lib/ecore_con/ecore_con_local.c b/src/lib/ecore_con/ecore_con_local.c index 1d8afd2..f02cc1f 100644 --- a/src/lib/ecore_con/ecore_con_local.c +++ b/src/lib/ecore_con/ecore_con_local.c @@ -59,6 +59,9 @@ ecore_con_local_connect(Ecore_Con_Server *svr, Eina_Bool (*cb_done)(void *data, Ecore_Fd_Handler *fd_handler), void *data __UNUSED__) { +#ifndef HAVE_LOCAL_SOCKETS + return 0; +#else char buf[4096]; struct sockaddr_un socket_unix; int curstate = 0; @@ -158,6 +161,7 @@ ecore_con_local_connect(Ecore_Con_Server *svr, if (!svr->delete_me) ecore_con_event_server_add(svr); return 1; +#endif } int @@ -170,6 +174,7 @@ ecore_con_local_listen( void *data __UNUSED__) { +#ifdef HAVE_LOCAL_SOCKETS char buf[4096]; struct sockaddr_un socket_unix; struct linger lin; @@ -306,6 +311,7 @@ start: error_umask: umask(pmode); error: +#endif /* HAVE_LOCAL_SOCKETS */ return 0; } -- 2.7.4