]> git.sesse.net Git - vlc/blobdiff - src/network/getaddrinfo.c
Merge branch 'master' of git@git.videolan.org:vlc
[vlc] / src / network / getaddrinfo.c
index f04bed37a735cc5076b46a2c914464c79ba3f0f1..840e300ccff296675c70698fc5d0541f7528f802 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc/vlc.h>
 
 #include <stddef.h> /* size_t */
@@ -118,7 +122,7 @@ static int WSAAPI
 getnameinfo (const struct sockaddr *sa, socklen_t salen,
              char *host, DWORD hostlen, char *serv, DWORD servlen, int flags)
 #else
-static int 
+static int
 getnameinfo (const struct sockaddr *sa, socklen_t salen,
              char *host, int hostlen, char *serv, int servlen, int flags)
 #endif
@@ -289,7 +293,7 @@ static int WSAAPI
 getaddrinfo (const char *node, const char *service,
              const struct addrinfo *hints, struct addrinfo **res)
 #else
-static int 
+static int
 getaddrinfo (const char *node, const char *service,
              const struct addrinfo *hints, struct addrinfo **res)
 #endif
@@ -398,7 +402,7 @@ getaddrinfo (const char *node, const char *service,
         port = 0;
     else
     {
-        long d;
+        unsigned long d;
         char *end;
 
         d = strtoul (service, &end, 0);
@@ -490,7 +494,7 @@ static WSAAPI int _ws2_getnameinfo_bind( const struct sockaddr FAR * sa, socklen
     if (entry == NULL)
     {
         /* not found, use replacement API instead */
-       entry = getnameinfo;
+    entry = getnameinfo;
 
     }
     /* call API before replacing function pointer to avoid crash */
@@ -514,8 +518,8 @@ static WSAAPI int _ws2_getaddrinfo_bind(const char FAR *node, const char FAR *se
     if ((entry == NULL) ||  (freentry == NULL))
     {
         /* not found, use replacement API instead */
-       entry = getaddrinfo;
-       freentry = freeaddrinfo;
+    entry = getaddrinfo;
+    freentry = freeaddrinfo;
     }
     /* call API before replacing function pointer to avoid crash */
     result = entry (node, service, hints, res);
@@ -679,7 +683,7 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
 #if defined (HAVE_GETADDRINFO)
 # ifdef AI_IDN
     /* Run-time I18n Domain Names support */
-    static vlc_bool_t b_idn = VLC_TRUE; /* beware of thread-safety */
+    static bool b_idn = true; /* beware of thread-safety */
 
     if (b_idn)
     {
@@ -691,7 +695,7 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
 
         /* IDN not available: disable and retry without it */
         hints.ai_flags &= ~AI_IDN;
-        b_idn = VLC_FALSE;
+        b_idn = false;
         msg_Info (p_this, "International Domain Names not supported");
     }
 # endif