/* Test the getaddrinfo module.
- Copyright (C) 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Written by Simon Josefsson. */
#include <config.h>
+
#include <netdb.h>
+#include "signature.h"
+SIGNATURE_CHECK (freeaddrinfo, void, (struct addrinfo *));
+SIGNATURE_CHECK (gai_strerror, char const *, (int));
+SIGNATURE_CHECK (getaddrinfo, int, (char const *, char const *,
+ struct addrinfo const *,
+ struct addrinfo **));
+
#include <arpa/inet.h>
#include <errno.h>
#include <netinet/in.h>
int main (void)
{
-#if _WIN32
- {
- WORD requested;
- WSADATA data;
- int err;
-
- requested = MAKEWORD (1, 1);
- err = WSAStartup (requested, &data);
- if (err != 0)
- return 1;
-
- if (data.wVersion < requested)
- {
- WSACleanup ();
- return 2;
- }
- }
-#endif
-
return simple (HOST1, SERV1)
+ simple (HOST2, SERV2)
+ simple (HOST3, SERV3)