Re: [codec] Opus codec on Analog Devices SHARC DSPs - patch needed

John Ridges <jridges@masque.com> Tue, 22 November 2011 20:45 UTC

Return-Path: <jridges@masque.com>
X-Original-To: codec@ietfa.amsl.com
Delivered-To: codec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B45CA21F8B03 for <codec@ietfa.amsl.com>; Tue, 22 Nov 2011 12:45:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.724
X-Spam-Level:
X-Spam-Status: No, score=-3.724 tagged_above=-999 required=5 tests=[AWL=0.875, BAYES_00=-2.599, GB_I_LETTER=-2]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AUi-yKpG3PS2 for <codec@ietfa.amsl.com>; Tue, 22 Nov 2011 12:45:28 -0800 (PST)
Received: from mail.masque.com (mail.masque.com [173.8.226.74]) by ietfa.amsl.com (Postfix) with ESMTP id AA03521F8B02 for <codec@ietf.org>; Tue, 22 Nov 2011 12:45:28 -0800 (PST)
Received: from [127.0.0.1] (unknown [192.168.1.241]) by mail.masque.com (Postfix) with ESMTP id B11E01602AB for <codec@ietf.org>; Tue, 22 Nov 2011 13:45:27 -0700 (MST)
Message-ID: <4ECC09E5.9070707@masque.com>
Date: Tue, 22 Nov 2011 13:45:25 -0700
From: John Ridges <jridges@masque.com>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
To: codec@ietf.org
References: <mailman.79.1321992012.18808.codec@ietf.org>
In-Reply-To: <mailman.79.1321992012.18808.codec@ietf.org>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Subject: Re: [codec] Opus codec on Analog Devices SHARC DSPs - patch needed
X-BeenThere: codec@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Codec WG <codec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/codec>, <mailto:codec-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/codec>
List-Post: <mailto:codec@ietf.org>
List-Help: <mailto:codec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/codec>, <mailto:codec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 22 Nov 2011 20:45:29 -0000

Hello all.

I realize it's rather late in the game, but I can't help but notice that 
several function in the CELT fork of the code use variable names that 
are formatted as system specific macros (e.g. _C). From the GNU docs:

http://gcc.gnu.org/onlinedocs/cpp/System_002dspecific-Predefined-Macros.html


        3.7.3 System-specific Predefined Macros

The C preprocessor normally predefines several macros that indicate what 
type of system and machine is in use. They are obviously different on 
each target supported by GCC. This manual, being for all systems and 
machines, cannot tell you what their names are, but you can use cpp -dM 
to see them all. See Invocation 
<http://gcc.gnu.org/onlinedocs/cpp/Invocation.html#Invocation>. All 
system-specific predefined macros expand to the constant 1, so you can 
test them with either `#ifdef' or `#if'.

The C standard requires that all system-specific macros be part of the 
reserved namespace. All names which begin with two underscores, or an 
underscore and a capital letter, are reserved for the compiler and 
library to use as they wish. However, historically system-specific 
macros have had names with no special prefix; for instance, it is common 
to find |unix| defined on Unix systems. For all such macros, GCC 
provides a parallel macro with two underscores added at the beginning 
and the end. If |unix| is defined, |__unix__| will be defined too. There 
will never be more than two underscores; the parallel of |_mips| is 
|__mips__|.

When the -ansi option, or any -std option that requests strict 
conformance, is given to the compiler, all the system-specific 
predefined macros outside the reserved namespace are suppressed. The 
parallel macros, inside the reserved namespace, remain defined.

We are slowly phasing out all predefined macros which are outside the 
reserved namespace. You should never use them in new programs, and we 
encourage you to correct older code to use the parallel macros whenever 
you find it. We don't recommend you use the system-specific macros that 
are in the reserved namespace, either. It is better in the long run to 
check specifically for features you need, using a tool such as autoconf.



I urge that these variables be renamed, as some build systems will fail 
to build the code (most notably the Android NDK).

John Ridges