From ef7ac8692966e43814cb14a1493262d3b0ab80a3 Mon Sep 17 00:00:00 2001 From: Terry Dontje Date: Tue, 20 May 2008 12:13:19 +0000 Subject: [PATCH] created opal_version_string and orte_version_string to match the ompi changes made in r18345 for ompi_version_string. This was done per request from Jeff Squyres to maintain consistency and to remove some warnings caused by the non-use of some static const char. This commit was SVN r18461. The following SVN revision numbers were found above: r18345 --> open-mpi/ompi@8dd0421015ceda98713e5c6175674f7be6b21340 --- opal/runtime/opal.h | 4 ++++ opal/runtime/opal_init.c | 3 +-- orte/runtime/orte_init.c | 5 ++--- orte/runtime/runtime.h | 5 ++++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/opal/runtime/opal.h b/opal/runtime/opal.h index af63f588ef..7b45432f13 100644 --- a/opal/runtime/opal.h +++ b/opal/runtime/opal.h @@ -9,6 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -27,6 +28,9 @@ extern "C" { #endif +/** version string of opal */ +OPAL_DECLSPEC extern const char opal_version_string[]; + /** * Initialize the OPAL layer, including the MCA system. * diff --git a/opal/runtime/opal_init.c b/opal/runtime/opal_init.c index 49a81e66d9..4d1666e8dc 100644 --- a/opal/runtime/opal_init.c +++ b/opal/runtime/opal_init.c @@ -57,9 +57,8 @@ #pragma ident OPAL_IDENT_STRING #elif OMPI_CC_USE_IDENT #ident OPAL_IDENT_STRING -#else -static const char ident[] = OPAL_IDENT_STRING; #endif +const char opal_version_string[] = OPAL_IDENT_STRING; int opal_initialized = 0; int opal_util_initialized = 0; diff --git a/orte/runtime/orte_init.c b/orte/runtime/orte_init.c index 53dae47686..a73f9e0e8b 100644 --- a/orte/runtime/orte_init.c +++ b/orte/runtime/orte_init.c @@ -12,7 +12,7 @@ * Copyright (c) 2006 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2007-2008 Sun Microsystems, Inc. All rights reserved. * * $COPYRIGHT$ * @@ -51,9 +51,8 @@ #pragma ident ORTE_IDENT_STRING #elif OMPI_CC_USE_IDENT #ident ORTE_IDENT_STRING -#else -static const char ident[] = ORTE_IDENT_STRING; #endif +const char orte_version_string[] = ORTE_IDENT_STRING; int orte_init(char flags) { diff --git a/orte/runtime/runtime.h b/orte/runtime/runtime.h index 4465e88f3a..fb098ba41a 100644 --- a/orte/runtime/runtime.h +++ b/orte/runtime/runtime.h @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2007-2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -38,6 +38,9 @@ BEGIN_C_DECLS +/** version string of ompi */ +ORTE_DECLSPEC extern const char orte_version_string[]; + /* some convenience definitions for code clarity */ #define ORTE_NON_TOOL 0x00 #define ORTE_TOOL 0x01