summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-09-12 14:02:44 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-09-12 14:02:44 (GMT)
commit9115bab9e36d72bb395820e38b6bee4c99dcd78c (patch)
tree2fa4450bca7e33a1466fa2be8afb59a9370b8b64 /examples
parentee039a03b9fca394251bd1b543df3aa819b13d51 (diff)
downloadhdf5-9115bab9e36d72bb395820e38b6bee4c99dcd78c.zip
hdf5-9115bab9e36d72bb395820e38b6bee4c99dcd78c.tar.gz
hdf5-9115bab9e36d72bb395820e38b6bee4c99dcd78c.tar.bz2
[svn-r21376] JIRA-HDFFV-2748: Relplace WIN32 macros in source. New H5_HAVE_WIN32_API and H5_HAVE_VISUAL_STUDIO defines only need to be set on windows. Autotools configure is not affected.
Trunk passed for a week and cmake branch has been in place > 3 weeks. Tested: local linux
Diffstat (limited to 'examples')
-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();