/* errno.c (emx+gcc) */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>

int main (int argc, char *argv[])
{
  int e;

  if (argc != 2)
    {
      fputs ("Usage: errno <number>\n", stderr);
      return 1;
    }
  e = atoi (argv[1]);
  printf ("strerror: %s\n", strerror (e));
  errno = e;
  perror ("  perror");
  return 0;
}
