[Libreoffice-commits] core.git: config_host/config_features.h.in configure.ac sd/source

Siqi me at siqi.fr
Thu Jul 25 17:08:31 PDT 2013


 config_host/config_features.h.in                   |    2 ++
 configure.ac                                       |    1 +
 sd/source/ui/remotecontrol/AvahiNetworkService.hxx |   20 ++------------------
 sd/source/ui/remotecontrol/DiscoveryService.cxx    |    5 +++--
 4 files changed, 8 insertions(+), 20 deletions(-)

New commits:
commit 0dc8821659ffcca5d48c9c3a133c4f793017f783
Author: Siqi <me at siqi.fr>
Date:   Fri Jul 26 02:04:45 2013 +0200

    use config_features.h.in instead
    
    Change-Id: I1332fc22caae759c65b64e6c43e73740245e4abd

diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index fac764e..e5d5187 100644
--- a/config_host/config_features.h.in
+++ b/config_host/config_features.h.in
@@ -66,4 +66,6 @@
 
 #define HAVE_FEATURE_OPENCL 0
 
+#define HAVE_FEATURE_AVAHI 0
+
 #endif
diff --git a/configure.ac b/configure.ac
index eb6c160..10ffd2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11393,6 +11393,7 @@ if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_avahi" = "yes"; then
                       [ENABLE_AVAHI="TRUE"], [ENABLE_AVAHI=""])
     if test "$ENABLE_AVAHI" = "TRUE"; then
         AC_DEFINE(ENABLE_AVAHI)
+        AC_DEFINE(HAVE_FEATURE_AVAHI)
         AVAHI_CFLAGS=$(printf '%s' "$AVAHI_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
     fi
 fi
diff --git a/sd/source/ui/remotecontrol/AvahiNetworkService.hxx b/sd/source/ui/remotecontrol/AvahiNetworkService.hxx
index 005ad35..96e36db 100644
--- a/sd/source/ui/remotecontrol/AvahiNetworkService.hxx
+++ b/sd/source/ui/remotecontrol/AvahiNetworkService.hxx
@@ -1,23 +1,7 @@
 #ifndef AVAHI_NETWORK_SERVICE_H
 #define AVAHI_NETWORK_SERVICE_H
 
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <algorithm>
-#include <vector>
-#include <iostream>
-
-#include <avahi-client/client.h>
-#include <avahi-client/publish.h>
-#include <avahi-common/thread-watch.h>
-
-#include <avahi-common/alternative.h>
-#include <avahi-common/malloc.h>
-#include <avahi-common/error.h>
-#include <avahi-common/timeval.h>
-
+#include <string>
 #include "ZeroconfService.hxx"
 
 namespace sd {
@@ -25,7 +9,7 @@ namespace sd {
     class AvahiNetworkService : public ZeroconfService
     {
     public:
-        AvahiNetworkService(const std::string& aname = "", uint aport = 1599)
+        AvahiNetworkService(const std::string& aname = "", unsigned int aport = 1599)
             : ZeroconfService(aname, aport){}
         virtual ~AvahiNetworkService(){}
 
diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx
index 62c3e6e..22aca47 100644
--- a/sd/source/ui/remotecontrol/DiscoveryService.cxx
+++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx
@@ -16,6 +16,7 @@
 
 #include <comphelper/processfactory.hxx>
 #include <rtl/strbuf.hxx>
+#include <config_features.h>
 
 #include "DiscoveryService.hxx"
 
@@ -43,7 +44,7 @@
   #import "OSXNetworkService.hxx"
 #endif
 
-#ifdef LINUX
+#if HAVE_FEATURE_AVAHI
   #include "AvahiNetworkService.hxx"
 #endif
 
@@ -60,7 +61,7 @@ DiscoveryService::DiscoveryService()
     zService = new OSXNetworkService();
 #endif
 
-#ifdef ENABLE_AVAHI
+#if HAVE_FEATURE_AVAHI
     // Avahi for Linux
     char hostname[1024];
     hostname[1023] = '\0';


More information about the Libreoffice-commits mailing list