From patchwork Tue Feb 17 12:08:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 44744 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9D2B021544 for ; Tue, 17 Feb 2015 12:09:54 +0000 (UTC) Received: by lbdu10 with SMTP id u10sf2669320lbd.3 for ; Tue, 17 Feb 2015 04:09:53 -0800 (PST) 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:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=IX4TDdPMIrXU74AeedHr4TgnvJy03n6JiE2+2ncrkx0=; b=DDkM/6wogGv9TDwhC3e70scQIaU5tuSqUJa1GMnogYfWrVmdvONmsO8pZDJNNxx4L9 ulRwvO8EZvx0BS0f2biheZCdG5JywcafiqECN9vwUCwEpnAIu3+C38qpqWG78o97rTDE 7ETpjxb4AC8isPJw4xDj+EoaqC7eRtpkMMlqIYvglvjxNGuiFkj8lZmO5zihgFBHxaoo gZGeY0I7WRg4igeyJMfOzbQ8S6FWATphf5iuJn97Rcor6o1dUpcpl5BWFUJBepGo6sBQ DdvbkRMchFhtX1j9G1c56PUk1yYWGp+2gdnTXRBG6d1jPwGdMuaDdy+j2HRUEfRhyMRe bkzg== X-Gm-Message-State: ALoCoQl/hHdu/PseksYSUXksvVSVYwT0YQ9HMELXGljBV+ZzeGPZAj0sn3gPss2Umxx05hx0m1Am X-Received: by 10.152.43.166 with SMTP id x6mr3546751lal.3.1424174993693; Tue, 17 Feb 2015 04:09:53 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.227 with SMTP id b3ls554715lak.58.gmail; Tue, 17 Feb 2015 04:09:53 -0800 (PST) X-Received: by 10.112.72.132 with SMTP id d4mr28166256lbv.70.1424174993461; Tue, 17 Feb 2015 04:09:53 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id fg3si12358923lbc.157.2015.02.17.04.09.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Feb 2015 04:09:53 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by lams18 with SMTP id s18so35365435lam.13 for ; Tue, 17 Feb 2015 04:09:53 -0800 (PST) X-Received: by 10.152.6.195 with SMTP id d3mr28151152laa.36.1424174993313; Tue, 17 Feb 2015 04:09:53 -0800 (PST) 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.112.35.133 with SMTP id h5csp2163830lbj; Tue, 17 Feb 2015 04:09:52 -0800 (PST) X-Received: by 10.140.82.71 with SMTP id g65mr74961qgd.42.1424174985494; Tue, 17 Feb 2015 04:09:45 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id e80si9242652qhc.109.2015.02.17.04.09.40 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 17 Feb 2015 04:09:45 -0800 (PST) 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-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YNgyA-0001ZF-Fb; Tue, 17 Feb 2015 12:09:38 +0000 Received: from mail-lb0-f178.google.com ([209.85.217.178]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YNgy2-0001Xp-6z for lng-odp@lists.linaro.org; Tue, 17 Feb 2015 12:09:30 +0000 Received: by lbdu10 with SMTP id u10so4013165lbd.7 for ; Tue, 17 Feb 2015 04:09:24 -0800 (PST) X-Received: by 10.112.46.201 with SMTP id x9mr9977013lbm.65.1424174964673; Tue, 17 Feb 2015 04:09:24 -0800 (PST) Received: from localhost.localdomain ([188.92.105.210]) by mx.google.com with ESMTPSA id f9sm3524287laa.20.2015.02.17.04.09.23 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Feb 2015 04:09:23 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Tue, 17 Feb 2015 15:08:54 +0300 Message-Id: <1424174935-8291-2-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 In-Reply-To: <1424174935-8291-1-git-send-email-maxim.uvarov@linaro.org> References: <1424174935-8291-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv4 1/2] linux-generic: move api version to c file 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: maxim.uvarov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) 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 odp_version_api_str() in odp api defined as non static function and there should be implementation in c file. Include required headers so that str macro unrolls to correct version string. https://bugs.linaro.org/show_bug.cgi?id=1194 Signed-off-by: Maxim Uvarov Reviewed-by: Taras Kondratiuk --- platform/linux-generic/Makefile.am | 1 + platform/linux-generic/include/odp/version.h | 14 -------------- platform/linux-generic/odp_version.c | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 14 deletions(-) create mode 100644 platform/linux-generic/odp_version.c diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index c24d59d..16adccc 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -161,4 +161,5 @@ __LIB__libodp_la_SOURCES = \ odp_ticketlock.c \ odp_time.c \ odp_timer.c \ + odp_version.c \ odp_weak.c diff --git a/platform/linux-generic/include/odp/version.h b/platform/linux-generic/include/odp/version.h index f29320a..c98cb30 100644 --- a/platform/linux-generic/include/odp/version.h +++ b/platform/linux-generic/include/odp/version.h @@ -18,20 +18,6 @@ extern "C" { #endif #include - -/** @ingroup odp_ver_abt_log_dbg - * @{ - */ - -static inline const char *odp_version_api_str(void) -{ - return ODP_VERSION_API_STR; -} - -/** - * @} - */ - #include #ifdef __cplusplus diff --git a/platform/linux-generic/odp_version.c b/platform/linux-generic/odp_version.c new file mode 100644 index 0000000..0a57b5e --- /dev/null +++ b/platform/linux-generic/odp_version.c @@ -0,0 +1,17 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + +#include +#include + +const char *odp_version_api_str(void) +{ + return ODP_VERSION_API_STR; +}