Mercurial > hg > xemacs-beta
diff src/unexalpha.c @ 173:8eaf7971accc r20-3b13
Import from CVS: tag r20-3b13
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:49:09 +0200 |
parents | 376386a54a3c |
children | 850242ba4a81 |
line wrap: on
line diff
--- a/src/unexalpha.c Mon Aug 13 09:47:55 2007 +0200 +++ b/src/unexalpha.c Mon Aug 13 09:49:09 2007 +0200 @@ -23,6 +23,9 @@ #include <config.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> #include <sys/types.h> #include <sys/file.h> #include <sys/stat.h> @@ -34,8 +37,8 @@ #include <scnhdr.h> #include <syms.h> -static void fatal_unexec (); -static void mark_x (); +static void fatal_unexec (char *, char *); +static void mark_x (char *); #define READ(_fd, _buffer, _size, _error_message, _error_arg) \ errno = EEOF; \ @@ -141,8 +144,8 @@ if (nhdr.fhdr.f_opthdr != sizeof (nhdr.aout)) { - fprintf (stderr, "unexec: input a.out header is %d bytes, not %d.\n", - nhdr.fhdr.f_opthdr, sizeof (nhdr.aout)); + fprintf (stderr, "unexec: input a.out header is %d bytes, not %ld.\n", + nhdr.fhdr.f_opthdr, (long) (sizeof (nhdr.aout))); exit (1); } if (nhdr.aout.magic != ZMAGIC) @@ -346,6 +349,7 @@ close (old); close (new); mark_x (new_name); + return 0; } @@ -421,8 +425,7 @@ */ static void -mark_x (name) - char *name; +mark_x (char *name) { struct stat sbuf; int um = umask (777); @@ -435,9 +438,7 @@ } static void -fatal_unexec (s, arg) - char *s; - char *arg; +fatal_unexec (char *s, char *arg) { if (errno == EEOF) fputs ("unexec: unexpected end of file, ", stderr);