Mercurial > hg > xemacs-beta
comparison src/unexcw.c @ 442:abe6d1db359e r21-2-36
Import from CVS: tag r21-2-36
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:35:02 +0200 |
parents | a5df635868b2 |
children | 576fb035e263 |
comparison
equal
deleted
inserted
replaced
441:72a7cfa4a488 | 442:abe6d1db359e |
---|---|
27 #include <stdlib.h> | 27 #include <stdlib.h> |
28 #include <unistd.h> | 28 #include <unistd.h> |
29 #include <fcntl.h> | 29 #include <fcntl.h> |
30 #include <config.h> | 30 #include <config.h> |
31 #include <string.h> | 31 #include <string.h> |
32 | |
33 #define DONT_ENCAPSULATE /* filenames are external in unex*.c */ | |
32 #include "sysfile.h" | 34 #include "sysfile.h" |
35 | |
33 #define PERROR(arg) perror(arg);exit(-1) | 36 #define PERROR(arg) perror(arg);exit(-1) |
34 | 37 |
35 #ifndef HAVE_A_OUT_H | 38 #ifndef HAVE_A_OUT_H |
36 unexec (char *, char *, void *, void *, void *) | 39 unexec (char *, char *, void *, void *, void *) |
37 { | 40 { |
38 PERROR("cannot unexec() a.out.h not installed"); | 41 PERROR("cannot unexec() a.out.h not installed"); |
39 } | 42 } |
40 #else | 43 #else |
41 | 44 |
42 #undef CONST | |
43 #ifndef MAX_PATH | 45 #ifndef MAX_PATH |
44 #define MAX_PATH 260 | 46 #define MAX_PATH 260 |
45 #endif | 47 #endif |
46 #include <a.out.h> | 48 #include <a.out.h> |
47 | 49 |
81 printf("we are at %lx, should be at %lx\n", \ | 83 printf("we are at %lx, should be at %lx\n", \ |
82 lseek(a_out, 0, SEEK_CUR), a); \ | 84 lseek(a_out, 0, SEEK_CUR), a); \ |
83 exit(-1); \ | 85 exit(-1); \ |
84 } | 86 } |
85 | 87 |
88 void | |
89 unexec (char *out_name, char *in_name, void *start_data, | |
90 void * d1, void * d2); | |
86 /* Dump out .data and .bss sections into a new executable. */ | 91 /* Dump out .data and .bss sections into a new executable. */ |
87 void unexec (char *out_name, char *in_name, void *start_data, | 92 void unexec (char *out_name, char *in_name, void *start_data, |
88 void * d1, void * d2) | 93 void * d1, void * d2) |
89 { | 94 { |
90 /* ugly nt hack - should be in lisp */ | 95 /* ugly nt hack - should be in lisp */ |