OSDN Git Service

add prefix to config macros
authortsntsumi <tsntsumi@users.sourceforge.jp>
Tue, 16 Sep 2003 13:50:53 +0000 (13:50 +0000)
committertsntsumi <tsntsumi@users.sourceforge.jp>
Tue, 16 Sep 2003 13:50:53 +0000 (13:50 +0000)
src/ccunit/CCUnitConfig.h
src/ccunit/CCUnitMakeSuite.c
src/ccunit/CCUnitVersion.c

index c4bdc79..05de5f9 100644 (file)
 
 #include <ccunit/config.h>
 
-#if WITH_DMALLOC
+#if CCUNIT_WITH_DMALLOC
 #  include <dmalloc.h>
 #endif
 
-#if STDC_HEADERS
+#if CCUNIT_STDC_HEADERS
 #include <stdlib.h>
 #include <string.h>
 #endif
 
-#if HAVE_STDBOOL_H
+#if CCUNIT_HAVE_STDBOOL_H
 #include <stdbool.h>
 #elif defined (__cplusplus)
-#elif HAVE__BOOL
+#elif CCUNIT_HAVE__BOOL
 #define bool _Bool                             /**< boolean */
 #define true ((bool)1)                         /**< true */
 #define false ((bool)0)                                /**< false */
index c54f08b..9198aff 100644 (file)
 /** @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)
@@ -48,7 +52,7 @@
 #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 */
@@ -67,7 +71,7 @@ int ccunit_makeSuite (int ac, char** av)
   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' },
@@ -95,7 +99,7 @@ int ccunit_makeSuite (int ac, char** av)
     }
   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");
@@ -105,7 +109,7 @@ int ccunit_makeSuite (int ac, char** av)
       switch (opt)
        {
        case 0:
-#ifdef HAVE_GETOPT_LONG
+#ifdef CCUNIT_HAVE_GETOPT_LONG
          puts (long_options[option_index].name);
 #endif
          break;
@@ -122,7 +126,7 @@ int ccunit_makeSuite (int ac, char** av)
          _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,
@@ -141,7 +145,7 @@ int ccunit_makeSuite (int ac, char** av)
                   "          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]);
index 0cf4304..790d0a5 100644 (file)
@@ -24,7 +24,7 @@
 /** @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;
 
 /** @} */