diff src/unexec.c @ 438:84b14dcb0985 r21-2-27

Import from CVS: tag r21-2-27
author cvs
date Mon, 13 Aug 2007 11:32:25 +0200
parents 3ecd8885ac67
children 8de8e3f6228a
line wrap: on
line diff
--- a/src/unexec.c	Mon Aug 13 11:31:26 2007 +0200
+++ b/src/unexec.c	Mon Aug 13 11:32:25 2007 +0200
@@ -136,7 +136,7 @@
 program text).  HDR's standard fields are already correct, except that
 this adjustment to the `a_text' field has not yet been made;
 thus, the amount of offset can depend on the data in the file.
-  
+
 * A_TEXT_SEEK(HDR)
 
 If defined, this macro specifies the number of bytes to seek into the
@@ -186,19 +186,12 @@
 #  undef _POSIX_SOURCE
 # endif
 
-# if defined(__lucid) && !defined(__STDC_EXTENDED__)
-#  define __STDC_EXTENDED__ 1
-# endif
-
 # include <stddef.h>
 # include <stdlib.h>
 # include <unistd.h>
 # include <string.h>
 # include <stddef.h>
-
-# ifdef __lucid
-#  include <sysent.h>
-# endif
+# include <errno.h>
 
 #endif
 
@@ -443,7 +436,7 @@
     {
       close (new);
       /* unlink (new_name);	    	/ * Failed, unlink new a.out */
-      return -1;	
+      return -1;
     }
 
   close (new);
@@ -998,7 +991,7 @@
     char c;
     int mcount_address, mcount_offset, count;
     extern char *_execname;
-   
+
 
     /* The use of _execname is incompatible with RISCiX 1.1 */
     sprintf (command, "nm %s | fgrep mcount", _execname);
@@ -1018,7 +1011,7 @@
     {
       sprintf (errbuf, "Failed to execute the command '%s'\n", command);
       PERROR (errbuf);
-    }  
+    }
 
     sscanf(address_text, "%x", &mcount_address);
     ptr = (char *) unexec_text_start;
@@ -1076,7 +1069,6 @@
 #if 0
   char buf[80];
 #endif
-  extern int errno;
   /* This is the normal amount to write at once.
      It is the size of block that NFS uses.  */
   int writesize = 1 << 13;