/* The contents of this file is in the public domain. */
#include <ipify.h>

int main(void)
{
	char addr[256];
#if 0
	int sd;

	sd = ipify_connect();
	if (sd < 0)
		return 1;

	if (!ipify_query(sd, addr, sizeof(addr)))
		printf("%s\n", addr);

	return ipify_disconnect(sd);
#else
	if (ipify(addr, sizeof(addr)))
		return 1;

	printf("%s\n", addr);
	return 0;
#endif
}

/* The contents of this file is in the public domain. */
#include <ipify.h>

int main(void)
{
	char addr[256];
	int sd;

	sd = ipify_connect();
	if (sd < 0)
		return 1;

	if (!ipify_query(sd, addr, sizeof(addr)))
		printf("%s\n", addr);

	return ipify_disconnect(sd);
}

Drop ifdefs in favor of more comprehensive code
Drop ifdefs in favor of more comprehensive code

Signed-off-by: Joachim Wiberg <583c295fd7602c168ad814279bbc3894ba65f5d6@gmail.com>
