From d4e280953115121a58c1a83d2454baec4b502fb2 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 30 Sep 2014 15:54:18 +0000 Subject: [PATCH] version: always use all 3 version numbers In all previous releases, the version number would be "A.B.C" unless C was 0, in which case it would be "A.B". This commit changes that scheme to always be "A.B.C", even if C==0. Hence, v1.9.0 will be the first release where this new scheme is evident. This commit was SVN r32816. --- config/opal_get_version.m4 | 9 ++------- opal/runtime/opal_info_support.c | 10 ++-------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/config/opal_get_version.m4 b/config/opal_get_version.m4 index 0fd61302c8..48ce722ddb 100644 --- a/config/opal_get_version.m4 +++ b/config/opal_get_version.m4 @@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. -dnl Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved. +dnl Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2014 Intel, Inc. All rights reserved. dnl $COPYRIGHT$ dnl @@ -60,12 +60,7 @@ m4_define([OPAL_GET_VERSION],[ p" < "$1"` [eval] "$opal_vers" - # Only print release version if it isn't 0 - if test $$2_RELEASE_VERSION -ne 0 ; then - $2_VERSION="$$2_MAJOR_VERSION.$$2_MINOR_VERSION.$$2_RELEASE_VERSION" - else - $2_VERSION="$$2_MAJOR_VERSION.$$2_MINOR_VERSION" - fi + $2_VERSION="$$2_MAJOR_VERSION.$$2_MINOR_VERSION.$$2_RELEASE_VERSION" $2_VERSION="${$2_VERSION}${$2_GREEK_VERSION}" $2_BASE_VERSION=$$2_VERSION diff --git a/opal/runtime/opal_info_support.c b/opal/runtime/opal_info_support.c index 604b28d144..c96270aca4 100644 --- a/opal/runtime/opal_info_support.c +++ b/opal/runtime/opal_info_support.c @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2010-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2011-2012 University of Houston. All rights reserved. @@ -1099,14 +1099,8 @@ char *opal_info_make_version_str(const char *scope, temp[BUFSIZ - 1] = '\0'; if (0 == strcmp(scope, opal_info_ver_full) || 0 == strcmp(scope, opal_info_ver_all)) { - snprintf(temp, BUFSIZ - 1, "%d.%d", major, minor); + snprintf(temp, BUFSIZ - 1, "%d.%d.%d", major, minor, release); str = strdup(temp); - if (release > 0) { - snprintf(temp, BUFSIZ - 1, ".%d", release); - asprintf(&tmp, "%s%s", str, temp); - free(str); - str = tmp; - } if (NULL != greek) { asprintf(&tmp, "%s%s", str, greek); free(str);