diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-03-20 04:23:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-20 04:23:50 (GMT) |
commit | 6d881fe7755298d1c92c86d153b4f8097b86c483 (patch) | |
tree | 506a43eb1d14b81d68aada1d62c9e62f5909a9aa /config/cmake/HDFCXXTests.cpp | |
parent | 59343e893185ef59f9fd93fd715a33ea4e125d7e (diff) | |
download | hdf5-6d881fe7755298d1c92c86d153b4f8097b86c483.zip hdf5-6d881fe7755298d1c92c86d153b4f8097b86c483.tar.gz hdf5-6d881fe7755298d1c92c86d153b4f8097b86c483.tar.bz2 |
Unify cmake and cmake_ext_mod like develop (#2596)
Diffstat (limited to 'config/cmake/HDFCXXTests.cpp')
-rw-r--r-- | config/cmake/HDFCXXTests.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/config/cmake/HDFCXXTests.cpp b/config/cmake/HDFCXXTests.cpp new file mode 100644 index 0000000..08ccb34 --- /dev/null +++ b/config/cmake/HDFCXXTests.cpp @@ -0,0 +1,46 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://www.hdfgroup.org/licenses. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifdef CXX_HAVE_OFFSETOF + +#include <stdio.h> +#include <stddef.h> + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus +extern "C" +# endif +int FC_DUMMY_MAIN() +{ return 1;} +#endif +#endif +int +main () +{ + + struct index_st + { + unsigned char type; + unsigned char num; + unsigned int len; + }; + typedef struct index_st index_t; + int x,y; + x = offsetof(struct index_st, len); + y = offsetof(index_t, num) + + ; + return 0; +} + +#endif |