emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r104659: Port to Sun C.


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104659: Port to Sun C.
Date: Tue, 21 Jun 2011 09:47:56 -0700
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104659
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Tue 2011-06-21 09:47:56 -0700
message:
  Port to Sun C.
  
  * composite.c (find_automatic_composition): Omit needless 'return 0;'
  that Sun C diagnosed.
  * fns.c (secure_hash): Fix pointer signedness issue.
  * intervals.c (static_offset_intervals): New function.
  (offset_intervals): Use it.
modified:
  src/ChangeLog
  src/composite.c
  src/fns.c
  src/intervals.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-06-21 08:55:22 +0000
+++ b/src/ChangeLog     2011-06-21 16:47:56 +0000
@@ -1,3 +1,12 @@
+2011-06-21  Paul Eggert  <address@hidden>
+
+       Port to Sun C.
+       * composite.c (find_automatic_composition): Omit needless 'return 0;'
+       that Sun C diagnosed.
+       * fns.c (secure_hash): Fix pointer signedness issue.
+       * intervals.c (static_offset_intervals): New function.
+       (offset_intervals): Use it.
+
 2011-06-21  Leo Liu  <address@hidden>
 
        * deps.mk (fns.o):

=== modified file 'src/composite.c'
--- a/src/composite.c   2011-06-13 01:35:47 +0000
+++ b/src/composite.c   2011-06-21 16:47:56 +0000
@@ -1676,7 +1676,6 @@
        }
       BACKWARD_CHAR (cur, stop);
     }
-  return 0;
 }
 
 /* Return the adjusted point provided that point is moved from LAST_PT

=== modified file 'src/fns.c'
--- a/src/fns.c 2011-06-21 08:55:22 +0000
+++ b/src/fns.c 2011-06-21 16:47:56 +0000
@@ -4802,7 +4802,7 @@
       return digest;
     }
   else
-    return make_unibyte_string (SDATA (digest), digest_size);
+    return make_unibyte_string (SSDATA (digest), digest_size);
 }
 
 DEFUN ("md5", Fmd5, Smd5, 1, 5, 0,

=== modified file 'src/intervals.c'
--- a/src/intervals.c   2011-06-06 19:43:39 +0000
+++ b/src/intervals.c   2011-06-21 16:47:56 +0000
@@ -1425,10 +1425,15 @@
 /* Make the adjustments necessary to the interval tree of BUFFER to
    represent an addition or deletion of LENGTH characters starting
    at position START.  Addition or deletion is indicated by the sign
-   of LENGTH.  */
-
-inline void
-offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length)
+   of LENGTH.
+
+   The two inline functions (one static) pacify Sun C 5.8, a pre-C99
+   compiler that does not allow calling a static function (here,
+   adjust_intervals_for_deletion) from a non-static inline function.  */
+
+static inline void
+static_offset_intervals (struct buffer *buffer, EMACS_INT start,
+                        EMACS_INT length)
 {
   if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0)
     return;
@@ -1441,6 +1446,12 @@
       adjust_intervals_for_deletion (buffer, start, -length);
     }
 }
+
+inline void
+offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length)
+{
+  static_offset_intervals (buffer, start, length);
+}
 
 /* Merge interval I with its lexicographic successor. The resulting
    interval is returned, and has the properties of the original


reply via email to

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