Mike Gran | 7 Jul 2006 02:36
Picon
Favicon

1.8.0: $< in makefile w/o an implicit rule

In guile-core-1.8-20060705,  in libguile/Makefile, the target for
"version.h: version.h.in" uses the macro $< when there isn't an
implicit rule defined.  This doesn't work in OpenBSD and AIX make.  

You could change the line "sed < $< > $ <at> .tmp" to "sed < version.h.in >
$.tmp" perhaps.

-
Mike Gran

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Mike Gran | 7 Jul 2006 02:49
Picon
Favicon

1.8.0: The ?: operator used in an lvalue context

In guile-core-1.8-20060705, in libguile/environments.c in
core_environments_unobserve(), the question mark/colon operator is
being used without being an rvalue.  Also the value to the left of the
colon appears to be void and the value to the right appears to be a
pointer.

This gets flagged as an error by the AIX xlc compiler.  It might be
cleaner to change it into an if/else.

*** environments.c      2006-07-06 17:00:06.000000000 -0700
--- environments.c.0    2006-07-06 16:57:12.000000000 -0700
*************** 
*** 687,696 ****
          if (scm_is_eq (first, observer))
            {
              /* Remove the first observer */
!           if (handling_weaks)
!                   SCM_SET_CORE_ENVIRONMENT_WEAK_OBSERVERS (env, rest)
!           else
!                   SCM_SET_CORE_ENVIRONMENT_OBSERVERS (env, rest);
              return;
            }

--- 687,695 ----
          if (scm_is_eq (first, observer))
            {
              /* Remove the first observer */
!             handling_weaks
!               ? SCM_SET_CORE_ENVIRONMENT_WEAK_OBSERVERS (env, rest)
!               : SCM_SET_CORE_ENVIRONMENT_OBSERVERS (env, rest);
(Continue reading)

Kevin Ryde | 8 Jul 2006 00:21
Picon
Picon

Re: 1.8.0: The ?: operator used in an lvalue context

Mike Gran <spk121 <at> yahoo.com> writes:
>
> This gets flagged as an error by the AIX xlc compiler.  It might be
> cleaner to change it into an if/else.

Yep, thanks, I made that change.

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

Kevin Ryde | 8 Jul 2006 00:32
Picon
Picon

Re: 1.8.0: $< in makefile w/o an implicit rule

Mike Gran <spk121 <at> yahoo.com> writes:
>
> In guile-core-1.8-20060705,  in libguile/Makefile, the target for
> "version.h: version.h.in" uses the macro $< when there isn't an
> implicit rule defined.  This doesn't work in OpenBSD and AIX make.  

Thanks.  The autoconf manual notes that too in fact.

> You could change the line "sed < $< > $ <at> .tmp" to "sed < version.h.in >
> $.tmp" perhaps.

I changed $< to $(srcdir)/version.h.in, which I think is the right
place to find that file.

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

Larry Evans | 10 Jul 2006 02:54

secant:root-find stop wrong number args

evansl <at> null:~/prog_dev/gnucash/tests$ guile
guile> (define (myfun x)x)
guile> (myfun 2.0)
2.0
guile> (use-modules (ice-9 slib))
guile> (require 'root)
guile> (secant:find-root myfun -100.0 100.0 -3)
ERROR: Wrong number of arguments to #<procedure stop? (x0 x1 fmax count)>
ABORT: (wrong-number-of-args)
guile> (version)
"1.6.7"
guile> evansl <at> null:~/prog_dev/gnucash/tests$

Is there a fix for this somewhere?

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

Larry Evans | 10 Jul 2006 13:50

secant:find-root correct stop (was Re: secant:root-find stop wrong number args

On 07/09/2006 07:54 PM, Larry Evans wrote:
> evansl <at> null:~/prog_dev/gnucash/tests$ guile
> guile> (define (myfun x)x)
> guile> (myfun 2.0)
> 2.0
> guile> (use-modules (ice-9 slib))
> guile> (require 'root)
> guile> (secant:find-root myfun -100.0 100.0 -3)
> ERROR: Wrong number of arguments to #<procedure stop? (x0 x1 fmax count)>
> ABORT: (wrong-number-of-args)
> guile> (version)
> "1.6.7"
> guile> evansl <at> null:~/prog_dev/gnucash/tests$
> 
> Is there a fix for this somewhere?
Adding a extra formal arg to stop? works for my test:

   (letrec ((stop?
	    (cond ((procedure? prec) prec)
		  ((and (integer? prec) (negative? prec))
		   (lambda (x0 x1 fmax count ignore)
                                            ;;^^^^^^ extra arg
		     (>= count (- prec))))
		  (else
		   (lambda (x0 f0 x1 f1 count)
		     (and (< (abs f0) prec)
			  (< (abs f1) prec))))))

_______________________________________________
Bug-guile mailing list
(Continue reading)

Larry Evans | 10 Jul 2006 15:33

Re: secant:find-root correct stop (was Re: secant:root-find stop wrong number args

On 07/10/2006 06:50 AM, Larry Evans wrote:
> On 07/09/2006 07:54 PM, Larry Evans wrote:
> 
>> evansl <at> null:~/prog_dev/gnucash/tests$ guile
>> guile> (define (myfun x)x)
>> guile> (myfun 2.0)
>> 2.0
>> guile> (use-modules (ice-9 slib))
>> guile> (require 'root)
>> guile> (secant:find-root myfun -100.0 100.0 -3)
>> ERROR: Wrong number of arguments to #<procedure stop? (x0 x1 fmax count)>
>> ABORT: (wrong-number-of-args)
>> guile> (version)
>> "1.6.7"
>> guile> evansl <at> null:~/prog_dev/gnucash/tests$
>>
>> Is there a fix for this somewhere?
> 
> Adding a extra formal arg to stop? works for my test:
> 
>   (letrec ((stop?
>         (cond ((procedure? prec) prec)
>           ((and (integer? prec) (negative? prec))
>            (lambda (x0 x1 fmax count ignore)
>                                    ;;^^^^^^ extra arg
>              (>= count (- prec))))
>           (else
>            (lambda (x0 f0 x1 f1 count)
>              (and (< (abs f0) prec)
>               (< (abs f1) prec))))))
(Continue reading)

Mike Gran | 12 Jul 2006 05:58
Picon
Favicon

1.8.0: C++-style cast

In guile-core-1.8-20060711, in libguile/numbers.c, in
guile_ieee_init(), a C++ style cast is used instead of a C-style cast. 
Also, a declaration block occurs in a code block.  These bend the rules
of old-school ANSI C.

--- numbers.c.orig      2006-05-09 16:15:10.000000000 -0700
+++ numbers.c   2006-07-11 20:54:36.000000000 -0700
 <at>  <at>  -598,7 +598,7  <at>  <at> 
 #elif HAVE_DINFINITY
   /* OSF */
   extern unsigned int DINFINITY[2];
-  guile_Inf = (*(X_CAST(double *, DINFINITY)));
+  guile_Inf = (*((double *) (DINFINITY)));
 #else
   double tmp = 1e+10;
   guile_Inf = tmp;
 <at>  <at>  -619,9 +619,11  <at>  <at> 
   /* C99 NAN, when available */
   guile_NaN = NAN;
 #elif HAVE_DQNAN
-  /* OSF */
-  extern unsigned int DQNAN[2];
-  guile_NaN =  (*(X_CAST(double *, DQNAN)));
+  {
+    /* OSF */ 
+    extern unsigned int DQNAN[2];
+    guile_NaN = (*((double *)(DQNAN)));
+  }
 #else
   guile_NaN = guile_Inf / guile_Inf;
(Continue reading)

Ludovic Courtès | 12 Jul 2006 10:20
Picon
Picon
Favicon

Re: 1.8.0: C++-style cast

Hi,

Mike Gran <spk121 <at> yahoo.com> writes:

> In guile-core-1.8-20060711, in libguile/numbers.c, in
> guile_ieee_init(), a C++ style cast is used instead of a C-style cast. 
> Also, a declaration block occurs in a code block.  These bend the rules
> of old-school ANSI C.

I checked it and committed it to both 1.8 and HEAD.

Thanks!

Ludovic

PS to Kevin: Can you eventually merge into HEAD your recent fixes in 1.8?

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

Kevin Ryde | 13 Jul 2006 03:48
Picon
Picon

Re: 1.8.0: C++-style cast

Mike Gran <spk121 <at> yahoo.com> writes:
>
> In guile-core-1.8-20060711, in libguile/numbers.c, in
> guile_ieee_init(), a C++ style cast is used instead of a C-style cast. 
> Also, a declaration block occurs in a code block.  These bend the rules
> of old-school ANSI C.
>
> -  guile_Inf = (*(X_CAST(double *, DINFINITY)));
> +  guile_Inf = (*((double *) (DINFINITY)));
>
> ...

I don't think it's c++.  I'm guessing X_CAST is an OSF macro.  Dunno
if it does anything good.  John Eaton contributed that, maybe he can
say (Cc'ed).

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


Gmane