]> git.sur5r.net Git - cc65/blob - testcode/lib/uname-test.c
Fixed _textcolor definition.
[cc65] / testcode / lib / uname-test.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <sys/utsname.h>
4
5
6 int main (void)
7 {                  
8     /* Get the uname data */
9     struct utsname buf;
10     if (uname (&buf) != 0) {
11         perror ("uname");
12         return EXIT_FAILURE;
13     }
14
15     /* Print it */      
16     printf ("sysname:  \"%s\"\n", buf.sysname);
17     printf ("nodename: \"%s\"\n", buf.nodename);
18     printf ("release:  \"%s\"\n", buf.release);
19     printf ("version:  \"%s\"\n", buf.version);
20     printf ("machine:  \"%s\"\n", buf.machine);
21
22     /* Done */
23     return EXIT_SUCCESS;
24 }
25
26