blob: aca6c48aab5f6cfc03daab83578b33c9b8fb608a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/* This file is part of mingw-cross-env. */
/* See doc/index.html for further information. */
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <libiberty.h>
int main(int argc, char *argv[])
{
char *s;
(void)argc;
(void)argv;
if (asprintf(&s, "Test%i", 123) >= 0) {
printf("asprintf output: %s\n", s);
free(s);
return 0;
} else {
printf("asprintf() failed!\n");
return 1;
}
}
|