blob: f5272cbc770ebbdbfeddd9b0eca7a48ce3c4f8dd (
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
25
26
|
/*
* This file is part of MXE.
* 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;
}
}
|