Mercurial > hg > xemacs-beta
comparison src/unexsol2.c @ 203:850242ba4a81 r20-3b28
Import from CVS: tag r20-3b28
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:02:21 +0200 |
parents | 131b0175ea99 |
children | 92f8ad5d0d3f |
comparison
equal
deleted
inserted
replaced
202:61eefc8fc970 | 203:850242ba4a81 |
---|---|
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
19 Boston, MA 02111-1307, USA. */ | 19 Boston, MA 02111-1307, USA. */ |
20 | 20 |
21 /* Synched up with: Not in FSF. */ | 21 /* Synched up with: Not in FSF. */ |
22 | 22 |
23 /* #pragma ident "@(#) $Id: unexsol2.c,v 1.1.1.1 1996/12/18 22:44:08 steve Exp $" */ | 23 /* #pragma ident "@(#) $Id: unexsol2.c,v 1.2 1997/10/12 01:40:18 steve Exp $" */ |
24 | 24 |
25 #include <stdlib.h> | 25 #include <stdlib.h> |
26 #include <stdio.h> | 26 #include <stdio.h> |
27 #include <dlfcn.h> | 27 #include <dlfcn.h> |
28 | 28 |
34 int | 34 int |
35 unexec(char *new_name, char *old_name, unsigned int data_start, | 35 unexec(char *new_name, char *old_name, unsigned int data_start, |
36 unsigned int bss_start, unsigned int entry_address) | 36 unsigned int bss_start, unsigned int entry_address) |
37 { | 37 { |
38 void *handle; | 38 void *handle; |
39 void (*func)(const char *file); | 39 void (*func)(CONST char *file); |
40 | 40 |
41 if ((handle = dlopen (DYNODUMP_SO, RTLD_LAZY)) == NULL) | 41 if ((handle = dlopen (DYNODUMP_SO, RTLD_LAZY)) == NULL) |
42 { | 42 { |
43 fprintf (stderr, "unexec(): dlopen(%s): %s\n", | 43 fprintf (stderr, "unexec(): dlopen(%s): %s\n", |
44 (char *) DYNODUMP_SO, dlerror()); | 44 (char *) DYNODUMP_SO, dlerror()); |
45 exit (1); | 45 exit (1); |
46 } | 46 } |
47 | 47 |
48 if ((func = (void (*)(const char *)) dlsym (handle, DYNODUMP_SYM)) == NULL) | 48 if ((func = (void (*)(CONST char *)) dlsym (handle, DYNODUMP_SYM)) == NULL) |
49 { | 49 { |
50 fprintf (stderr, "unexec(): dlsym(%s): %s \n", | 50 fprintf (stderr, "unexec(): dlsym(%s): %s \n", |
51 (char *) DYNODUMP_SYM, dlerror()); | 51 (char *) DYNODUMP_SYM, dlerror()); |
52 exit (1); | 52 exit (1); |
53 } | 53 } |