mirror of
https://github.com/cc65/cc65.git
synced 2024-11-15 11:05:56 +00:00
27 lines
533 B
C
27 lines
533 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <sys/utsname.h>
|
|
|
|
|
|
int main (void)
|
|
{
|
|
/* Get the uname data */
|
|
struct utsname buf;
|
|
if (uname (&buf) != 0) {
|
|
perror ("uname");
|
|
return EXIT_FAILURE;
|
|
}
|
|
|
|
/* Print it */
|
|
printf ("sysname: \"%s\"\n", buf.sysname);
|
|
printf ("nodename: \"%s\"\n", buf.nodename);
|
|
printf ("release: \"%s\"\n", buf.release);
|
|
printf ("version: \"%s\"\n", buf.version);
|
|
printf ("machine: \"%s\"\n", buf.machine);
|
|
|
|
/* Done */
|
|
return EXIT_SUCCESS;
|
|
}
|
|
|
|
|