Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 22 Nov 2002 15:09:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 22 Nov 2002 15:09:58 -0500 Received: from hq.fsmlabs.com ([209.155.42.197]:2233 "EHLO hq.fsmlabs.com") by vger.kernel.org with ESMTP id ; Fri, 22 Nov 2002 15:09:57 -0500 From: Cort Dougan Date: Fri, 22 Nov 2002 13:13:51 -0700 To: Larry McVoy , Linus Torvalds , Stephen Rothwell , LKML , anton@samba.org, "David S. Miller" , ak@muc.de Subject: Re: [PATCH] Beginnings of conpat 32 code cleanups Message-ID: <20021122131351.C30808@duath.fsmlabs.com> References: <20021122162312.32ff4bd3.sfr@canb.auug.org.au> <20021122115454.A481@work.bitmover.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20021122115454.A481@work.bitmover.com>; from lm@bitmover.com on Fri, Nov 22, 2002 at 11:54:54AM -0800 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1708 Lines: 51 "IMHO"? Larry, you're never humble about your opinions :) } IMHO, the thing that the early Unix systems did wrong was to not have } u8, u16, u32, etc as basic ctypes in sys/types.h. And C should have } had a way to fake it if they weren't native. } } Anyone who has ported a networking stack or worked on driver knows exactly } what I'm talking about. } } And while I'm whining, } } assert(strlen(any typedef) < 8)); Plan9 takes it a step further and tackles the char/8-byte issue. A printable character is a 16-byte entity - a rune - while char is an 8-byte quantity. Doing everything in UNICODE forced the issue, I think. Even better, everything was designed to run with different byte-ordering schemes so: ulong getlong(void) { ulong l; l = (getchar()&0xFF)<<24; |= (getchar()&0xFF)<<16; l |= (getchar()&0xFF)<<8; l |= (getchar()&0xFF)<<0; return l; } always works correctly. They even ripped out the darn c-preprocessor and just made a smarter optimization compiler. Improvements in C without ending up with something like C# or C++. Can't beat that with a stick. Ah, yes... the streets are paved with gold in the land of Plan9. } I like my stack variable declarations to line up. I despise some_long_name_t } typedefs with a passion. There is a special kind of mind that allows people to follow 5 levels worth of typedef to struct including stuct with typedefs in them. It involves having a very unhealthy outlook on the world. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/