From patchwork Fri May 2 19:47:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 29586 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E8957202E7 for ; Fri, 2 May 2014 19:48:20 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id b6sf18446184yha.0 for ; Fri, 02 May 2014 12:48:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=fdzA7JyXg+d5SI0ZVn5jj3Yc92hSA0Dj15kLVEXNeZM=; b=UnVqc6yllBiXqWdReqDE7eubcGWQkWkWOZXF6BRF3f2bRTxD3+zuM757CsUsgFBG2+ 2GDTXancvqpULEaPqq85pw0qaTk6o47oMYeC18HJMbiknQnvm1AQU4mmAcC3EBfI6KdA PIvgEXdq1GHWijmkZA/ymGUWmfxPAJ3DPfoYG+0ZfcFOOKFdcMdsBT19qtoDUWOf4hKe 5OXpfKHM1AWqwLYtJMkiM41GVvcq27oM1NxO3fJZm7oHyLtEHCswG0BErHaQBTu+pA+C hynojQJHBCx1cVyeMao3sbRI5C1/eJPDNrFB2jfLGoz01RjclgyJjp//HETCLbtV4vkd M4uA== X-Gm-Message-State: ALoCoQk4AxPsxZiJN5LlY0J8c20r7gTZk6OTf8kUAC0E8MqyvKGRutkI/br2SeF82I6xNDS2wWVy X-Received: by 10.236.32.236 with SMTP id o72mr8321777yha.42.1399060100665; Fri, 02 May 2014 12:48:20 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.22.6 with SMTP id 6ls1602835qgm.50.gmail; Fri, 02 May 2014 12:48:20 -0700 (PDT) X-Received: by 10.52.139.6 with SMTP id qu6mr889593vdb.67.1399060100500; Fri, 02 May 2014 12:48:20 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id b7si6942296vev.202.2014.05.02.12.48.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 02 May 2014 12:48:20 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id hq16so5972998vcb.11 for ; Fri, 02 May 2014 12:48:20 -0700 (PDT) X-Received: by 10.58.38.40 with SMTP id d8mr1063044vek.61.1399060100383; Fri, 02 May 2014 12:48:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp127490vcb; Fri, 2 May 2014 12:48:19 -0700 (PDT) X-Received: by 10.229.12.197 with SMTP id y5mr5854819qcy.22.1399060099030; Fri, 02 May 2014 12:48:19 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id n7si14534885qas.217.2014.05.02.12.48.18 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 02 May 2014 12:48:19 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WgJQt-0006ne-Ju; Fri, 02 May 2014 19:47:43 +0000 Received: from mail-lb0-f169.google.com ([209.85.217.169]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WgJQi-0006n7-FT for lng-odp@lists.linaro.org; Fri, 02 May 2014 19:47:32 +0000 Received: by mail-lb0-f169.google.com with SMTP id s7so2731439lbd.0 for ; Fri, 02 May 2014 12:48:00 -0700 (PDT) X-Received: by 10.112.41.101 with SMTP id e5mr3022265lbl.46.1399060080674; Fri, 02 May 2014 12:48:00 -0700 (PDT) Received: from localhost (c-853670d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.54.133]) by mx.google.com with ESMTPSA id x5sm34816309lbk.5.2014.05.02.12.47.59 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 02 May 2014 12:47:59 -0700 (PDT) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Fri, 2 May 2014 21:47:44 +0200 Message-Id: <1399060067-22104-2-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1399060067-22104-1-git-send-email-anders.roxell@linaro.org> References: <1399060067-22104-1-git-send-email-anders.roxell@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 1/4] include/odp_byteorder: allow for -std=c99 to be set X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: anders.roxell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Anders Roxell --- include/odp_byteorder.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/include/odp_byteorder.h b/include/odp_byteorder.h index c573bb6..80f6081 100644 --- a/include/odp_byteorder.h +++ b/include/odp_byteorder.h @@ -22,20 +22,28 @@ extern "C" { #include #include -#ifndef BYTE_ORDER -#error BYTE_ORDER not defined! +#ifndef __BYTE_ORDER +#error __BYTE_ORDER not defined! +#endif + +#ifndef __BIG_ENDIAN +#error __BIG_ENDIAN not defined! +#endif + +#ifndef __LITTLE_ENDIAN +#error __LITTLE_ENDIAN not defined! #endif /** Big endian byte order */ -#define ODP_BIG_ENDIAN BIG_ENDIAN +#define ODP_BIG_ENDIAN __BIG_ENDIAN /** Little endian byte order */ -#define ODP_LITTLE_ENDIAN LITTLE_ENDIAN +#define ODP_LITTLE_ENDIAN __LITTLE_ENDIAN /** Selected byte order */ -#if BYTE_ORDER == LITTLE_ENDIAN +#if __BYTE_ORDER == __LITTLE_ENDIAN #define ODP_BYTE_ORDER ODP_LITTLE_ENDIAN -#elif BYTE_ORDER == BIG_ENDIAN +#elif __BYTE_ORDER == __BIG_ENDIAN #define ODP_BYTE_ORDER ODP_BIG_ENDIAN #endif