view src/libidn-test.c @ 1791:aa9281d9ff51

package libidn: add "-liconv" to libidn.pc This is necessary for static linking, as demonstrated by the test program that this patch also adds.
author Martin Lambers <marlam@marlam.de>
date Wed, 27 Apr 2011 16:11:54 +0200
parents
children f653602a0500
line wrap: on
line source

/* This file is part of mingw-cross-env.       */
/* See doc/index.html for further information. */

#include <stdlib.h>
#include <idna.h>

int main(int argc, char *argv[])
{
    char *hostname_ascii;

    (void)argc;
    (void)argv;

    if (idna_to_ascii_lz("www.google.com", &hostname_ascii, 0) == IDNA_SUCCESS)
    {
        free(hostname_ascii);
    }

    return 0;
}