X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Funexec.c;h=7c885d537011186ac857799cb74d09304ed5abca;hp=06bb9306523df89d04d2c9c7723d87ac919bd05f;hb=b5eeb6918c29470b36f8461c402eb0c65cb19bd2;hpb=755e352634f2cf331256ecc3bf7e45facab3cdc3 diff --git a/src/unexec.c b/src/unexec.c index 06bb930..7c885d5 100644 --- a/src/unexec.c +++ b/src/unexec.c @@ -136,7 +136,7 @@ before writing it (above and beyond the number of bytes of actual 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 @@ pointer looks like an int) but not on all machines. # undef _POSIX_SOURCE # endif -# if defined(__lucid) && !defined(__STDC_EXTENDED__) -# define __STDC_EXTENDED__ 1 -# endif - # include # include # include # include # include - -# ifdef __lucid -# include -# endif +# include #endif @@ -443,7 +436,7 @@ unexec (new_name, a_name, data_start, bss_start, entry_address) { close (new); /* unlink (new_name); / * Failed, unlink new a.out */ - return -1; + return -1; } close (new); @@ -998,7 +991,7 @@ copy_text_and_data (int new, int a_out) 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 @@ copy_text_and_data (int new, int a_out) { 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 @@ write_segment (new, ptr, end) #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;