/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright by The HDF Group.                                               *
 * Copyright by the Board of Trustees of the University of Illinois.         *
 * 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 files COPYING and Copyright.html.  COPYING can be found at the root   *
 * of the source code distribution tree; Copyright.html can be found at the  *
 * root level of an installed copy of the electronic HDF5 document set and   *
 * is linked from the top-level documents page.  It can also be found at     *
 * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
 * access to either file, you may request a copy from help@hdfgroup.org.     *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
* Test program:  tconfig
* Test the definitions in the H5config.h as much as possible
*************************************************************/
#include "hdf5.h"
#include "testhdf5.h"
/* macros definitions */
/* verify C int type: verify the size of signed and unsigned int type
 * with the macro size.
 */
#define vrfy_cint_type(ctype, uctype, ctype_macro) \
    /* check signed type size */ \
    vrfy_macrosize(ctype, ctype_macro, #ctype_macro);\
    /* check unsigned type size */ \
    vrfy_macrosize(uctype, ctype_macro, #ctype_macro);
/* verify C type sizes: verify the sizeof type with the macro size. */
#define vrfy_ctype(type, macro) \
    vrfy_macrosize(type, macro, #macro);
/* verify if the sizeof(type) matches size defined in macro. */
/* Needs this extra step so that we can print the macro name. */
#define vrfy_macrosize(type, macro, macroname) \
    if (sizeof(type) != macro) \
    TestErrPrintf("Error: sizeof(%s) is %zu but %s is %d\n", \
        #type, sizeof(type), macroname, (int)macro);
/* local routine prototypes */
void test_config_ctypes(void);
void test_exit_definitions(void);