Subject: Re: Kernel build...
To: Johnny Billquist <bqt@Update.UU.SE>
From: None <ragge@ludd.luth.se>
List: port-vax
Date: 06/03/2005 13:46:24
Ok, thanks, fixed now (but by calling the variable __val instead).

I compiled the world yesterday, and the stdbool.h problem seems to be
fixed, but it bailed out on something else.  I hadn't time to look at
what, though.

-- Ragge

> Well, since userland isn't buildable, I thought I'd build a kernel to test
> some other stuff, and found out that kernel isn't buildable either.
> ffs_softdep.c have a name collision with splraise and splx in intr.h for
> the vax, in the variable name "val".
> Here is a small patch to intr.h, which changes it to use the slightly less
> common name Sval. Maybe someone can check this in?
> 
> Is there a problem with including stdbool.h if you don't have gcc3 by the
> way? I haven't checked (or tried) yet, but that would obviously be the
> fastest solution to the problem of building userland for vax.
> 
> 	Johnny
> 
> ------------------------------------------
> Index: intr.h
> ===================================================================
> RCS file: /cvsroot/src/sys/arch/vax/include/intr.h,v
> retrieving revision 1.15
> diff -c -r1.15 intr.h
> *** intr.h      1 Jul 2004 22:58:12 -0000       1.15
> --- intr.h      3 Jun 2005 11:12:10 -0000
> ***************
> *** 72,82 ****
>   #ifndef __lint__
>   #define splx(reg)                                             \
>   ({                                                            \
> !       register int val;                                       \
>         __asm __volatile ("mfpr $0x12,%0;mtpr %1,$0x12"         \
> !                               : "=&g" (val)                   \
>                                 : "g" (reg));                   \
> !       val;                                                    \
>   })
> 
>   #define _splset(reg)                                          \
> --- 72,82 ----
>   #ifndef __lint__
>   #define splx(reg)                                             \
>   ({                                                            \
> !       register int Sval;                                      \
>         __asm __volatile ("mfpr $0x12,%0;mtpr %1,$0x12"         \
> !                               : "=&g" (Sval)                  \
>                                 : "g" (reg));                   \
> !       Sval;                                                   \
>   })
> 
>   #define _splset(reg)                                          \
> ***************
> *** 88,101 ****
> 
>   #define _splraise(reg)                                                \
>   ({                                                            \
> !       register int val;                                       \
>         __asm __volatile ("mfpr $0x12,%0"                       \
> !                               : "=&g" (val)                   \
>                                 : );                            \
> !       if ((reg) > val) {                                      \
>                 _splset(reg);                                   \
>         }                                                       \
> !       val;                                                    \
>   })
> 
>   #define _setsirr(reg)                                         \
> --- 88,101 ----
> 
>   #define _splraise(reg)                                                \
>   ({                                                            \
> !       register int Sval;                                      \
>         __asm __volatile ("mfpr $0x12,%0"                       \
> !                               : "=&g" (Sval)                  \
>                                 : );                            \
> !       if ((reg) > Sval) {                                     \
>                 _splset(reg);                                   \
>         }                                                       \
> !       Sval;                                                   \
>   })
> 
>   #define _setsirr(reg)                                         \
> -----------------------------------------------
> 
> 
> 
> Johnny Billquist                  || "I'm on a bus
>                                   ||  on a psychedelic trip
> email: bqt@update.uu.se           ||  Reading murder books
> pdp is alive!                     ||  tryin' to stay hip" - B. Idol
>