diff options
| author | Paul Eggert | 2012-05-14 08:11:10 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-05-14 08:11:10 -0700 |
| commit | dc44c39ad51012e645016408c7eec5adfbdeb5f4 (patch) | |
| tree | 0627d91482c1a5a634979e5ce51803cf9bcc9676 /src | |
| parent | e18afed7d695edac870ddf55aabc85c0a95a4b5f (diff) | |
| download | emacs-dc44c39ad51012e645016408c7eec5adfbdeb5f4.tar.gz emacs-dc44c39ad51012e645016408c7eec5adfbdeb5f4.zip | |
* unexaix.c: Port to more-recent AIX compilers.
(report_error, report_error_1, make_hdr, copy_sym)
(mark_x, adjust_lnnoptrs, unrelocate_symbols):
Make arguments const char *, not char *, to avoid violations of C
standard and to fix some AIX warnings reported by Gilles Pion.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/unexaix.c | 25 |
2 files changed, 21 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3f9d575dce2..33e5e27dc39 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2012-05-14 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * unexaix.c: Port to more-recent AIX compilers. | ||
| 4 | (report_error, report_error_1, make_hdr, copy_sym) | ||
| 5 | (mark_x, adjust_lnnoptrs, unrelocate_symbols): | ||
| 6 | Make arguments const char *, not char *, to avoid violations of C | ||
| 7 | standard and to fix some AIX warnings reported by Gilles Pion. | ||
| 8 | |||
| 1 | 2012-05-14 Eli Zaretskii <eliz@gnu.org> | 9 | 2012-05-14 Eli Zaretskii <eliz@gnu.org> |
| 2 | 10 | ||
| 3 | * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we | 11 | * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we |
diff --git a/src/unexaix.c b/src/unexaix.c index e27fb1d136d..29fa0fd6287 100644 --- a/src/unexaix.c +++ b/src/unexaix.c | |||
| @@ -78,13 +78,13 @@ static long data_scnptr; | |||
| 78 | static long load_scnptr; | 78 | static long load_scnptr; |
| 79 | static long orig_load_scnptr; | 79 | static long orig_load_scnptr; |
| 80 | static long orig_data_scnptr; | 80 | static long orig_data_scnptr; |
| 81 | static int unrelocate_symbols (int, int, char *, char *); | 81 | static int unrelocate_symbols (int, int, const char *, const char *); |
| 82 | 82 | ||
| 83 | #ifndef MAX_SECTIONS | 83 | #ifndef MAX_SECTIONS |
| 84 | #define MAX_SECTIONS 10 | 84 | #define MAX_SECTIONS 10 |
| 85 | #endif | 85 | #endif |
| 86 | 86 | ||
| 87 | static int adjust_lnnoptrs (int, int, char *); | 87 | static int adjust_lnnoptrs (int, int, const char *); |
| 88 | 88 | ||
| 89 | static int pagemask; | 89 | static int pagemask; |
| 90 | 90 | ||
| @@ -92,7 +92,7 @@ static int pagemask; | |||
| 92 | #include "lisp.h" | 92 | #include "lisp.h" |
| 93 | 93 | ||
| 94 | static void | 94 | static void |
| 95 | report_error (char *file, int fd) | 95 | report_error (const char *file, int fd) |
| 96 | { | 96 | { |
| 97 | if (fd) | 97 | if (fd) |
| 98 | close (fd); | 98 | close (fd); |
| @@ -104,16 +104,16 @@ report_error (char *file, int fd) | |||
| 104 | #define ERROR2(msg,x,y) report_error_1 (new, msg, x, y); return -1 | 104 | #define ERROR2(msg,x,y) report_error_1 (new, msg, x, y); return -1 |
| 105 | 105 | ||
| 106 | static void | 106 | static void |
| 107 | report_error_1 (int fd, char *msg, int a1, int a2) | 107 | report_error_1 (int fd, const char *msg, int a1, int a2) |
| 108 | { | 108 | { |
| 109 | close (fd); | 109 | close (fd); |
| 110 | error (msg, a1, a2); | 110 | error (msg, a1, a2); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | static int make_hdr (int, int, char *, char *); | 113 | static int make_hdr (int, int, const char *, const char *); |
| 114 | static void mark_x (char *); | 114 | static void mark_x (const char *); |
| 115 | static int copy_text_and_data (int); | 115 | static int copy_text_and_data (int); |
| 116 | static int copy_sym (int, int, char *, char *); | 116 | static int copy_sym (int, int, const char *, const char *); |
| 117 | static void write_segment (int, char *, char *); | 117 | static void write_segment (int, char *, char *); |
| 118 | 118 | ||
| 119 | /* **************************************************************** | 119 | /* **************************************************************** |
| @@ -159,7 +159,7 @@ unexec (const char *new_name, const char *a_name) | |||
| 159 | */ | 159 | */ |
| 160 | static int | 160 | static int |
| 161 | make_hdr (int new, int a_out, | 161 | make_hdr (int new, int a_out, |
| 162 | char *a_name, char *new_name) | 162 | const char *a_name, const char *new_name) |
| 163 | { | 163 | { |
| 164 | int scns; | 164 | int scns; |
| 165 | unsigned int bss_start; | 165 | unsigned int bss_start; |
| @@ -429,7 +429,7 @@ write_segment (int new, char *ptr, char *end) | |||
| 429 | * Copy the relocation information and symbol table from the a.out to the new | 429 | * Copy the relocation information and symbol table from the a.out to the new |
| 430 | */ | 430 | */ |
| 431 | static int | 431 | static int |
| 432 | copy_sym (int new, int a_out, char *a_name, char *new_name) | 432 | copy_sym (int new, int a_out, const char *a_name, const char *new_name) |
| 433 | { | 433 | { |
| 434 | char page[UnexBlockSz]; | 434 | char page[UnexBlockSz]; |
| 435 | int n; | 435 | int n; |
| @@ -465,7 +465,7 @@ copy_sym (int new, int a_out, char *a_name, char *new_name) | |||
| 465 | * After successfully building the new a.out, mark it executable | 465 | * After successfully building the new a.out, mark it executable |
| 466 | */ | 466 | */ |
| 467 | static void | 467 | static void |
| 468 | mark_x (char *name) | 468 | mark_x (const char *name) |
| 469 | { | 469 | { |
| 470 | struct stat sbuf; | 470 | struct stat sbuf; |
| 471 | int um; | 471 | int um; |
| @@ -483,7 +483,7 @@ mark_x (char *name) | |||
| 483 | } | 483 | } |
| 484 | 484 | ||
| 485 | static int | 485 | static int |
| 486 | adjust_lnnoptrs (int writedesc, int readdesc, char *new_name) | 486 | adjust_lnnoptrs (int writedesc, int readdesc, const char *new_name) |
| 487 | { | 487 | { |
| 488 | int nsyms; | 488 | int nsyms; |
| 489 | int naux; | 489 | int naux; |
| @@ -530,7 +530,8 @@ adjust_lnnoptrs (int writedesc, int readdesc, char *new_name) | |||
| 530 | } | 530 | } |
| 531 | 531 | ||
| 532 | static int | 532 | static int |
| 533 | unrelocate_symbols (int new, int a_out, char *a_name, char *new_name) | 533 | unrelocate_symbols (int new, int a_out, |
| 534 | const char *a_name, const char *new_name) | ||
| 534 | { | 535 | { |
| 535 | int i; | 536 | int i; |
| 536 | LDHDR ldhdr; | 537 | LDHDR ldhdr; |