From c2d8fae9a0733a1738c1275a03db556a8c73a51e Mon Sep 17 00:00:00 2001 From: Matthias Jurenz Date: Wed, 25 Mar 2009 14:40:49 +0000 Subject: [PATCH] Replaced usage of PATH_MAX by VT_PATH_MAX to avoid compile errors on some platforms (i.e. by using Intel compiler version 10.1.021) This commit was SVN r20873. --- ompi/contrib/vt/vt/ChangeLog | 4 ++++ ompi/contrib/vt/vt/VERSION | 2 +- ompi/contrib/vt/vt/config_bottom.h | 12 ++++++++++++ ompi/contrib/vt/vt/configure.in | 6 +++--- ompi/contrib/vt/vt/vtlib/vt_otf_gen.c | 2 +- ompi/contrib/vt/vt/vtlib/vt_thrd.c | 4 ++-- 6 files changed, 23 insertions(+), 7 deletions(-) diff --git a/ompi/contrib/vt/vt/ChangeLog b/ompi/contrib/vt/vt/ChangeLog index b71fdbfa18..1e082fcc27 100644 --- a/ompi/contrib/vt/vt/ChangeLog +++ b/ompi/contrib/vt/vt/ChangeLog @@ -235,3 +235,7 @@ - fixed compile error on RedHat/CentOS due to missing header include of 'cctype.h' in the sources of 'vtunify' +5.4.8 + - replaced usage of PATH_MAX by VT_PATH_MAX to avoid compile errors + on some platforms + diff --git a/ompi/contrib/vt/vt/VERSION b/ompi/contrib/vt/vt/VERSION index 8cce151da5..a70f34ddad 100644 --- a/ompi/contrib/vt/vt/VERSION +++ b/ompi/contrib/vt/vt/VERSION @@ -8,7 +8,7 @@ major=5 minor=4 -release=7 +release=8 # greek is used for alpha or beta release tags. If it is non-empty, # it will be appended to the version number. It does not have to be diff --git a/ompi/contrib/vt/vt/config_bottom.h b/ompi/contrib/vt/vt/config_bottom.h index 14857f8253..4376ca7fb4 100644 --- a/ompi/contrib/vt/vt/config_bottom.h +++ b/ompi/contrib/vt/vt/config_bottom.h @@ -38,3 +38,15 @@ # define vt_fnmatch(_pattern, _string, __flags) strcmp(_string, _pattern) #endif /* HAVE_FNMATCH_H */ +#include +#if defined(HAVE_SYS_PARAM_H) && HAVE_SYS_PARAM_H +# include +#endif +#if defined(PATH_MAX) +# define VT_PATH_MAX (PATH_MAX + 1) +#elif defined(_POSIX_PATH_MAX) +# define VT_PATH_MAX (_POSIX_PATH_MAX + 1) +#else +# define VT_PATH_MAX 256 +#endif + diff --git a/ompi/contrib/vt/vt/configure.in b/ompi/contrib/vt/vt/configure.in index bbd157943c..cc70769b93 100644 --- a/ompi/contrib/vt/vt/configure.in +++ b/ompi/contrib/vt/vt/configure.in @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.60) -AC_INIT(VampirTrace, 5.4.7, vampirsupport@zih.tu-dresden.de) -AM_INIT_AUTOMAKE(VampirTrace, 5.4.7) +AC_INIT(VampirTrace, 5.4.8, vampirsupport@zih.tu-dresden.de) +AM_INIT_AUTOMAKE(VampirTrace, 5.4.8) AM_CONFIG_HEADER(config.h) ACVT_CONF_INIT @@ -82,7 +82,7 @@ ACVT_CONF_TITLE([Header files, types, and functions]) # Check for header files AC_HEADER_STDC -AC_CHECK_HEADERS([stdint.h inttypes.h fnmatch.h]) +AC_CHECK_HEADERS([stdint.h inttypes.h fnmatch.h sys/param.h]) # Check for datatypes AC_TYPE_SIZE_T diff --git a/ompi/contrib/vt/vt/vtlib/vt_otf_gen.c b/ompi/contrib/vt/vt/vtlib/vt_otf_gen.c index 47b3edff59..de5955b7a2 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_otf_gen.c +++ b/ompi/contrib/vt/vt/vtlib/vt_otf_gen.c @@ -114,7 +114,7 @@ struct VTGen_struct OTF_FileManager* filemanager; OTF_WStream* file; OTF_FileCompression filecomp; - char name[PATH_MAX]; + char name[VT_PATH_MAX]; uint32_t trcid; uint32_t tid; int32_t flushcntr; diff --git a/ompi/contrib/vt/vt/vtlib/vt_thrd.c b/ompi/contrib/vt/vt/vtlib/vt_thrd.c index 2f9ced1a49..0c91eb88ee 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_thrd.c +++ b/ompi/contrib/vt/vt/vtlib/vt_thrd.c @@ -53,12 +53,12 @@ VTThrd* VTThrd_create(uint32_t tid) if ( thread == NULL ) vt_error(); - thread->tmp_name = (char*)calloc(PATH_MAX + 1, sizeof(char)); + thread->tmp_name = (char*)calloc(VT_PATH_MAX + 1, sizeof(char)); if ( thread->tmp_name == NULL ) vt_error(); /* basename includes local path but neither thread identifier nor suffix */ - snprintf(thread->tmp_name, PATH_MAX, "%s/%s.%lx.%u", + snprintf(thread->tmp_name, VT_PATH_MAX, "%s/%s.%lx.%u", vt_env_ldir(), vt_env_fprefix(), vt_pform_node_id(), getpid());