comparison src/unexcw.c @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents de805c49cfc1
children
comparison
equal deleted inserted replaced
411:12e008d41344 412:697ef44129c6
37 { 37 {
38 PERROR("cannot unexec() a.out.h not installed"); 38 PERROR("cannot unexec() a.out.h not installed");
39 } 39 }
40 #else 40 #else
41 41
42 #ifndef MAX_PATH 42 #undef CONST
43 #define MAX_PATH 260 43 #include <windows.h>
44 #endif
45 #include <a.out.h> 44 #include <a.out.h>
46 45
47 #define ALLOC_UNIT 0xFFFF 46 #define ALLOC_UNIT 0xFFFF
48 #define ALLOC_MASK ~((unsigned long)(ALLOC_UNIT)) 47 #define ALLOC_MASK ~((unsigned long)(ALLOC_UNIT))
49 #define ALIGN_ALLOC(addr) \ 48 #define ALIGN_ALLOC(addr) \
80 printf("we are at %lx, should be at %lx\n", \ 79 printf("we are at %lx, should be at %lx\n", \
81 lseek(a_out, 0, SEEK_CUR), a); \ 80 lseek(a_out, 0, SEEK_CUR), a); \
82 exit(-1); \ 81 exit(-1); \
83 } 82 }
84 83
85 void
86 unexec (char *out_name, char *in_name, void *start_data,
87 void * d1, void * d2);
88 /* Dump out .data and .bss sections into a new executable. */ 84 /* Dump out .data and .bss sections into a new executable. */
89 void unexec (char *out_name, char *in_name, void *start_data, 85 void unexec (char *out_name, char *in_name, void *start_data,
90 void * d1, void * d2) 86 void * d1, void * d2)
91 { 87 {
92 /* ugly nt hack - should be in lisp */ 88 /* ugly nt hack - should be in lisp */