From owner-freebsd-bugs Fri May 11 8:40: 9 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5890737B424 for ; Fri, 11 May 2001 08:40:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4BFe4U08368; Fri, 11 May 2001 08:40:04 -0700 (PDT) (envelope-from gnats) Received: from mail.inka.de (quechua.inka.de [212.227.14.2]) by hub.freebsd.org (Postfix) with ESMTP id 7AC2237B423 for ; Fri, 11 May 2001 08:30:51 -0700 (PDT) (envelope-from naddy@mips.inka.de) Received: from kemoauc.mips.inka.de (uucp@) by mail.inka.de with local-bsmtp id 14yEsT-0002sV-00; Fri, 11 May 2001 17:30:49 +0200 Received: (from naddy@localhost) by kemoauc.mips.inka.de (8.11.3/8.11.1) id f4BF0Dl12537; Fri, 11 May 2001 17:00:13 +0200 (CEST) (envelope-from naddy) Message-Id: <200105111500.f4BF0Dl12537@kemoauc.mips.inka.de> Date: Fri, 11 May 2001 17:00:13 +0200 (CEST) From: Christian Weisgerber Reply-To: naddy@mips.inka.de To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/27270: sys/soundcard.h fails to define AFMT_S16_NE Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 27270 >Category: bin >Synopsis: sys/soundcard.h fails to define AFMT_S16_NE >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri May 11 08:40:02 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Christian Weisgerber >Release: FreeBSD 5.0-CURRENT alpha >Organization: >Environment: System: FreeBSD kemoauc.mips.inka.de 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Mon May 7 16:13:13 CEST 2001 naddy@kemoauc.mips.inka.de:/home/obj/usr/src/sys/KEMOAUC alpha >Description: fails to define AFMT_S16_NE for "16-bit signed format in machine's native endian convention". This is defined in the OSS specs, it's available on Linux and NetBSD/OpenBSD, and some third party software expects it to be available. Bizarrely, there are no further _NE defines for unsigned or 32-bit values. >How-To-Repeat: >Fix: Index: sys/soundcard.h =================================================================== RCS file: /home/ncvs/src/sys/sys/soundcard.h,v retrieving revision 1.35 diff -u -r1.35 soundcard.h --- sys/soundcard.h 2000/09/01 17:38:32 1.35 +++ sys/soundcard.h 2001/05/11 14:52:25 @@ -160,6 +160,13 @@ # define AFMT_U32_LE 0x00004000 /* Little endian unsigned 32 */ # define AFMT_U32_BE 0x00008000 /* big endian unsigned 32 */ +#include +#if BYTE_ORDER == LITTLE_ENDIAN +# define AFMT_S16_NE AFMT_S16_LE /* native endian signed 16 */ +#else +# define AFMT_S16_NE AFMT_S16_BE +#endif + # define AFMT_STEREO 0x10000000 /* can do/want stereo */ /* >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message