lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.61.0607221057050.8381@yvahk01.tjqt.qr>
Date:	Sat, 22 Jul 2006 10:58:44 +0200 (MEST)
From:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
To:	ricknu-0@...dent.ltu.se
cc:	linux-kernel@...r.kernel.org, Andrew Morton <akpm@...l.org>,
	Jeff Garzik <jeff@...zik.org>,
	Alexey Dobriyan <adobriyan@...il.com>,
	Vadim Lobanov <vlobanov@...akeasy.net>,
	Shorty Porty <getshorty_@...mail.com>,
	Peter Williams <pwil3058@...pond.net.au>,
	Michael Buesch <mb@...sch.de>,
	Pekka Enberg <penberg@...helsinki.fi>
Subject: Re: [RFC][PATCH] A generic boolean (version 3)

>+++ b/drivers/block/DAC960.h
>@@ -71,7 +71,7 @@ #define DAC690_V2_PciDmaMask	0xfffffffff
>   Define a Boolean data type.
> */
> 
>-typedef enum { false, true } __attribute__ ((packed)) boolean;
>+typedef bool boolean;
> 
Probably I missed some mail, but why can't we just have typedef _Bool bool?
Like below?

>+++ b/include/asm-i386/types.h
>@@ -1,6 +1,13 @@
> #ifndef _I386_TYPES_H
> #define _I386_TYPES_H
> 
>+#if __GNUC__ >= 3
>+typedef _Bool bool;
>+#else
>+#warning You compiler doesn't seem to support boolean types, will set 'bool' as
>an 'unsigned int'
>+typedef unsigned int bool;
>+#endif
>+
> #ifndef __ASSEMBLY__
> 
> typedef unsigned short umode_t;
>--- a/include/linux/stddef.h
>+++ b/include/linux/stddef.h
>@@ -10,6 +10,17 @@ #else
> #define NULL ((void *)0)
> #endif
> 
>+#undef false
>+#undef true

Wasnot this supposed to go away?

>+
>+enum {
>+	false	= 0,
>+	true	= 1
>+};
>+
>+#define false false
>+#define true true 
>+
> #undef offsetof
> #ifdef __compiler_offsetof
> #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
>

Jan Engelhardt
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ