From: Halton Huo <Halton.Huo@Sun.COM>
To: bug-guile@gnu.org
Subject: build fail with sun cc
Date: Tue, 27 Mar 2007 23:56:55 +0800 [thread overview]
Message-ID: <1175011015.14536.2.camel@localhost> (raw)
[-- 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
next reply other threads:[~2007-03-27 15:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-27 15:56 Halton Huo [this message]
2007-03-31 18:36 ` build fail with sun cc Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1175011015.14536.2.camel@localhost \
--to=halton.huo@sun.com \
--cc=bug-guile@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).