summaryrefslogtreecommitdiffstats
path: root/examples/h5_elink_unix2win.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-09-06 16:50:32 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-09-06 16:50:32 (GMT)
commit2457d8ecaf8a2195a2966ad6e0f649473bdb7177 (patch)
treea2de17f6db50218ffbde5ea230a6c65f62ba7cf8 /examples/h5_elink_unix2win.c
parent85726e28fc864da521234244802a39d5a1ac23c2 (diff)
downloadhdf5-2457d8ecaf8a2195a2966ad6e0f649473bdb7177.zip
hdf5-2457d8ecaf8a2195a2966ad6e0f649473bdb7177.tar.gz
hdf5-2457d8ecaf8a2195a2966ad6e0f649473bdb7177.tar.bz2
[svn-r21366] JIRA HDFFV-2748 replace use of _WIN32 in source. Created new defines H5_HAVE_WIN32_API and H5_HAVE_VISUAL_STUDIO defines to use. These can be properly set during configurration.
Tested: windows and local linux - reviewed internally
Diffstat (limited to 'examples/h5_elink_unix2win.c')
-rw-r--r--examples/h5_elink_unix2win.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/h5_elink_unix2win.c b/examples/h5_elink_unix2win.c
index bcbb65f..9c0918c 100644
--- a/examples/h5_elink_unix2win.c
+++ b/examples/h5_elink_unix2win.c
@@ -138,11 +138,11 @@ const H5L_class_t elink_unix2win_class[1] = {{
static int
unix2win_example(void)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group ID */
+ hid_t fid = (-1); /* File ID */
+ hid_t gid = (-1); /* Group ID */
/* Create the target file. */
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
if((fid=H5Fcreate("u2w\\u2w_target.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0) goto error;
#else
if((fid=H5Fcreate("u2w/u2w_target.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0) goto error;
@@ -161,7 +161,7 @@ unix2win_example(void)
* that external links can be traversed.
*/
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
/* Register the elink_unix2win class defined above to replace default
* external links
*/
@@ -181,8 +181,8 @@ unix2win_example(void)
error:
printf("Error!\n");
H5E_BEGIN_TRY {
- H5Gclose (gid);
- H5Fclose (fid);
+ H5Gclose (gid);
+ H5Fclose (fid);
} H5E_END_TRY;
return -1;
}
@@ -195,7 +195,7 @@ unix2win_example(void)
int
main(void)
{
- int ret;
+ int ret;
printf("Testing unix2win external links.\n");
ret = unix2win_example();