aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2012-05-14 08:11:10 -0700
committerPaul Eggert2012-05-14 08:11:10 -0700
commitdc44c39ad51012e645016408c7eec5adfbdeb5f4 (patch)
tree0627d91482c1a5a634979e5ce51803cf9bcc9676 /src
parente18afed7d695edac870ddf55aabc85c0a95a4b5f (diff)
downloademacs-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/ChangeLog8
-rw-r--r--src/unexaix.c25
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 @@
12012-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
12012-05-14 Eli Zaretskii <eliz@gnu.org> 92012-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;
78static long load_scnptr; 78static long load_scnptr;
79static long orig_load_scnptr; 79static long orig_load_scnptr;
80static long orig_data_scnptr; 80static long orig_data_scnptr;
81static int unrelocate_symbols (int, int, char *, char *); 81static 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
87static int adjust_lnnoptrs (int, int, char *); 87static int adjust_lnnoptrs (int, int, const char *);
88 88
89static int pagemask; 89static int pagemask;
90 90
@@ -92,7 +92,7 @@ static int pagemask;
92#include "lisp.h" 92#include "lisp.h"
93 93
94static void 94static void
95report_error (char *file, int fd) 95report_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
106static void 106static void
107report_error_1 (int fd, char *msg, int a1, int a2) 107report_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
113static int make_hdr (int, int, char *, char *); 113static int make_hdr (int, int, const char *, const char *);
114static void mark_x (char *); 114static void mark_x (const char *);
115static int copy_text_and_data (int); 115static int copy_text_and_data (int);
116static int copy_sym (int, int, char *, char *); 116static int copy_sym (int, int, const char *, const char *);
117static void write_segment (int, char *, char *); 117static 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 */
160static int 160static int
161make_hdr (int new, int a_out, 161make_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 */
431static int 431static int
432copy_sym (int new, int a_out, char *a_name, char *new_name) 432copy_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 */
467static void 467static void
468mark_x (char *name) 468mark_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
485static int 485static int
486adjust_lnnoptrs (int writedesc, int readdesc, char *new_name) 486adjust_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
532static int 532static int
533unrelocate_symbols (int new, int a_out, char *a_name, char *new_name) 533unrelocate_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;