summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2010-06-03 19:34:20 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2010-06-03 19:34:20 (GMT)
commit6447935a194eab5e28996ce1a7f9224734a41346 (patch)
tree85fb1e8a84991bcee59893fe157d26f1502d2278
parent7d3d21b83111f8b5b70eaea90af20e438fd8a555 (diff)
downloadhdf5-6447935a194eab5e28996ce1a7f9224734a41346.zip
hdf5-6447935a194eab5e28996ce1a7f9224734a41346.tar.gz
hdf5-6447935a194eab5e28996ce1a7f9224734a41346.tar.bz2
[svn-r18958] Purpose:
Fixed Windows compile error. Renamed to use 'gid1' and 'gid2' instead of 'grp1' and 'grp2'. Description: There is variable name confliction with 'grp1' ~ 'grp9' in Windows system. It occurs if H5private.h is included in the code.
-rw-r--r--tools/h5dump/h5dumpgentest.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 531cdcd..dd01d5b 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -483,7 +483,7 @@ static void gent_softlink(void)
static int gent_softlink2(void)
{
hid_t fileid1;
- hid_t grp1=0, grp2=0;
+ hid_t gid1=0, gid2=0;
hid_t tid;
hid_t dset1, dset2;
hid_t datatype, dataspace;
@@ -507,16 +507,16 @@ static int gent_softlink2(void)
/*-----------------------------------------------------------------------
* Groups
*------------------------------------------------------------------------*/
- grp1 = H5Gcreate2(fileid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (grp1 < 0)
+ gid1 = H5Gcreate2(fileid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (gid1 < 0)
{
fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", FILE4_1);
status = FAIL;
goto out;
}
- grp2 = H5Gcreate2(fileid1, "group_empty", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (grp2 < 0)
+ gid2 = H5Gcreate2(fileid1, "group_empty", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (gid2 < 0)
{
fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", FILE4_1);
status = FAIL;
@@ -649,7 +649,7 @@ static int gent_softlink2(void)
* create various soft links under a group
*/
/* link to dset1 */
- status = H5Lcreate_soft("/dset1", grp1, "soft_dset1", H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Lcreate_soft("/dset1", gid1, "soft_dset1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
@@ -658,7 +658,7 @@ static int gent_softlink2(void)
}
/* link to dset2 */
- status = H5Lcreate_soft("/dset2", grp1, "soft_dset2", H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Lcreate_soft("/dset2", gid1, "soft_dset2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
@@ -667,7 +667,7 @@ static int gent_softlink2(void)
}
/* link to data type */
- status = H5Lcreate_soft("/dtype", grp1, "soft_dtype", H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Lcreate_soft("/dtype", gid1, "soft_dtype", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
@@ -676,7 +676,7 @@ static int gent_softlink2(void)
}
/* link to empty group */
- status = H5Lcreate_soft("/group_empty", grp1, "soft_empty_grp", H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Lcreate_soft("/group_empty", gid1, "soft_empty_grp", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
@@ -685,7 +685,7 @@ static int gent_softlink2(void)
}
/* dangling link */
- status = H5Lcreate_soft("not_yet", grp1, "soft_dangle", H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Lcreate_soft("not_yet", gid1, "soft_dangle", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1);
@@ -698,8 +698,8 @@ out:
* Close/release resources.
*/
H5Sclose(dataspace);
- H5Gclose(grp1);
- H5Gclose(grp2);
+ H5Gclose(gid1);
+ H5Gclose(gid2);
H5Tclose(datatype);
H5Dclose(dset1);
H5Dclose(dset2);