summaryrefslogtreecommitdiffstats
path: root/tools/h5jam/h5unjam.c
diff options
context:
space:
mode:
authorScott Wegner <swegner@hdfgroup.org>2008-06-05 18:52:19 (GMT)
committerScott Wegner <swegner@hdfgroup.org>2008-06-05 18:52:19 (GMT)
commit532e23b808886527c6037c876ea6b203db16bcff (patch)
tree34f6a6c3e945a6ce9461a7b880f3b890c364ddd2 /tools/h5jam/h5unjam.c
parent92d070ab393fdd64267dfe53f55d39ef17c52257 (diff)
downloadhdf5-532e23b808886527c6037c876ea6b203db16bcff.zip
hdf5-532e23b808886527c6037c876ea6b203db16bcff.tar.gz
hdf5-532e23b808886527c6037c876ea6b203db16bcff.tar.bz2
[svn-r15150] Purpose: Separate Windows function macro definitions to win32defs.h
Description: In library code, we try not to use system calls directly, but instead use the HD{function} macro instead. This way, we can map special versions of the call on particular systems. Previously, it was all done in H5private.h. However, in an effort to clean up platform-specific definitions, we move all of the Windows macros into a separate file, win32defs.h. This way, we can use the non-Posix versions that Visual Studio sends warnings about. Some macros are set specifically in the platform-specific header files. Then, any macros left unset will be set by the "default" implementation in H5private.h. This checkin also cleans up various source files to use the HD* macros when possible. Tested: VS2005 on WinXP VS.NET on WinXP h5committest (kagiso, linew, smirom)
Diffstat (limited to 'tools/h5jam/h5unjam.c')
-rw-r--r--tools/h5jam/h5unjam.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/h5jam/h5unjam.c b/tools/h5jam/h5unjam.c
index ebfbdb2..3ab2202 100644
--- a/tools/h5jam/h5unjam.c
+++ b/tools/h5jam/h5unjam.c
@@ -112,13 +112,13 @@ parse_command_line(int argc, const char *argv[])
while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
case 'o':
- output_file = strdup (opt_arg);
+ output_file = HDstrdup (opt_arg);
break;
case 'i':
- input_file = strdup (opt_arg);
+ input_file = HDstrdup (opt_arg);
break;
case 'u':
- ub_file = strdup (opt_arg);
+ ub_file = HDstrdup (opt_arg);
break;
case 'd':
do_delete = TRUE;
@@ -239,7 +239,7 @@ main(int argc, const char *argv[])
if (ub_file == NULL) {
/* write to sdtout */
- ufid = dup(1);
+ ufid = HDdup(1);
} else {
ufid = HDopen(ub_file,O_WRONLY|O_CREAT|O_TRUNC, 0644 );
@@ -277,9 +277,9 @@ main(int argc, const char *argv[])
copy_to_file( ifid, h5fid, (ssize_t) usize, (ssize_t)(fsize - (ssize_t)usize) );
- close(ufid);
- close(h5fid);
- close(ifid);
+ HDclose(ufid);
+ HDclose(h5fid);
+ HDclose(ifid);
return d_status;
}