summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusabstractinterface.h
Commit message (Expand)AuthorAgeFilesLines
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
* Update license headers again.Jason McDonald2009-09-091-4/+4
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| * Update license headers.Jason McDonald2009-08-111-1/+1
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
* | Use an "int status" extra parameter in property reading/writing.Thiago Macieira2009-07-021-1/+17
|/
* Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
* Long live Qt 4.5!Lars Knoll2009-03-231-0/+146
0'>20space:mode:
Diffstat
-rw-r--r--perform/sio_engine.c44
-rw-r--r--perform/sio_perf.c22
-rw-r--r--perform/sio_timer.c394
-rw-r--r--perform/sio_timer.h4
-rw-r--r--src/H5private.h5
-rw-r--r--src/H5system.c46
-rw-r--r--src/H5win32defs.h16
7 files changed, 297 insertions, 234 deletions
diff --git a/perform/sio_engine.c b/perform/sio_engine.c
index d4e7ad3..8e792bd 100644
--- a/perform/sio_engine.c
+++ b/perform/sio_engine.c
@@ -21,7 +21,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
-#include <unistd.h>
+#ifdef H5_HAVE_UNISTD_H
+# include <unistd.h>
+#endif
#include <errno.h>
#include "hdf5.h"
@@ -227,7 +229,7 @@ do_sio(parameters param)
*/
/* Open file for write */
- strcpy(base_name, "#sio_tmp");
+ HDstrcpy(base_name, "#sio_tmp");
sio_create_filename(iot, base_name, fname, sizeof(fname), &param);
if (sio_debug_level > 0)
@@ -335,7 +337,7 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
}
/* First use the environment variable and then try the constant */
- prefix = getenv("HDF5_PREFIX");
+ prefix = HDgetenv("HDF5_PREFIX");
#ifdef HDF5_PREFIX
if (!prefix)
@@ -349,8 +351,8 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
* directory instead. */
register char *user, *login, *subdir;
- user = getenv("USER");
- login = getenv("LOGIN");
+ user = HDgetenv("USER");
+ login = HDgetenv("LOGIN");
subdir = (user ? user : login);
if (subdir) {
@@ -363,24 +365,24 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
fullname[i] = subdir[j];
} else {
/* We didn't append the prefix yet */
- strncpy(fullname, prefix, MIN(strlen(prefix), size));
+ HDstrncpy(fullname, prefix, MIN(HDstrlen(prefix), size));
}
- if ((strlen(fullname) + strlen(base_name) + 1) < size) {
+ if ((HDstrlen(fullname) + HDstrlen(base_name) + 1) < size) {
/* Append the base_name with a slash first. Multiple slashes are
* handled below. */
h5_stat_t buf;
if (HDstat(fullname, &buf) < 0)
/* The directory doesn't exist just yet */
- if (mkdir(fullname, (mode_t)0755) < 0 && errno != EEXIST) {
+ if (HDmkdir(fullname, 0755) < 0 && errno != EEXIST) {
/* We couldn't make the "/tmp/${USER,LOGIN}" subdirectory.
* Default to PREFIX's original prefix value. */
- strcpy(fullname, prefix);
+ HDstrcpy(fullname, prefix);
}
- strcat(fullname, "/");
- strcat(fullname, base_name);
+ HDstrcat(fullname, "/");
+ HDstrcat(fullname, base_name);
} else {
/* Buffer is too small */
return NULL;
@@ -389,19 +391,19 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
/* Buffer is too small */
return NULL;
} else {
- strcpy(fullname, base_name);
+ HDstrcpy(fullname, base_name);
}
/* Append a suffix */
if (suffix) {
- if (strlen(fullname) + strlen(suffix) >= size)
+ if (HDstrlen(fullname) + HDstrlen(suffix) >= size)
return NULL;
- strcat(fullname, suffix);
+ HDstrcat(fullname, suffix);
}
/* Remove any double slashes in the filename */
- for (ptr = fullname, i = j = 0; ptr && i < size; i++, ptr++) {
+ for (ptr = fullname, i = j = 0; ptr && (i < size); i++, ptr++) {
if (*ptr != '/' || last != '/')
fullname[j++] = *ptr;
@@ -537,14 +539,14 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
h5dset_space_id, H5P_DEFAULT, h5dcpl, H5P_DEFAULT);
if (h5ds_id < 0) {
- fprintf(stderr, "HDF5 Dataset Create failed\n");
+ HDfprintf(stderr, "HDF5 Dataset Create failed\n");
GOTOERROR(FAIL);
}
hrc = H5Pclose(h5dcpl);
/* verifying the close of the dcpl */
if (hrc < 0) {
- fprintf(stderr, "HDF5 Property List Close failed\n");
+ HDfprintf(stderr, "HDF5 Property List Close failed\n");
GOTOERROR(FAIL);
}
@@ -841,7 +843,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
sprintf(dname, "Dataset_%ld", parms->num_bytes);
h5ds_id = H5Dopen2(fd->h5fd, dname, H5P_DEFAULT);
if (h5ds_id < 0) {
- fprintf(stderr, "HDF5 Dataset open failed\n");
+ HDfprintf(stderr, "HDF5 Dataset open failed\n");
GOTOERROR(FAIL);
}
@@ -1048,7 +1050,7 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
fd->posixfd = POSIXOPEN(fname, O_RDONLY);
if (fd->posixfd < 0 ) {
- fprintf(stderr, "POSIX File Open failed(%s)\n", fname);
+ HDfprintf(stderr, "POSIX File Open failed(%s)\n", fname);
GOTOERROR(FAIL);
}
@@ -1129,7 +1131,7 @@ set_vfd(parameters *param)
HDmemset(memb_name, 0, sizeof memb_name);
HDmemset(memb_addr, 0, sizeof memb_addr);
- assert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES);
+ HDassert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES);
for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) {
memb_fapl[mt] = H5P_DEFAULT;
sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
@@ -1220,7 +1222,7 @@ do_cleanupfile(iotype iot, char *filename)
hid_t driver;
if (clean_file_g == -1)
- clean_file_g = (getenv("HDF5_NOCLEANUP")==NULL) ? 1 : 0;
+ clean_file_g = (HDgetenv("HDF5_NOCLEANUP")==NULL) ? 1 : 0;
if (clean_file_g){
diff --git a/perform/sio_perf.c b/perform/sio_perf.c
index 5b97667..d852a45 100644
--- a/perform/sio_perf.c
+++ b/perform/sio_perf.c
@@ -353,7 +353,7 @@ main(int argc, char **argv)
}
if (opts->output_file) {
- if ((output = fopen(opts->output_file, "w")) == NULL) {
+ if ((output = HDfopen(opts->output_file, "w")) == NULL) {
fprintf(stderr, "%s: cannot open output file\n", progname);
perror(opts->output_file);
goto finish;
@@ -918,7 +918,7 @@ report_parameters(struct options *opts)
}
{
- char *prefix = getenv("HDF5_PREFIX");
+ char *prefix = HDgetenv("HDF5_PREFIX");
HDfprintf(output, "Env HDF5_PREFIX=%s\n",
(prefix ? prefix : "not set"));
@@ -992,9 +992,9 @@ parse_command_line(int argc, char *argv[])
if (isalnum(*end) && i < 10)
buf[i++] = *end;
- if (!strcasecmp(buf, "hdf5")) {
+ if (!HDstrcasecmp(buf, "hdf5")) {
cl_opts->io_types |= SIO_HDF5;
- } else if (!strcasecmp(buf, "posix")) {
+ } else if (!HDstrcasecmp(buf, "posix")) {
cl_opts->io_types |= SIO_POSIX;
} else {
fprintf(stderr, "sio_perf: invalid --api option %s\n",
@@ -1145,19 +1145,19 @@ parse_command_line(int argc, char *argv[])
cl_opts->h5_threshold = parse_size_directive(opt_arg);
break;
case 'v':
- if (!strcasecmp(opt_arg, "sec2")) {
+ if (!HDstrcasecmp(opt_arg, "sec2")) {
cl_opts->vfd=sec2;
- } else if (!strcasecmp(opt_arg, "stdio")) {
+ } else if (!HDstrcasecmp(opt_arg, "stdio")) {
cl_opts->vfd=stdio;
- } else if (!strcasecmp(opt_arg, "core")) {
+ } else if (!HDstrcasecmp(opt_arg, "core")) {
cl_opts->vfd=core;
- } else if (!strcasecmp(opt_arg, "split")) {
+ } else if (!HDstrcasecmp(opt_arg, "split")) {
cl_opts->vfd=split;
- } else if (!strcasecmp(opt_arg, "multi")) {
+ } else if (!HDstrcasecmp(opt_arg, "multi")) {
cl_opts->vfd=multi;
- } else if (!strcasecmp(opt_arg, "family")) {
+ } else if (!HDstrcasecmp(opt_arg, "family")) {
cl_opts->vfd=family;
- } else if (!strcasecmp(opt_arg, "direct")) {
+ } else if (!HDstrcasecmp(opt_arg, "direct")) {
cl_opts->vfd=direct;
} else {
fprintf(stderr, "sio_perf: invalid --api option %s\n",
diff --git a/perform/sio_timer.c b/perform/sio_timer.c