I think the Sun compiler has chosen a perverse way to interpret
authorJim Blandy <jimb@red-bean.com>
Tue, 7 Jan 1997 23:42:35 +0000 (23:42 +0000)
committerJim Blandy <jimb@red-bean.com>
Tue, 7 Jan 1997 23:42:35 +0000 (23:42 +0000)
ANSI declarations combined with K&R definitions.  We'll
appease it a little bit.  But when it invades France, we fight.
* print.c (scm_iprlist): Change 'tlr' argument to an int.
* print.h (scm_iprlist): Here too.
* numbers.c (scm_divbigdig): Change definition to match
declaration in numbers.h.
* unif.c (scm_makflo): Change definition to match declaration in
unif.h.

libguile/numbers.c
libguile/print.c
libguile/print.h
libguile/unif.c

index 3605276..474fc4a 100644 (file)
@@ -998,11 +998,16 @@ scm_mulbig(x, nx, y, ny, sgn)
 }
 
 
+/* Sun's compiler complains about the fact that this function has an
+   ANSI prototype in numbers.h, but a K&R declaration here, and the
+   two specify different promotions for the third argument.  I'm going
+   to turn this into an ANSI declaration, and see if anyone complains
+   about it not being K&R.  */
+
 unsigned int
-scm_divbigdig(ds, h, div)
-     SCM_BIGDIG *ds;
-     scm_sizet h;
-     SCM_BIGDIG div;
+scm_divbigdig(SCM_BIGDIG *ds,
+             scm_sizet h,
+             SCM_BIGDIG div)
 {
   register unsigned long t2 = 0;
   while(h--) {
index adc7048..e156226 100644 (file)
@@ -650,7 +650,7 @@ void
 scm_iprlist (hdr, exp, tlr, port, pstate)
      char *hdr;
      SCM exp;
-     char tlr;
+     int tlr;
      SCM port;
      scm_print_state *pstate;
 {
index cb326fb..d16d4f6 100644 (file)
@@ -88,7 +88,7 @@ SCM scm_make_print_state SCM_P ((void));
 void scm_free_print_state SCM_P ((SCM print_state));
 extern void scm_intprint SCM_P ((long n, int radix, SCM port));
 extern void scm_ipruk SCM_P ((char *hdr, SCM ptr, SCM port));
-extern void scm_iprlist SCM_P ((char *hdr, SCM exp, char tlr, SCM port, scm_print_state *pstate));
+extern void scm_iprlist SCM_P ((char *hdr, SCM exp, int tlr, SCM port, scm_print_state *pstate));
 extern void scm_prin1 SCM_P ((SCM exp, SCM port, int writingp));
 extern void scm_iprin1 SCM_P ((SCM exp, SCM port, scm_print_state *pstate));
 extern SCM scm_write SCM_P ((SCM obj, SCM port));
index 9221017..87be8a2 100644 (file)
@@ -174,8 +174,7 @@ scm_vector_set_length_x (vect, len)
 
 
 SCM 
-scm_makflo (x)
-     float x;
+scm_makflo (float x)
 {
   SCM z;
   if (x == 0.0)