From 7b0d5c58c3d0c42ecb71b246e7ced4258a64cecb Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 7 Feb 2005 22:13:58 +0000 Subject: [PATCH] s/PATH_MAX/OMPI_PATH_MAX/ for portability This commit was SVN r4312. --- src/mca/common/sm/common_sm_mmap.c | 2 +- src/mca/common/sm/common_sm_mmap.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mca/common/sm/common_sm_mmap.c b/src/mca/common/sm/common_sm_mmap.c index 49ddf56b71..fc0d52d5d1 100644 --- a/src/mca/common/sm/common_sm_mmap.c +++ b/src/mca/common/sm/common_sm_mmap.c @@ -157,7 +157,7 @@ mca_common_sm_mmap_t* mca_common_sm_mmap_init(size_t size, char *file_name, /* set up the map object */ map = OBJ_NEW(mca_common_sm_mmap_t); - strncpy(map->map_path, file_name, PATH_MAX); + strncpy(map->map_path, file_name, OMPI_PATH_MAX); /* the first entry in the file is the control strcuture. the first entry in the control structure is an mca_common_sm_file_header_t element */ diff --git a/src/mca/common/sm/common_sm_mmap.h b/src/mca/common/sm/common_sm_mmap.h index 4e5e846623..aacdecac31 100644 --- a/src/mca/common/sm/common_sm_mmap.h +++ b/src/mca/common/sm/common_sm_mmap.h @@ -15,6 +15,8 @@ #ifndef _COMMON_SM_MMAP_H_ #define _COMMON_SM_MMAP_H_ +#include "ompi_config.h" + #include "class/ompi_object.h" #include "class/ompi_list.h" #include "include/sys/atomic.h" @@ -54,7 +56,7 @@ struct mca_common_sm_mmap_t { /* base address of data segment */ unsigned char *data_addr; size_t map_size; - char map_path[PATH_MAX]; + char map_path[OMPI_PATH_MAX]; }; typedef struct mca_common_sm_mmap_t mca_common_sm_mmap_t;