unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* build fail with sun cc
@ 2007-03-27 15:56 Halton Huo
  2007-03-31 18:36 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Halton Huo @ 2007-03-27 15:56 UTC (permalink / raw)
  To: bug-guile

[-- Attachment #1: Type: text/plain, Size: 73 bytes --]

sun cc will build fail, just offer two patches to let sun cc build pass.

[-- Attachment #2: guile-01-suncc-inline.diff --]
[-- Type: text/x-patch, Size: 3478 bytes --]

--- guile-1.8.1/libguile/numbers.c.orig	2007-03-22 17:46:53.913105000 +0800
+++ guile-1.8.1/libguile/numbers.c	2007-03-22 17:47:09.790497000 +0800
@@ -183,7 +183,11 @@
 
 \f
 
+#ifdef __GNUC__
 SCM_C_INLINE_KEYWORD SCM
+#else
+SCM
+#endif
 scm_i_mkbig ()
 {
   /* Return a newly created bignum. */
@@ -192,7 +196,11 @@
   return z;
 }
 
+#ifdef __GNUC__
 SCM_C_INLINE_KEYWORD SCM
+#else
+SCM
+#endif
 scm_i_long2big (long x)
 {
   /* Return a newly created bignum initialized to X. */
@@ -201,7 +209,11 @@
   return z;
 }
 
+#ifdef __GNUC__
 SCM_C_INLINE_KEYWORD SCM
+#else
+SCM
+#endif
 scm_i_ulong2big (unsigned long x)
 {
   /* Return a newly created bignum initialized to X. */
@@ -210,7 +222,11 @@
   return z;
 }
 
+#ifdef __GNUC__
 SCM_C_INLINE_KEYWORD SCM
+#else
+SCM
+#endif
 scm_i_clonebig (SCM src_big, int same_sign_p)
 {
   /* Copy src_big's value, negate it if same_sign_p is false, and return. */
@@ -231,7 +247,11 @@
   return result;
 }
 
+#ifdef __GNUC__
 SCM_C_INLINE_KEYWORD SCM
+#else
+SCM
+#endif
 scm_i_dbl2big (double d)
 {
   /* results are only defined if d is an integer */
--- guile-1.8.1/libguile/inline.h.orig	2007-03-22 17:46:58.568383000 +0800
+++ guile-1.8.1/libguile/inline.h	2007-03-22 17:54:51.422844000 +0800
@@ -38,12 +38,14 @@
 #include "libguile/pairs.h"
 
 
+#ifdef __GNUC__
 SCM_API SCM scm_cell (scm_t_bits car, scm_t_bits cdr);
 SCM_API SCM scm_double_cell (scm_t_bits car, scm_t_bits cbr,
 			     scm_t_bits ccr, scm_t_bits cdr);
 
 SCM_API SCM scm_array_handle_ref (scm_t_array_handle *h, ssize_t pos);
 SCM_API void scm_array_handle_set (scm_t_array_handle *h, ssize_t pos, SCM val);
+#endif
 
 
 #if defined SCM_C_INLINE || defined SCM_INLINE_C_INCLUDING_INLINE_H
@@ -59,10 +61,10 @@
 /* definitely inlining */
 #ifdef __GNUC__
 extern
+SCM_C_INLINE
 #else
 static
 #endif
-SCM_C_INLINE
 #endif
 SCM
 scm_cell (scm_t_bits car, scm_t_bits cdr)
@@ -135,10 +137,10 @@
 /* definitely inlining */
 #ifdef __GNUC__
 extern
+SCM_C_INLINE
 #else
 static
 #endif
-SCM_C_INLINE
 #endif
 SCM
 scm_double_cell (scm_t_bits car, scm_t_bits cbr,
@@ -210,10 +212,10 @@
 /* definitely inlining */
 #ifdef __GNUC__
 extern
+SCM_C_INLINE
 #else
 static
 #endif
-SCM_C_INLINE
 #endif
 SCM
 scm_array_handle_ref (scm_t_array_handle *h, ssize_t p)
@@ -225,10 +227,10 @@
 /* definitely inlining */
 #ifdef __GNUC__
 extern
+SCM_C_INLINE
 #else
 static
 #endif
-SCM_C_INLINE
 #endif
 void
 scm_array_handle_set (scm_t_array_handle *h, ssize_t p, SCM v)
@@ -240,10 +242,10 @@
 /* definitely inlining */
 #ifdef __GNUC__
 extern
+SCM_C_INLINE
 #else
 static
 #endif
-SCM_C_INLINE
 #endif
 int
 scm_is_pair (SCM x)
--- guile-1.8.1/libguile/strings.c.orig	2007-03-22 17:47:02.616411000 +0800
+++ guile-1.8.1/libguile/strings.c	2007-03-22 17:47:09.801582000 +0800
@@ -124,7 +124,11 @@
 
 /* Return a new stringbuf whose underlying storage consists of the LEN+1
    octets pointed to by STR (the last octet is zero).  */
+#ifdef __GNUC__
 SCM_C_INLINE_KEYWORD SCM
+#else
+SCM
+#endif
 scm_i_take_stringbufn (char *str, size_t len)
 {
   scm_gc_register_collectable_memory (str, len + 1, "stringbuf");
--- guile-1.8.1/libguile/pairs.h.orig	2007-03-22 17:55:15.533768000 +0800
+++ guile-1.8.1/libguile/pairs.h	2007-03-22 17:57:42.877947000 +0800
@@ -78,7 +78,9 @@
 SCM_API void scm_error_pair_access (SCM);
 #endif
 
+#ifdef __GNUC__
 SCM_API int scm_is_pair (SCM x);
+#endif
 
 SCM_API SCM scm_cons (SCM x, SCM y);
 SCM_API SCM scm_cons2 (SCM w, SCM x, SCM y);

[-- Attachment #3: guile-02-var-imaginary.diff --]
[-- Type: text/x-patch, Size: 703 bytes --]

--- guile-1.8.1/libguile/numbers.c.orig1	2007-03-21 12:29:49.931031000 +0800
+++ guile-1.8.1/libguile/numbers.c	2007-03-21 12:30:00.503712000 +0800
@@ -5336,13 +5336,13 @@
 }
 
 SCM_DEFINE (scm_make_rectangular, "make-rectangular", 2, 0, 0,
-            (SCM real, SCM imaginary),
+            (SCM real, SCM imaginary1),
 	    "Return a complex number constructed of the given @var{real} and\n"
-	    "@var{imaginary} parts.")
+	    "@var{imaginary1} parts.")
 #define FUNC_NAME s_scm_make_rectangular
 {
   struct dpair xy;
-  scm_two_doubles (real, imaginary, FUNC_NAME, &xy);
+  scm_two_doubles (real, imaginary1, FUNC_NAME, &xy);
   return scm_c_make_rectangular (xy.x, xy.y);
 }
 #undef FUNC_NAME

[-- Attachment #4: Type: text/plain, Size: 137 bytes --]

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-31 18:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-27 15:56 build fail with sun cc Halton Huo
2007-03-31 18:36 ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).