annotate src/libiberty-test.c @ 2333:f653602a0500

Rebrand to new project name MXE
author Volker Grabsch <vog@notjusthosting.com>
date Wed, 28 Mar 2012 15:46:58 +0200
parents 3c2b40d19505
children 8a6c466753e2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2333
f653602a0500 Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents: 2292
diff changeset
1 /* This file is part of MXE. */
2292
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
2 /* See doc/index.html for further information. */
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
3
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
4 #define _GNU_SOURCE
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
5 #include <stdio.h>
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
6 #include <stdlib.h>
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
7 #include <libiberty.h>
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
8
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
9 int main(int argc, char *argv[])
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
10 {
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
11 char *s;
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
12
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
13 (void)argc;
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
14 (void)argv;
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
15
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
16 if (asprintf(&s, "Test%i", 123) >= 0) {
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
17 printf("asprintf output: %s\n", s);
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
18 free(s);
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
19 return 0;
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
20 } else {
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
21 printf("asprintf() failed!\n");
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
22 return 1;
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
23 }
3c2b40d19505 New package: libiberty
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
24 }