/** @file
* Make test suite object code from test source code.
*/
-#include <unistd.h>
#include <ccunit/CCUnitMakeSuite.h>
#include <ccunit/CCUnitLogMessage.h>
+#if CCUNIT_HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#include <stdio.h>
#include <errno.h>
+#if CCUNIT_STDC_HEADERS
#include <stdarg.h>
+#endif
/**
* If `setvbuf' takes the buffering type as its second argument and
* the buffer pointer as the third, instead of the other way around.
*/
-#if SETVBUF_REVERSED
+#if CCUNIT_SETVBUF_REVERSED
# define SETVBUF(FP,PTR,TYP,SZ) setvbuf(FP,TYP,PTR,SZ)
#else
# define SETVBUF(FP,PTR,TYP,SZ) setvbuf(FP,PTR,TYP,SZ)
#define DIRSEP '/' /**< directory separetor */
#endif
-#if HAVE_GETOPT_LONG
+#if CCUNIT_HAVE_GETOPT_LONG
# define LONGOPTNAME(LO) "--" #LO " | " /**< long name option */
#else
# define LONGOPTNAME(LO) /* -- LO | */ /**< long name option */
FILE* ofp = stdout;
int opt;
char* progname = NULL;
-#ifdef HAVE_GETOPT_LONG
+#ifdef CCUNIT_HAVE_GETOPT_LONG
int option_index = 0;
static struct option long_options[] = {
{ "output", required_argument, NULL, 'o' },
}
for (;;)
{
-#ifdef HAVE_GETOPT_LONG
+#ifdef CCUNIT_HAVE_GETOPT_LONG
opt = getopt_long (ac, av, "o:f:vdVh", long_options, &option_index);
#else
opt = getopt (ac, av, "o:f:vdVh");
switch (opt)
{
case 0:
-#ifdef HAVE_GETOPT_LONG
+#ifdef CCUNIT_HAVE_GETOPT_LONG
puts (long_options[option_index].name);
#endif
break;
_ccunit_debug_message = !_ccunit_debug_message;
break;
case 'V':
- fprintf (stdout, "%s - %s\n", PACKAGE_STRING, progname);
+ fprintf (stdout, "%s - %s\n", CCUNIT_PACKAGE_STRING, progname);
return 0;
case 'h':
fprintf (stdout,
" print version\n"
" " LONGOPTNAME(help) "-h\n"
" print this message\n"
- , PACKAGE_STRING, progname);
+ , CCUNIT_PACKAGE_STRING, progname);
return 1;
case '?':
fprintf (stderr, "unknown option %s\n", av[optind]);
/** @file
* ccunit library version string definitions.
*/
-#include <ccunit/CCUnitConfig.h>
+#include <ccunit/config.h>
/**
* @defgroup CCUnitVersion Version
* package name
* @ingroup ModuleHierarchy
*/
-const char* const _ccunit_package_name = PACKAGE_NAME;
+const char* const _ccunit_package_name = CCUNIT_PACKAGE_NAME;
/**
* package version
* @ingroup ModuleHierarchy
*/
-const char* const _ccunit_package_version = PACKAGE_VERSION;
+const char* const _ccunit_package_version = CCUNIT_PACKAGE_VERSION;
/** @} */