summaryrefslogtreecommitdiffstats
path: root/test/dt_arith.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/dt_arith.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/dt_arith.c')
-rw-r--r--test/dt_arith.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/dt_arith.c b/test/dt_arith.c
index b2e8374..39f562a 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -84,7 +84,7 @@ static int skip_overflow_tests_g = 0;
* be allowed to continue (cf. Posix signals) so in order to recover from a
* SIGFPE we run tests that might generate one in a child process.
*/
-#if defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)
+#ifdef H5_HAVE_UNISTD_H
#define HANDLE_SIGFPE
#endif
@@ -556,7 +556,7 @@ some_dummy_func(float x)
static void
generates_sigfpe(void)
{
-#if defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)
+#ifdef H5_HAVE_UNISTD_H
pid_t pid;
int status;
size_t i, j;
@@ -592,12 +592,12 @@ generates_sigfpe(void)
/* delete the core dump file that SIGFPE may have created */
HDunlink("core");
}
-#else
- HDputs("Cannot determine if floating-point overflows generate a SIGFPE;");
- HDputs("assuming yes.");
+#else /* H5_HAVE_UNISTD_H */
+ HDputs("Cannot determine if floating-point overflows generate a SIGFPE");
+ HDputs("due to a lack of fork(2) - assuming yes.");
HDputs("Overflow cases will not be tested.");
skip_overflow_tests_g = TRUE;
-#endif
+#endif /* H5_HAVE_UNISTD_H */
}
/*-------------------------------------------------------------------------