From owner-freebsd-arch Sun Oct 29 6:14:54 2000 Delivered-To: freebsd-arch@freebsd.org Received: from njord.bart.nl (njord.bart.nl [194.158.170.15]) by hub.freebsd.org (Postfix) with ESMTP id AFC9B37B4C5 for ; Sun, 29 Oct 2000 06:14:51 -0800 (PST) Received: from daemon.chronias.ninth-circle.org (root@daemon.ninth-circle.org [195.38.210.81]) by njord.bart.nl (8.10.1/8.10.1) with ESMTP id e9TEDeO39116 for ; Sun, 29 Oct 2000 15:13:56 +0100 (CET) Received: (from asmodai@localhost) by daemon.chronias.ninth-circle.org (8.11.0/8.11.0) id e9TEC6k98021 for arch@freebsd.org; Sun, 29 Oct 2000 15:12:06 +0100 (CET) (envelope-from asmodai) Date: Sun, 29 Oct 2000 15:12:06 +0100 From: Jeroen Ruigrok/Asmodai To: arch@freebsd.org Subject: endian.h Message-ID: <20001029151205.C88101@daemon.ninth-circle.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i Organisation: Ninth-Circle Enterprises Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is a bit of a hairy problem. On FreeBSD we have which defines things like BYTE_ORDER and BIG_ENDIAN. On OpenBSD we have which is included from <[archname]/endian.h> and defines BIG_ENDIAN and BYTE_ORDER. On NetBSD we also have , but we also have <[archname]/endian.h> and <[archname]/endian_machdep.h> and there we define _BYTE_ORDER and _BIG_ENDIAN. However they also wrap BYTE_ORDER and BIG_ENDIAN with _POSIX_SOURCE to provide backwards compatibility. Linux has which defines __BYTE_ORDER and __BIG_ENDIAN. I cannot find, this quickly, any references towards an endian.h or BYTE_ORDER/BIG_ENDIAN standardness in C99, POSIX [latest drafts] or in SUSv2. Is someone able to shed some light on this? I could envision that we might want a symlinked to and possibly our old and traditional BSD BYTE_ORDER definitions wrapped as NetBSD did and then define some underscored names for usage in POSIX environments. -- Jeroen Ruigrok vd Werven/Asmodai asmodai@[wxs.nl|bart.nl|freebsd.org] Documentation nutter/C-rated Coder BSD: Technical excellence at its best The BSD Programmer's Documentation Project Only in sleep can one find salvation that resembles Death... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message