Mercurial > mxe-octave
diff 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 diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/libidn-test.c Wed Apr 27 16:11:54 2011 +0200 @@ -0,0 +1,20 @@ +/* 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; +}