Re: un-boolean_t ANSIfy ddb(4) for hppa & sparc64

2019-11-20 Thread Andras Farkas
On Wed, Nov 20, 2019 at 9:38 AM Theo de Raadt wrote: > Kernel environment cannot use userland includes. On Wed, Nov 20, 2019 at 12:18 PM Todd C. Miller wrote: > Changing from int -> bool is error prone since you inevitably have > code that use true, false and -1. Finding those outliers that are

Re: un-boolean_t ANSIfy ddb(4) for hppa & sparc64

2019-11-20 Thread Jonathan Gray
On Wed, Nov 20, 2019 at 10:25:59AM -0700, Theo de Raadt wrote: > Todd C. Miller wrote: > > > On Wed, 20 Nov 2019 10:17:09 -0700, "Theo de Raadt" wrote: > > > > > Todd C. Miller wrote: > > > > > > > On Wed, 20 Nov 2019 07:38:46 -0700, "Theo de Raadt" wrote: > > > > > > > > > Kernel environment

Re: un-boolean_t ANSIfy ddb(4) for hppa & sparc64

2019-11-20 Thread Theo de Raadt
Todd C. Miller wrote: > On Wed, 20 Nov 2019 10:17:09 -0700, "Theo de Raadt" wrote: > > > Todd C. Miller wrote: > > > > > On Wed, 20 Nov 2019 07:38:46 -0700, "Theo de Raadt" wrote: > > > > > > > Kernel environment cannot use userland includes. > > > > > > Some other systems have sys/stdbool.h,

Re: un-boolean_t ANSIfy ddb(4) for hppa & sparc64

2019-11-20 Thread Todd C . Miller
On Wed, 20 Nov 2019 10:17:09 -0700, "Theo de Raadt" wrote: > Todd C. Miller wrote: > > > On Wed, 20 Nov 2019 07:38:46 -0700, "Theo de Raadt" wrote: > > > > > Kernel environment cannot use userland includes. > > > > Some other systems have sys/stdbool.h, we could as well if we wanted > > to. Th

Re: un-boolean_t ANSIfy ddb(4) for hppa & sparc64

2019-11-20 Thread Todd C . Miller
On Wed, 20 Nov 2019 05:42:39 -0500, Andras Farkas wrote: > Out of curiosity, why not just use stdbool.h if these are actually > meant to be booleans? Wouldn't that be more readable? > I wonder if there's something I'm not understanding. Changing from int -> bool is error prone since you inevitab

Re: un-boolean_t ANSIfy ddb(4) for hppa & sparc64

2019-11-20 Thread Theo de Raadt
Todd C. Miller wrote: > On Wed, 20 Nov 2019 07:38:46 -0700, "Theo de Raadt" wrote: > > > Kernel environment cannot use userland includes. > > Some other systems have sys/stdbool.h, we could as well if we wanted > to. The simplest approach is to move include/stdbool.h -> > sys/sys/stdbool.h and

Re: un-boolean_t ANSIfy ddb(4) for hppa & sparc64

2019-11-20 Thread Todd C . Miller
On Wed, 20 Nov 2019 07:38:46 -0700, "Theo de Raadt" wrote: > Kernel environment cannot use userland includes. Some other systems have sys/stdbool.h, we could as well if we wanted to. The simplest approach is to move include/stdbool.h -> sys/sys/stdbool.h and make /usr/include/stdbool.h a link to

Re: un-boolean_t ANSIfy ddb(4) for hppa & sparc64

2019-11-20 Thread Theo de Raadt
Kernel environment cannot use userland includes. Andras Farkas wrote: > Out of curiosity, why not just use stdbool.h if these are actually > meant to be booleans? Wouldn't that be more readable? > I wonder if there's something I'm not understanding. > > On Tue, Nov 5, 2019 at 8:05 AM Martin Pi

Re: un-boolean_t ANSIfy ddb(4) for hppa & sparc64

2019-11-20 Thread Andras Farkas
Out of curiosity, why not just use stdbool.h if these are actually meant to be booleans? Wouldn't that be more readable? I wonder if there's something I'm not understanding. On Tue, Nov 5, 2019 at 8:05 AM Martin Pieuchot wrote: > > ok? > > Index: arch/hppa/hppa/db_disasm.c >

un-boolean_t ANSIfy ddb(4) for hppa & sparc64

2019-11-05 Thread Martin Pieuchot
ok? Index: arch/hppa/hppa/db_disasm.c === RCS file: /cvs/src/sys/arch/hppa/hppa/db_disasm.c,v retrieving revision 1.20 diff -u -p -r1.20 db_disasm.c --- arch/hppa/hppa/db_disasm.c 15 Oct 2014 17:22:56 - 1.20 +++ arch/hppa/hp