From patchwork Wed Jan 16 04:41:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 212388 X-Patchwork-Delegate: wd@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id A95782C0094 for ; Wed, 16 Jan 2013 15:41:51 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DF7B54A052; Wed, 16 Jan 2013 05:41:49 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3Dj6vremo-vV; Wed, 16 Jan 2013 05:41:49 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8E8E94A044; Wed, 16 Jan 2013 05:41:47 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 054EA4A044 for ; Wed, 16 Jan 2013 05:41:45 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rmfsBMAkStXg for ; Wed, 16 Jan 2013 05:41:44 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-oa0-f53.google.com (mail-oa0-f53.google.com [209.85.219.53]) by theia.denx.de (Postfix) with ESMTPS id C9CB24A041 for ; Wed, 16 Jan 2013 05:41:42 +0100 (CET) Received: by mail-oa0-f53.google.com with SMTP id j6so1001047oag.12 for ; Tue, 15 Jan 2013 20:41:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=OVlc324ofTPNb9onhNiRBW1Oj4dl2hTkTJV7t4U5tQI=; b=TtWzz3EsLGgFNddne8DFtRr4GyRplwhyknr3arO9/gPqiHMyYtJ/VVZxyAAX39Re6B YNuoXeIK+SSm+gyYnMIk+otvKR2oEZMq6svZnYbdd3Uxm/+jEcVXLSUZTev8ZmGyYCMw jfv8o2LUFYSZ6MKU4NftlnFh/Fs8Ua7q1RRjIrOfEiihrMEfUS/0Y142FNZwl1T30G6Q 0HXTDG4ldTy3iKtgG32xsedtxPFHP0DlILMFOH3Py5jthLZelUNcNFRL8r6IA509J6v7 17zM+2MBsQumURyLplkJmZOgHK5fB262At2oO+TX3UWqrwTVbcfcZqNRpqNG8vBX8XyK oMdg== MIME-Version: 1.0 Received: by 10.60.30.201 with SMTP id u9mr58150636oeh.28.1358311301162; Tue, 15 Jan 2013 20:41:41 -0800 (PST) Received: by 10.76.68.38 with HTTP; Tue, 15 Jan 2013 20:41:41 -0800 (PST) In-Reply-To: References: Date: Wed, 16 Jan 2013 17:41:41 +1300 Message-ID: From: Chris Packham To: u-boot X-Content-Filtered-By: Mailman/MimeDel 2.1.11 Subject: Re: [U-Boot] Function prototype conflicts with standalone apps X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Here is a patch for the latter option ---8<--- From ece309850996e2347c54a9874dee5cc67e673402 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Wed, 16 Jan 2013 17:36:05 +1300 Subject: [PATCH] exports.h: add required definitions from common.h To avoid symbol namespace conflicts between standalone applications and u-boot code add the definitions required in exports.h so standalone applications do not have to include common.h. --- examples/standalone/hello_world.c | 1 - include/exports.h | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/examples/standalone/hello_world.c b/examples/standalone/hello_world.c index 067c390..91a2deb 100644 --- a/examples/standalone/hello_world.c +++ b/examples/standalone/hello_world.c @@ -21,7 +21,6 @@ * MA 02111-1307 USA */ -#include #include int hello_world (int argc, char * const argv[]) diff --git a/include/exports.h b/include/exports.h index 63aa4b2..65b25a1 100644 --- a/include/exports.h +++ b/include/exports.h @@ -3,6 +3,21 @@ #ifndef __ASSEMBLY__ +#ifndef __COMMON_H_ +typedef unsigned char uchar; +typedef volatile unsigned long vu_long; +typedef volatile unsigned short vu_short; +typedef volatile unsigned char vu_char; + +#include +#include +#include +#include +#include +#include +#include +#endif /* ifndef __COMMON_H__ */ + /* These are declarations of exported functions available in C code */ unsigned long get_version(void); int getc(void);