Author: cazfi
Date: Fri Jan 22 16:15:23 2016
New Revision: 31537

URL: http://svn.gna.org/viewcvs/freeciv?rev=31537&view=rev
Log:
Made FREECIV_IPV6_SUPPORT public in freeciv_config.h

See bug #24333

Modified:
    branches/S2_6/client/client_main.c
    branches/S2_6/client/connectdlg_common.c
    branches/S2_6/client/servers.c
    branches/S2_6/configure.ac
    branches/S2_6/gen_headers/freeciv_config.h.in
    branches/S2_6/server/civserver.c
    branches/S2_6/server/sernet.c
    branches/S2_6/utility/netintf.c
    branches/S2_6/utility/netintf.h
    branches/S2_6/utility/shared.c

Modified: branches/S2_6/client/client_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/client_main.c?rev=31537&r1=31536&r2=31537&view=diff
==============================================================================
--- branches/S2_6/client/client_main.c  (original)
+++ branches/S2_6/client/client_main.c  Fri Jan 22 16:15:23 2016
@@ -537,7 +537,7 @@
         announce = ANNOUNCE_IPV4;
       } else if (!strcasecmp(option, "none")) {
         announce = ANNOUNCE_NONE;
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
       } else if(!strcasecmp(option, "ipv6")) {
         announce = ANNOUNCE_IPV6;
 #endif /* IPv6 support */

Modified: branches/S2_6/client/connectdlg_common.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/connectdlg_common.c?rev=31537&r1=31536&r2=31537&view=diff
==============================================================================
--- branches/S2_6/client/connectdlg_common.c    (original)
+++ branches/S2_6/client/connectdlg_common.c    Fri Jan 22 16:15:23 2016
@@ -216,11 +216,11 @@
   char scenscmdline[512];
 #endif /* !HAVE_WORKING_FORK -> WIN32_NATIVE */
 
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
   enum fc_addr_family family = FC_ADDR_ANY;
 #else
   enum fc_addr_family family = FC_ADDR_IPV4;
-#endif /* IPV6_SUPPORT */
+#endif /* FREECIV_IPV6_SUPPORT */
 
   /* only one server (forked from this client) shall be running at a time */
   /* This also resets client_has_hack. */

Modified: branches/S2_6/client/servers.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/servers.c?rev=31537&r1=31536&r2=31537&view=diff
==============================================================================
--- branches/S2_6/client/servers.c      (original)
+++ branches/S2_6/client/servers.c      Fri Jan 22 16:15:23 2016
@@ -365,7 +365,7 @@
   size_t size;
   int family;
 
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
   struct ipv6_mreq mreq6;
 #endif
 
@@ -378,7 +378,7 @@
     return TRUE;
   }
 
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
   if (announce == ANNOUNCE_IPV6) {
     family = AF_INET6;
   } else
@@ -411,7 +411,7 @@
 
   memset(&addr, 0, sizeof(addr));
 
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
   if (family == AF_INET6) {
     addr.saddr.sa_family = AF_INET6;
     addr.saddr_in6.sin6_port = htons(SERVER_LAN_PORT + 1);
@@ -442,7 +442,7 @@
     return FALSE;
   }
 
-#ifndef IPV6_SUPPORT
+#ifndef FREECIV_IPV6_SUPPORT
   {
 #ifdef HAVE_INET_ATON
     inet_aton(group, &mreq4.imr_multiaddr);
@@ -494,7 +494,7 @@
 
   memset(&addr, 0, sizeof(addr));
   
-#ifndef IPV6_SUPPORT
+#ifndef FREECIV_IPV6_SUPPORT
   if (family == AF_INET) {
 #ifdef HAVE_INET_ATON
     inet_aton(group, &addr.saddr_in4.sin_addr);
@@ -613,7 +613,7 @@
 
     if (!fc_strcasecmp("none", servername)) {
       bool nameinfo = FALSE;
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
       char dst[INET6_ADDRSTRLEN];
       char host[NI_MAXHOST], service[NI_MAXSERV];
 

Modified: branches/S2_6/configure.ac
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/configure.ac?rev=31537&r1=31536&r2=31537&view=diff
==============================================================================
--- branches/S2_6/configure.ac  (original)
+++ branches/S2_6/configure.ac  Fri Jan 22 16:15:23 2016
@@ -262,7 +262,7 @@
     AC_MSG_ERROR([Cannot enable IPv6 functionality])
   fi
   if test x$enable_ipv6 = xyes ; then
-    AC_DEFINE([IPV6_SUPPORT], [1], [IPv6 Support built in])
+    AC_DEFINE([FREECIV_IPV6_SUPPORT], [1], [IPv6 Support built in])
   else
     feature_ipv6=missing
   fi

Modified: branches/S2_6/gen_headers/freeciv_config.h.in
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/gen_headers/freeciv_config.h.in?rev=31537&r1=31536&r2=31537&view=diff
==============================================================================
--- branches/S2_6/gen_headers/freeciv_config.h.in       (original)
+++ branches/S2_6/gen_headers/freeciv_config.h.in       Fri Jan 22 16:15:23 2016
@@ -101,4 +101,7 @@
 /* liblzma is available */
 #undef FREECIV_HAVE_LIBLZMA
 
+/* IPv6 Support built in */
+#undef FREECIV_IPV6_SUPPORT
+
 #endif /* FC__FREECIV_CONFIG_H */

Modified: branches/S2_6/server/civserver.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/civserver.c?rev=31537&r1=31536&r2=31537&view=diff
==============================================================================
--- branches/S2_6/server/civserver.c    (original)
+++ branches/S2_6/server/civserver.c    Fri Jan 22 16:15:23 2016
@@ -297,7 +297,7 @@
         srvarg.announce = ANNOUNCE_IPV4;
       } else if(!strcasecmp(option, "none")) {
         srvarg.announce= ANNOUNCE_NONE;
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
       } else if (!strcasecmp(option, "ipv6")) {
         srvarg.announce = ANNOUNCE_IPV6;
 #endif /* IPv6 support */

Modified: branches/S2_6/server/sernet.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/sernet.c?rev=31537&r1=31536&r2=31537&view=diff
==============================================================================
--- branches/S2_6/server/sernet.c       (original)
+++ branches/S2_6/server/sernet.c       Fri Jan 22 16:15:23 2016
@@ -951,7 +951,7 @@
   int new_sock;
   union fc_sockaddr fromend;
   bool nameinfo = FALSE;
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
   char host[NI_MAXHOST], service[NI_MAXSERV];
   char dst[INET6_ADDRSTRLEN];
 #else  /* IPv6 support */
@@ -967,7 +967,7 @@
     return -1;
   }
 
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
   if (fromend.saddr.sa_family == AF_INET6) {
     inet_ntop(AF_INET6, &fromend.saddr_in6.sin6_addr,
               dst, sizeof(dst));
@@ -1004,7 +1004,7 @@
     } conn_list_iterate_end;
   }
 
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
   nameinfo = (0 == getnameinfo(&fromend.saddr, fromlen, host, NI_MAXHOST,
                                service, NI_MAXSERV, NI_NUMERICSERV)
               && '\0' != host[0]);
@@ -1102,7 +1102,7 @@
   fc_errno eno = 0;
   union fc_sockaddr *problematic = NULL;
 
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
   struct ipv6_mreq mreq6;
 #endif
 
@@ -1153,7 +1153,7 @@
 
     /* AF_INET6 sockets should use IPv6 only,
      * without stealing IPv4 from AF_INET sockets. */
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
     if (paddr->saddr.sa_family == AF_INET6) {
 #ifdef IPV6_V6ONLY
       if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
@@ -1225,7 +1225,7 @@
     return 0;
   }
 
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
   if (srvarg.announce == ANNOUNCE_IPV6) {
     lan_family = AF_INET6;
   } else
@@ -1254,7 +1254,7 @@
 
   addr.saddr.sa_family = lan_family;
 
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
   if (addr.saddr.sa_family == AF_INET6) {
     addr.saddr_in6.sin6_family = AF_INET6;
     addr.saddr_in6.sin6_port = htons(SERVER_LAN_PORT);
@@ -1275,7 +1275,7 @@
     log_error("Announcement socket binding failed: %s", 
fc_strerror(fc_get_errno()));
   }
 
-#ifndef IPV6_SUPPORT
+#ifndef FREECIV_IPV6_SUPPORT
   if (addr.saddr.sa_family == AF_INET) {
 #ifdef HAVE_INET_ATON
     inet_aton(group, &mreq4.imr_multiaddr);

Modified: branches/S2_6/utility/netintf.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/netintf.c?rev=31537&r1=31536&r2=31537&view=diff
==============================================================================
--- branches/S2_6/utility/netintf.c     (original)
+++ branches/S2_6/utility/netintf.c     Fri Jan 22 16:15:23 2016
@@ -263,7 +263,7 @@
 ***************************************************************************/
 void sockaddr_debug(union fc_sockaddr *addr, enum log_level lvl)
 {
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
   char buf[INET6_ADDRSTRLEN] = "Unknown";
 
   if (addr->saddr.sa_family == AF_INET6) { 
@@ -302,11 +302,11 @@
 #ifdef WIN32_NATIVE
   return sizeof(*addr);
 #else
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
   if (addr->saddr.sa_family == AF_INET6) {
     return sizeof(addr->saddr_in6);
   } else
-#endif /* IPV6_SUPPORT */
+#endif /* FREECIV_IPV6_SUPPORT */
   if (addr->saddr.sa_family == AF_INET) {
     return sizeof(addr->saddr_in4);
   } else {
@@ -324,7 +324,7 @@
 ***************************************************************************/
 bool sockaddr_ipv6(union fc_sockaddr *addr)
 {
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
   if (addr->saddr.sa_family == AF_INET6) {
     return TRUE;
   }
@@ -357,7 +357,7 @@
       gafam = AF_INET6;
       break;
     case FC_ADDR_ANY:
-#ifndef IPV6_SUPPORT
+#ifndef FREECIV_IPV6_SUPPORT
       gafam = AF_INET;
 #else
       gafam = AF_UNSPEC;
@@ -533,7 +533,7 @@
   int gafamily;
   bool found = FALSE;
 
-#ifndef IPV6_SUPPORT
+#ifndef FREECIV_IPV6_SUPPORT
   fc_assert(family == FC_ADDR_IPV4 || family == FC_ADDR_ANY);
 #endif
 
@@ -541,11 +541,11 @@
    case FC_ADDR_IPV4:
      gafamily = AF_INET;
      break;
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
    case FC_ADDR_IPV6:
      gafamily = AF_INET6;
      break;
-#endif /* IPV6_SUPPORT */
+#endif /* FREECIV_IPV6_SUPPORT */
    case FC_ADDR_ANY:
      gafamily = AF_UNSPEC;
      break;

Modified: branches/S2_6/utility/netintf.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/netintf.h?rev=31537&r1=31536&r2=31537&view=diff
==============================================================================
--- branches/S2_6/utility/netintf.h     (original)
+++ branches/S2_6/utility/netintf.h     Fri Jan 22 16:15:23 2016
@@ -94,9 +94,9 @@
 union fc_sockaddr {
   struct sockaddr saddr;
   struct sockaddr_in saddr_in4;
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
   struct sockaddr_in6 saddr_in6;
-#endif
+#endif /* FREECIV_IPV6_SUPPORT */
 };
 
 /* get 'struct sockaddr_list' and related functions: */

Modified: branches/S2_6/utility/shared.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/shared.c?rev=31537&r1=31536&r2=31537&view=diff
==============================================================================
--- branches/S2_6/utility/shared.c      (original)
+++ branches/S2_6/utility/shared.c      Fri Jan 22 16:15:23 2016
@@ -1779,7 +1779,7 @@
 char *get_multicast_group(bool ipv6_preferred)
 {
   static char *default_multicast_group_ipv4 = "225.1.1.1";
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
   /* TODO: Get useful group (this is node local) */
   static char *default_multicast_group_ipv6 = "FF31::8000:15B4";
 #endif /* IPv6 support */
@@ -1790,7 +1790,7 @@
     if (env) {
       mc_group = fc_strdup(env);
     } else {
-#ifdef IPV6_SUPPORT
+#ifdef FREECIV_IPV6_SUPPORT
       if (ipv6_preferred) {
         mc_group = fc_strdup(default_multicast_group_ipv6);
       } else


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to