1
1

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.
Этот коммит содержится в:
Matthias Jurenz 2009-03-25 14:40:49 +00:00
родитель 8888c9831c
Коммит c2d8fae9a0
6 изменённых файлов: 23 добавлений и 7 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -38,3 +38,15 @@
# define vt_fnmatch(_pattern, _string, __flags) strcmp(_string, _pattern)
#endif /* HAVE_FNMATCH_H */
#include <limits.h>
#if defined(HAVE_SYS_PARAM_H) && HAVE_SYS_PARAM_H
# include <sys/param.h>
#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

Просмотреть файл

@ -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

Просмотреть файл

@ -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;

Просмотреть файл

@ -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());