emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108226: * unexaix.c: Port to more-re


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108226: * unexaix.c: Port to more-recent AIX compilers.
Date: Mon, 14 May 2012 08:11:10 -0700
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 108226
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Mon 2012-05-14 08:11:10 -0700
message:
  * 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.
modified:
  src/ChangeLog
  src/unexaix.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-05-14 11:59:28 +0000
+++ b/src/ChangeLog     2012-05-14 15:11:10 +0000
@@ -1,3 +1,11 @@
+2012-05-14  Paul Eggert  <address@hidden>
+
+       * 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.
+
 2012-05-14  Eli Zaretskii  <address@hidden>
 
        * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we

=== modified file 'src/unexaix.c'
--- a/src/unexaix.c     2012-05-09 19:44:19 +0000
+++ b/src/unexaix.c     2012-05-14 15:11:10 +0000
@@ -78,13 +78,13 @@
 static long load_scnptr;
 static long orig_load_scnptr;
 static long orig_data_scnptr;
-static int unrelocate_symbols (int, int, char *, char *);
+static int unrelocate_symbols (int, int, const char *, const char *);
 
 #ifndef MAX_SECTIONS
 #define MAX_SECTIONS   10
 #endif
 
-static int adjust_lnnoptrs (int, int, char *);
+static int adjust_lnnoptrs (int, int, const char *);
 
 static int pagemask;
 
@@ -92,7 +92,7 @@
 #include "lisp.h"
 
 static void
-report_error (char *file, int fd)
+report_error (const char *file, int fd)
 {
   if (fd)
     close (fd);
@@ -104,16 +104,16 @@
 #define ERROR2(msg,x,y) report_error_1 (new, msg, x, y); return -1
 
 static void
-report_error_1 (int fd, char *msg, int a1, int a2)
+report_error_1 (int fd, const char *msg, int a1, int a2)
 {
   close (fd);
   error (msg, a1, a2);
 }
 
-static int make_hdr (int, int, char *, char *);
-static void mark_x (char *);
+static int make_hdr (int, int, const char *, const char *);
+static void mark_x (const char *);
 static int copy_text_and_data (int);
-static int copy_sym (int, int, char *, char *);
+static int copy_sym (int, int, const char *, const char *);
 static void write_segment (int, char *, char *);
 
 /* ****************************************************************
@@ -159,7 +159,7 @@
  */
 static int
 make_hdr (int new, int a_out,
-         char *a_name, char *new_name)
+         const char *a_name, const char *new_name)
 {
   int scns;
   unsigned int bss_start;
@@ -429,7 +429,7 @@
  * Copy the relocation information and symbol table from the a.out to the new
  */
 static int
-copy_sym (int new, int a_out, char *a_name, char *new_name)
+copy_sym (int new, int a_out, const char *a_name, const char *new_name)
 {
   char page[UnexBlockSz];
   int n;
@@ -465,7 +465,7 @@
  * After successfully building the new a.out, mark it executable
  */
 static void
-mark_x (char *name)
+mark_x (const char *name)
 {
   struct stat sbuf;
   int um;
@@ -483,7 +483,7 @@
 }
 
 static int
-adjust_lnnoptrs (int writedesc, int readdesc, char *new_name)
+adjust_lnnoptrs (int writedesc, int readdesc, const char *new_name)
 {
   int nsyms;
   int naux;
@@ -530,7 +530,8 @@
 }
 
 static int
-unrelocate_symbols (int new, int a_out, char *a_name, char *new_name)
+unrelocate_symbols (int new, int a_out,
+                   const char *a_name, const char *new_name)
 {
   int i;
   LDHDR ldhdr;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]