*** empty log message ***
[bpt/emacs.git] / src / unexenix.c
index ea6cd7d..c1ad8bb 100644 (file)
@@ -6,13 +6,14 @@
    we don't plan to think about it, or about whether other Emacs
    maintenance might break it.
 
-   Copyright (C) 1988 Free Software Foundation, Inc.
+   Copyright (C) 1988, 1994, 2002, 2003, 2004,
+                 2005, 2006 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
+the Free Software Foundation; either version 2, or (at your option)
 any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
@@ -22,7 +23,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
 
 \f
 
@@ -40,7 +42,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
   gb@entity.com
 */
 
-#include "config.h"
+#include <config.h>
 #include <sys/types.h>
 #include <fcntl.h>
 #include <sys/file.h>
@@ -66,8 +68,7 @@ static void fatal_unexec ();
          fatal_unexec(_error_message, _error_arg);
 
 extern int errno;
-extern int sys_nerr;
-extern char *sys_errlist[];
+extern char *strerror ();
 #define EEOF -1
 
 #ifndef L_SET
@@ -187,7 +188,7 @@ unexec (new_name, a_name, data_start, bss_start, entry_address)
   WRITE (outfd, data_org, datalen,
         "write error on %s", new_name);
 
-  for (i = 2, segpos += (2 * sizeof (struct xseg)); 
+  for (i = 2, segpos += (2 * sizeof (struct xseg));
        i < nsegs;
        i++, segpos += sizeof (struct xseg))
     {
@@ -228,7 +229,7 @@ copyrec (infd, outfd, len, in_name, out_name)
 /*
  * mark_x
  *
- * After succesfully building the new a.out, mark it executable
+ * After successfully building the new a.out, mark it executable
  */
 static
 mark_x (name)
@@ -251,12 +252,13 @@ fatal_unexec (s, va_alist)
   va_list ap;
   if (errno == EEOF)
     fputs ("unexec: unexpected end of file, ", stderr);
-  else if (errno < sys_nerr)
-    fprintf (stderr, "unexec: %s, ", sys_errlist[errno]);
   else
-    fprintf (stderr, "unexec: error code %d, ", errno);
+    fprintf (stderr, "unexec: %s, ", strerror (errno));
   va_start (ap);
   _doprnt (s, ap, stderr);
   fputs (".\n", stderr);
   exit (1);
 }
+
+/* arch-tag: ce26be27-370a-438d-83b4-766059749a02
+   (do not change this comment) */