summaryrefslogtreecommitdiffstats
path: root/test/use_common.c
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2021-03-31 15:15:49 (GMT)
committerGitHub <noreply@github.com>2021-03-31 15:15:49 (GMT)
commitdf75d35cc5295b03dc305ca7e5495fece5737d30 (patch)
tree7b8a4754abcb1721e322f50a92c2996d2ed46c2e /test/use_common.c
parent05b0f6745c2025261825a2e478743f141b33d26c (diff)
downloadhdf5-df75d35cc5295b03dc305ca7e5495fece5737d30.zip
hdf5-df75d35cc5295b03dc305ca7e5495fece5737d30.tar.gz
hdf5-df75d35cc5295b03dc305ca7e5495fece5737d30.tar.bz2
Hdf5 merge issue 486 v110 (#490)
* close #195. (#196) * Update HDF5PluginMacros.cmake * Update HDF5PluginMacros.cmake * Modify temporary rpath for testing in java example scripts. (#230) * Fix undefined left shifting of negative numbers (#338) Undefined Bahavior Sanitizer errored here about left shifting negative numbers. * Update license url (#332) * Modify temporary rpath for testing in java example scripts. * Update URL in source file Copyright headers for web copy of COPYING file - src and test directories. * Simplified hl parsing (#399) * Stop using global variables to share parse context with the lexer. The lexer uses an unconventional strategy for parsing lexical categories NUMBER (decimal numbers) and STRING (double-quoted strings) that involves sharing the parse context with the lexer using global variables. There are a couple of problems with that. First, the lexer is too complicated for the simple tokenization it performs—it's hard to tell if it is correct. Second, as @seanm points out, the shared global variables spill into the namespace shared by other libraries and application programs—e.g., VTK. * Regenerate source files from *.[yl]. * Replace strndup, which isn't available on Windows, with a custom routine, `trim_quotes`, that produces a copy of its `const char *` argument with leading and trailing double quotes ('"') removed. While I am here, remove the unnecessary statement `BEGIN INITIAL;`, which I should have deleted in a previous commit. * Regenerate .c from .l. * You haven't programmed in C until you have programmed in High-Definition (HD) C. * \#include "H5private.h" for HD* definitions. * Regenerate *.[ch] from *.[yl]. * Removed workarounds for pre-standard inline keyword (#423) Fixes -Wreserved-identifier warnings due to multiple underscores in H5_HAVE___INLINE. * Replaces checks for fork, etc. with checks for unistd.h (#457) * Replaces checks for fork, etc. with H5_HAVE_UNISTD_H Code previously checked for individual POSIX API calls using H5_HAVE_FORK, etc. The calls we use have been standardized for decades and available via unistd.h. Some test messages that were missing when tests are skipped due to a lack of unistd.h were also added. The configure checks for individual POSIX API calls will be removed in a later commit. * Stupid formatter * Update h5LT files with latest flex and Bison available on jelly (#502) * Modify temporary rpath for testing in java example scripts. * Update URL in source file Copyright headers for web copy of COPYING (license) file. * Add release_docs/code-conventions.md file. * Add script to test h5py. * Fix script error. * Add file h5pytest.yml. * Test declaration of counter variables in for loops. * Committing clang-format changes * Committing clang-format changes * Added [] to line 126 of H5LTanalyze.l. Ran bin/genparser with flex v2.6.4 and Bison v3.0.4 on jelly. * Revert "Added [] to line 126 of H5LTanalyze.l." This reverts commit e4a9cee441efa75b16a8ee030c86189e186dd266. * Revert extra commits to match canonical develop. * Added [] to H5LTanalyze.l line 126 to eliminate warning "rule could not be matched". Ran bin/genparser hl/src with flex v2.6.4 and Bison v3.0.4 on jelly. * Added HD to strdup in H5LTparse.y line 338. Ran bin/genparser hlsrc again. * Removed line 126 from H5LTanalyze.l - previous line matches. Added previously removed line 318 of H5LTparse.y to fix hl_test_lite failure. Ran bin/genparser. Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Add cmake variable HDF5_LIB_INFIX (#7) * Add cmake variable HDF5_LIB_INFIX This infix is added to all library names after 'hdf5'. e.g. the infix '_openmpi' results in the library name 'libhdf5_openmpi.so' This name is used in packages on debian based systems. (see https://packages.debian.org/jessie/amd64/libhdf5-openmpi-8/filelist) This option is useful when testing projects on debian based systems with custom builds of hdf5 while trying to minimize differences between the custom setup and the environment created by installing system packages. * Added RELEASE.txt entry for HDF5_LIB_INFIX. Co-authored-by: Larry Knox <lrknox@hdfgroup.org> * Update test/accum.c to correct merge for replacing checks for fork, etc. with checks for unistd.h (#457) * Committing clang-format changes Co-authored-by: H. Joe Lee <hyoklee@hdfgroup.org> Co-authored-by: Sean McBride <sean@rogue-research.com> Co-authored-by: David Young <dyoung@hdfgroup.org> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Raphael Grimm <barcode@users.noreply.github.com>
Diffstat (limited to 'test/use_common.c')
-rw-r--r--test/use_common.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/use_common.c b/test/use_common.c
index b407434..d747983 100644
--- a/test/use_common.c
+++ b/test/use_common.c
@@ -13,11 +13,9 @@
#include "h5test.h"
/* This test uses many POSIX things that are not available on
- * Windows. We're using a check for fork(2) here as a proxy for
- * all POSIX/Unix/Linux things until this test can be made
- * more platform-independent.
+ * Windows.
*/
-#ifdef H5_HAVE_FORK
+#ifdef H5_HAVE_UNISTD_H
#include "use.h"
@@ -611,4 +609,4 @@ read_uc_file(hbool_t towait, options_t *opts)
return 0;
} /* end read_uc_file() */
-#endif /* H5_HAVE_FORK */
+#endif /* H5_HAVE_UNISTD_H */