diff udp.c @ 4206:c3102b189cb6 libavformat

Change semantic of CONFIG_*, HAVE_* and ARCH_*. They are now always defined to either 0 or 1.
author aurel
date Tue, 13 Jan 2009 23:44:16 +0000
parents 2de14ee7b25f
children 77e0c7511d41
line wrap: on
line diff
--- a/udp.c	Tue Jan 13 17:10:10 2009 +0000
+++ b/udp.c	Tue Jan 13 23:44:16 2009 +0000
@@ -29,7 +29,7 @@
 #include <unistd.h>
 #include "network.h"
 #include "os_support.h"
-#ifdef HAVE_SYS_SELECT_H
+#if HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif
 #include <sys/time.h>
@@ -52,7 +52,7 @@
     int is_multicast;
     int local_port;
     int reuse_socket;
-#ifndef CONFIG_IPV6
+#if !CONFIG_IPV6
     struct sockaddr_in dest_addr;
 #else
     struct sockaddr_storage dest_addr;
@@ -72,7 +72,7 @@
         }
     }
 #endif
-#ifdef CONFIG_IPV6
+#if CONFIG_IPV6
     if (addr->sa_family == AF_INET6) {
         if (setsockopt(sockfd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &mcastTTL, sizeof(mcastTTL)) < 0) {
             av_log(NULL, AV_LOG_ERROR, "setsockopt(IPV6_MULTICAST_HOPS): %s\n", strerror(errno));
@@ -96,7 +96,7 @@
         }
     }
 #endif
-#ifdef CONFIG_IPV6
+#if CONFIG_IPV6
     if (addr->sa_family == AF_INET6) {
         struct ipv6_mreq mreq6;
 
@@ -124,7 +124,7 @@
         }
     }
 #endif
-#ifdef CONFIG_IPV6
+#if CONFIG_IPV6
     if (addr->sa_family == AF_INET6) {
         struct ipv6_mreq mreq6;
 
@@ -139,7 +139,7 @@
     return 0;
 }
 
-#ifdef CONFIG_IPV6
+#if CONFIG_IPV6
 static struct addrinfo* udp_ipv6_resolve_host(const char *hostname, int port, int type, int family, int flags) {
     struct addrinfo hints, *res = 0;
     int error;
@@ -342,7 +342,7 @@
     int is_output;
     const char *p;
     char buf[256];
-#ifndef CONFIG_IPV6
+#if !CONFIG_IPV6
     struct sockaddr_in my_addr;
 #else
     struct sockaddr_storage my_addr;