--- /dev/null
+Index: src/check_run.c\r
+===================================================================\r
+--- src/check_run.c (Revision 444)\r
++++ src/check_run.c (Arbeitskopie)\r
+@@ -21,9 +21,16 @@\r
+ #define _GNU_SOURCE
+ #include "config.h"
+
++#ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
++#endif
++#ifdef HAVE_SYS_WAIT_H
+ #include <sys/wait.h>
++#endif
++#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
++#endif
++
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -83,8 +90,14 @@\r
+ #define MSG_LEN 100
+
+ static int alarm_received;
++
++#ifndef HAVE_PID_T
++typedef int pid_t;
++#endif
++
+ static pid_t group_pid;
+
++#ifdef HAVE_SIGACTION
+ static void sig_handler(int sig_nr)
+ {
+ switch (sig_nr) {
+@@ -97,6 +110,7 @@\r
+ break;
+ }
+ }
++#endif
+
+ static void srunner_run_init (SRunner *sr, enum print_output print_mode)
+ {
+@@ -142,8 +156,10 @@\r
+
+ void srunner_run_all (SRunner *sr, enum print_output print_mode)
+ {
++#ifdef HAVE_SIGACTION
+ struct sigaction old_action;
+ struct sigaction new_action;
++#endif
+
+ if (sr == NULL)
+ return;
+@@ -152,13 +168,17 @@\r
+ eprintf ("Bad print_mode argument to srunner_run_all: %d",
+ __FILE__, __LINE__, print_mode);
+ }
++#ifdef HAVE_SIGACTION
+ memset(&new_action, 0, sizeof new_action);
+ new_action.sa_handler = sig_handler;
+ sigaction(SIGALRM, &new_action, &old_action);
++#endif
+ srunner_run_init (sr, print_mode);
+ srunner_iterate_suites (sr, print_mode);
+ srunner_run_end (sr, print_mode);
++#ifdef HAVE_SIGACTION
+ sigaction(SIGALRM, &old_action, NULL);
++#endif
+ }
+
+ static void srunner_add_failure (SRunner *sr, TestResult *tr)
+@@ -188,7 +208,11 @@\r
+ {
+ switch (srunner_fork_status(sr)) {
+ case CK_FORK:
++#ifdef HAVE_FORK
+ tr = tcase_run_tfun_fork (sr, tc, tfun, i);
++#else
++ eprintf("This version does not support fork", __FILE__, __LINE__);
++#endif
+ break;
+ case CK_NOFORK:
+ tr = tcase_run_tfun_nofork (sr, tc, tfun, i);
+@@ -347,6 +371,7 @@\r
+
+ static void set_fork_info (TestResult *tr, int status, int signal_expected)
+ {
++#ifdef HAVE_FORK
+ int was_sig = WIFSIGNALED(status);
+ int was_exit = WIFEXITED(status);
+ int exit_status = WEXITSTATUS(status);
+@@ -392,6 +417,9 @@\r
+ tr->rtype = CK_FAILURE; /* early exit */
+ }
+ }
++#else /* !HAVE_FORK */
++ eprintf("This version does not support fork", __FILE__, __LINE__);
++#endif /* HAVE_FORK */
+ }
+
+ static void set_nofork_info (TestResult *tr)
+@@ -421,6 +449,7 @@\r
+
+ static TestResult *tcase_run_tfun_fork (SRunner *sr, TCase *tc, TF *tfun, int i)
+ {
++#ifdef HAVE_FORK
+ pid_t pid_w;
+ pid_t pid;
+ int status = 0;
+@@ -447,10 +476,14 @@\r
+ killpg(pid, SIGKILL); /* Kill remaining processes. */
+
+ return receive_result_info_fork(tc->name, tfun->name, i, status, tfun->signal);
++#else /* HAVE_FORK */
++ eprintf("This version does not support fork", __FILE__, __LINE__);
++#endif /* HAVE_FORK */
+ }
+
+ static char *signal_error_msg (int signal_received, int signal_expected)
+ {
++#ifdef HAVE_FORK
+ char *sig_r_str;
+ char *sig_e_str;
+ char *msg = emalloc (MSG_LEN); /* free'd by caller */
+@@ -466,10 +499,14 @@\r
+ free(sig_r_str);
+ free(sig_e_str);
+ return msg;
++#else
++ return NULL;
++#endif
+ }
+
+ static char *signal_msg (int signal)
+ {
++#ifdef HAVE_FORK
+ char *msg = emalloc(MSG_LEN); /* free'd by caller */
+ if (alarm_received) {
+ snprintf(msg, MSG_LEN, "Test timeout expired");
+@@ -478,6 +515,9 @@\r
+ signal, strsignal(signal));
+ }
+ return msg;
++#else
++ return NULL;
++#endif
+ }
+
+ static char *exit_msg (int exitval)
+@@ -516,14 +556,20 @@\r
+
+ pid_t check_fork (void)
+ {
++#ifdef HAVE_FORK
+ pid_t pid = fork();
+ /* Set the process to a process group to be able to kill it easily. */
+ setpgid(pid, group_pid);
+ return pid;
++#else
++ eprintf("This version does not support fork", __FILE__, __LINE__);
++ return 0;
++#endif
+ }
+
+ void check_waitpid_and_exit (pid_t pid)
+ {
++#ifdef HAVE_FORK
+ pid_t pid_w;
+ int status;
+
+@@ -535,10 +581,14 @@\r
+ exit(EXIT_FAILURE);
+ }
+ exit(EXIT_SUCCESS);
++#else
++ eprintf("This version does not support fork", __FILE__, __LINE__);
++#endif
+ }
+
+ static int waserror (int status, int signal_expected)
+ {
++#ifdef HAVE_FORK
+ int was_sig = WIFSIGNALED (status);
+ int was_exit = WIFEXITED (status);
+ int exit_status = WEXITSTATUS (status);
+@@ -546,4 +596,8 @@\r
+
+ return ((was_sig && (signal_received != signal_expected)) ||
+ (was_exit && exit_status != 0));
++#else
++ eprintf("This version does not support fork", __FILE__, __LINE__);
++ return 0;
++#endif
+ }
+Index: src/check_pack.c\r
+===================================================================\r
+--- src/check_pack.c (Revision 444)\r
++++ src/check_pack.c (Arbeitskopie)\r
+@@ -38,8 +38,16 @@\r
+ #include "check_impl.h"
+ #include "check_pack.h"
+
++#ifdef _MSC_VER
++#include <BaseTsd.h> /* for SSIZE_T */
++#include <io.h>
++#define ssize_t SSIZE_T
++#define write _write
++#define read _read
++#endif
++
+ /* typedef an unsigned int that has at least 4 bytes */
+-typedef uint32_t ck_uint32;
++typedef unsigned int ck_uint32;
+
+
+ static void pack_int (char **buf, int val);
+Index: src/check.c\r
+===================================================================\r
+--- src/check.c (Revision 444)\r
++++ src/check.c (Arbeitskopie)\r
+@@ -55,8 +55,8 @@\r
+
+ #include <sys/types.h>
+
+-void *malloc (size_t n);
+-void *realloc (void *p, size_t n);
++/* void *malloc (size_t n); */
++/* void *realloc (void *p, size_t n); */
+
+ void *rpl_malloc (size_t n);
+ void *rpl_realloc (void *p, size_t n);
+Index: src/check_log.c\r
+===================================================================\r
+--- src/check_log.c (Revision 444)\r
++++ src/check_log.c (Arbeitskopie)\r
+@@ -22,7 +22,9 @@\r
+
+ #include <stdlib.h>
+ #include <stdio.h>
++#ifdef HAVE_SYS_TIME_H
+ #include <sys/time.h>
++#endif
+ #include <time.h>
+ #include <check.h>
+
+@@ -32,6 +34,9 @@\r
+ #include "check_log.h"
+ #include "check_print.h"
+
++#ifdef _MSC_VER /* MSVC Compiler */
++#include <windows.h>
++#endif /* MSVC */
+
+ static void srunner_send_evt (SRunner *sr, void *obj, enum cl_event evt);
+
+@@ -219,9 +224,19 @@\r
+ if (t[0] == 0)
+ {
+ struct tm now;
++ struct tm *nowp = &now;
++
++#ifdef _MSC_VER
++ GetLocalTime((LPSYSTEMTIME)nowp);
++#else
+ gettimeofday(&inittv, NULL);
+- localtime_r(&(inittv.tv_sec), &now);
+- strftime(t, sizeof("yyyy-mm-dd hh:mm:ss"), "%Y-%m-%d %H:%M:%S", &now);
++#ifdef HAVE_LOCALTIME_R
++ localtime_r(&(inittv.tv_sec), nowp);
++#else
++ nowp = localtime(&(inittv.tv_sec));
++#endif /* HAVE_LOCALTIME_R */
++#endif /* _MSC_VER */
++ strftime(t, sizeof("yyyy-mm-dd hh:mm:ss"), "%Y-%m-%d %H:%M:%S", nowp);
+ }
+
+ switch (evt) {
+@@ -231,10 +246,12 @@\r
+ fprintf(file, " <datetime>%s</datetime>\n", t);
+ break;
+ case CLENDLOG_SR:
++#ifndef _MSC_VER /* Todo... */
+ gettimeofday(&endtv, NULL);
+ fprintf(file, " <duration>%f</duration>\n",
+ (endtv.tv_sec + (float)(endtv.tv_usec)/1000000) - \
+ (inittv.tv_sec + (float)(inittv.tv_usec/1000000)));
++#endif
+ fprintf(file, "</testsuites>\n");
+ break;
+ case CLSTART_SR:
+Index: src/check_msg.c\r
+===================================================================\r
+--- src/check_msg.c (Revision 444)\r
++++ src/check_msg.c (Arbeitskopie)\r
+@@ -21,7 +21,9 @@\r
+ #include "config.h"
+
+ #include <sys/types.h>
++#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
++#endif
+ #include <stdlib.h>
+ #include <fcntl.h>
+ #include <stdio.h>
+Index: src/check.h.in\r
+===================================================================\r
+--- src/check.h.in (Revision 444)\r
++++ src/check.h.in (Arbeitskopie)\r
+@@ -72,15 +72,22 @@\r
+ be put directly in front of the exported symbol. */
+ #define CK_EXPORT
+
++/* Used for MSVC to create the export attribute */
++/* CK_DLL_EXP is defined during the compilation of the library */
++/* on the command line */
++#ifndef CK_DLL_EXP
++#define CK_DLL_EXP
++#endif
++
+ /* check version numbers */
+
+ #define CHECK_MAJOR_VERSION (@CHECK_MAJOR_VERSION@)
+ #define CHECK_MINOR_VERSION (@CHECK_MINOR_VERSION@)
+ #define CHECK_MICRO_VERSION (@CHECK_MICRO_VERSION@)
+
+-extern int CK_EXPORT check_major_version;
+-extern int CK_EXPORT check_minor_version;
+-extern int CK_EXPORT check_micro_version;
++CK_DLL_EXP extern int CK_EXPORT check_major_version;
++CK_DLL_EXP extern int CK_EXPORT check_minor_version;
++CK_DLL_EXP extern int CK_EXPORT check_micro_version;
+
+ #ifndef NULL
+ #define NULL ((void*)0)
+@@ -104,13 +111,13 @@\r
+ typedef struct Suite Suite;
+
+ /* Creates a test suite with the given name */
+-Suite * CK_EXPORT suite_create (const char *name);
++CK_DLL_EXP Suite * CK_EXPORT suite_create (const char *name);
+
+ /* Add a test case to a suite */
+-void CK_EXPORT suite_add_tcase (Suite *s, TCase *tc);
++CK_DLL_EXP void CK_EXPORT suite_add_tcase (Suite *s, TCase *tc);
+
+ /* Create a test case */
+-TCase * CK_EXPORT tcase_create (const char *name);
++CK_DLL_EXP TCase * CK_EXPORT tcase_create (const char *name);
+
+ /* Add a test function to a test case (macro version) */
+ #define tcase_add_test(tc,tf) tcase_add_test_raise_signal(tc,tf,0)
+@@ -137,7 +144,7 @@\r
+ /* Add a test function to a test case
+ (function version -- use this when the macro won't work
+ */
+-void CK_EXPORT _tcase_add_test (TCase *tc, TFun tf, const char *fname, int _signal, int start, int end);
++CK_DLL_EXP void CK_EXPORT _tcase_add_test (TCase *tc, TFun tf, const char *fname, int _signal, int start, int end);
+
+ /* Add unchecked fixture setup/teardown functions to a test case
+
+@@ -151,7 +158,7 @@\r
+ lead to different unit test behavior IF unit tests change data
+ setup by the fixture functions.
+ */
+-void CK_EXPORT tcase_add_unchecked_fixture (TCase *tc, SFun setup, SFun teardown);
++CK_DLL_EXP void CK_EXPORT tcase_add_unchecked_fixture (TCase *tc, SFun setup, SFun teardown);
+
+ /* Add fixture setup/teardown functions to a test case
+
+@@ -167,17 +174,17 @@\r
+ test, they should not be expensive code.
+
+ */
+-void CK_EXPORT tcase_add_checked_fixture (TCase *tc, SFun setup, SFun teardown);
++CK_DLL_EXP void CK_EXPORT tcase_add_checked_fixture (TCase *tc, SFun setup, SFun teardown);
+
+ /* Set the timeout for all tests in a test case. A test that lasts longer
+ than the timeout (in seconds) will be killed and thus fail with an error.
+ The timeout can also be set globaly with the environment variable
+ CK_DEFAULT_TIMEOUT, the specific setting always takes precedence.
+ */
+-void CK_EXPORT tcase_set_timeout (TCase *tc, int timeout);
++CK_DLL_EXP void CK_EXPORT tcase_set_timeout (TCase *tc, int timeout);
+
+ /* Internal function to mark the start of a test function */
+-void CK_EXPORT tcase_fn_start (const char *fname, const char *file, int line);
++CK_DLL_EXP void CK_EXPORT tcase_fn_start (const char *fname, const char *file, int line);
+
+ /* Start a unit test with START_TEST(unit_name), end with END_TEST
+ One must use braces within a START_/END_ pair to declare new variables
+@@ -213,7 +220,7 @@\r
+ #define fail(...) _fail_unless(0, __FILE__, __LINE__, "Failed" , ## __VA_ARGS__, NULL)
+
+ /* Non macro version of #fail_unless, with more complicated interface */
+-void CK_EXPORT _fail_unless (int result, const char *file,
++CK_DLL_EXP void CK_EXPORT _fail_unless (int result, const char *file,
+ int line, const char *expr, ...);
+
+ /* New check fail API. */
+@@ -240,7 +247,7 @@\r
+ #define mark_point() _mark_point(__FILE__,__LINE__)
+
+ /* Non macro version of #mark_point */
+-void CK_EXPORT _mark_point (const char *file, int line);
++CK_DLL_EXP void CK_EXPORT _mark_point (const char *file, int line);
+
+ /* Result of a test */
+ enum test_result {
+@@ -276,42 +283,42 @@\r
+ };
+
+ /* Type of result */
+-int CK_EXPORT tr_rtype (TestResult *tr);
++CK_DLL_EXP int CK_EXPORT tr_rtype (TestResult *tr);
+ /* Context in which the result occurred */
+-enum ck_result_ctx CK_EXPORT tr_ctx (TestResult *tr);
++CK_DLL_EXP enum ck_result_ctx CK_EXPORT tr_ctx (TestResult *tr);
+ /* Failure message */
+-const char * CK_EXPORT tr_msg (TestResult *tr);
++CK_DLL_EXP const char * CK_EXPORT tr_msg (TestResult *tr);
+ /* Line number at which failure occured */
+-int CK_EXPORT tr_lno (TestResult *tr);
++CK_DLL_EXP int CK_EXPORT tr_lno (TestResult *tr);
+ /* File name at which failure occured */
+-const char * CK_EXPORT tr_lfile (TestResult *tr);
++CK_DLL_EXP const char * CK_EXPORT tr_lfile (TestResult *tr);
+ /* Test case in which unit test was run */
+-const char * CK_EXPORT tr_tcname (TestResult *tr);
++CK_DLL_EXP const char * CK_EXPORT tr_tcname (TestResult *tr);
+
+ /* Creates an SRunner for the given suite */
+-SRunner * CK_EXPORT srunner_create (Suite *s);
++CK_DLL_EXP SRunner * CK_EXPORT srunner_create (Suite *s);
+
+ /* Adds a Suite to an SRunner */
+-void CK_EXPORT srunner_add_suite (SRunner *sr, Suite *s);
++CK_DLL_EXP void CK_EXPORT srunner_add_suite (SRunner *sr, Suite *s);
+
+ /* Frees an SRunner, all suites added to it and all contained test cases */
+-void CK_EXPORT srunner_free (SRunner *sr);
++CK_DLL_EXP void CK_EXPORT srunner_free (SRunner *sr);
+
+
+ /* Test running */
+
+ /* Runs an SRunner, printing results as specified (see enum print_output) */
+-void CK_EXPORT srunner_run_all (SRunner *sr, enum print_output print_mode);
++CK_DLL_EXP void CK_EXPORT srunner_run_all (SRunner *sr, enum print_output print_mode);
+
+
+ /* Next functions are valid only after the suite has been
+ completely run, of course */
+
+ /* Number of failed tests in a run suite. Includes failures + errors */
+-int CK_EXPORT srunner_ntests_failed (SRunner *sr);
++CK_DLL_EXP int CK_EXPORT srunner_ntests_failed (SRunner *sr);
+
+ /* Total number of tests run in a run suite */
+-int CK_EXPORT srunner_ntests_run (SRunner *sr);
++CK_DLL_EXP int CK_EXPORT srunner_ntests_run (SRunner *sr);
+
+ /* Return an array of results for all failures
+
+@@ -319,7 +326,7 @@\r
+ the array is malloc'ed and must be freed, but individual TestResults
+ must not
+ */
+-TestResult ** CK_EXPORT srunner_failures (SRunner *sr);
++CK_DLL_EXP TestResult ** CK_EXPORT srunner_failures (SRunner *sr);
+
+ /* Return an array of results for all run tests
+
+@@ -329,13 +336,13 @@\r
+ Memory is malloc'ed and must be freed, but individual TestResults
+ must not
+ */
+-TestResult ** CK_EXPORT srunner_results (SRunner *sr);
++CK_DLL_EXP TestResult ** CK_EXPORT srunner_results (SRunner *sr);
+
+
+ /* Printing */
+
+ /* Print the results contained in an SRunner */
+-void CK_EXPORT srunner_print (SRunner *sr, enum print_output print_mode);
++CK_DLL_EXP void CK_EXPORT srunner_print (SRunner *sr, enum print_output print_mode);
+
+
+ /* Set a log file to which to write during test running.
+@@ -344,13 +351,13 @@\r
+ done immediatly after SRunner creation, and the log file can't be
+ changed after being set.
+ */
+-void CK_EXPORT srunner_set_log (SRunner *sr, const char *fname);
++CK_DLL_EXP void CK_EXPORT srunner_set_log (SRunner *sr, const char *fname);
+
+ /* Does the SRunner have a log file? */
+-int CK_EXPORT srunner_has_log (SRunner *sr);
++CK_DLL_EXP int CK_EXPORT srunner_has_log (SRunner *sr);
+
+ /* Return the name of the log file, or NULL if none */
+-const char * CK_EXPORT srunner_log_fname (SRunner *sr);
++CK_DLL_EXP const char * CK_EXPORT srunner_log_fname (SRunner *sr);
+
+ /* Set a xml file to which to write during test running.
+
+@@ -358,13 +365,13 @@\r
+ done immediatly after SRunner creation, and the XML file can't be
+ changed after being set.
+ */
+-void CK_EXPORT srunner_set_xml (SRunner *sr, const char *fname);
++CK_DLL_EXP void CK_EXPORT srunner_set_xml (SRunner *sr, const char *fname);
+
+ /* Does the SRunner have an XML log file? */
+-int CK_EXPORT srunner_has_xml (SRunner *sr);
++CK_DLL_EXP int CK_EXPORT srunner_has_xml (SRunner *sr);
+
+ /* Return the name of the XML file, or NULL if none */
+-const char * CK_EXPORT srunner_xml_fname (SRunner *sr);
++CK_DLL_EXP const char * CK_EXPORT srunner_xml_fname (SRunner *sr);
+
+
+ /* Control forking */
+@@ -378,13 +385,15 @@\r
+ enum fork_status CK_EXPORT srunner_fork_status (SRunner *sr);
+
+ /* Set the current fork status */
+-void CK_EXPORT srunner_set_fork_status (SRunner *sr, enum fork_status fstat);
++CK_DLL_EXP void CK_EXPORT srunner_set_fork_status (SRunner *sr, enum fork_status fstat);
+
+ /* Fork in a test and make sure messaging and tests work. */
+-pid_t CK_EXPORT check_fork(void);
++#ifndef _MSC_VER
++CK_DLL_EXP pid_t CK_EXPORT check_fork(void);
+
+ /* Wait for the pid and exit. If pid is zero, just exit. */
+-void CK_EXPORT check_waitpid_and_exit(pid_t pid);
++CK_DLL_EXP void CK_EXPORT check_waitpid_and_exit(pid_t pid);
++#endif /* _MSC_VER */
+
+ #ifdef __cplusplus
+ CK_CPPEND
+Index: src/CMakeLists.txt\r
+===================================================================\r
+--- src/CMakeLists.txt (Revision 0)\r
++++ src/CMakeLists.txt (Revision 0)\r
+@@ -0,0 +1,64 @@\r
++#\r
++# Check: a unit test framework for C\r
++# Copyright (C) 2001, 2002 Arien Malec\r
++#\r
++# This library is free software; you can redistribute it and/or\r
++# modify it under the terms of the GNU Lesser General Public\r
++# License as published by the Free Software Foundation; either\r
++# version 2.1 of the License, or (at your option) any later version.\r
++#\r
++# This library is distributed in the hope that it will be useful,\r
++# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
++# Lesser General Public License for more details.\r
++#\r
++# You should have received a copy of the GNU Lesser General Public\r
++# License along with this library; if not, write to the\r
++# Free Software Foundation, Inc., 59 Temple Place - Suite 330,\r
++# Boston, MA 02111-1307, USA.\r
++#\r
++\r
++set ( SOURCES \r
++ check.c \r
++ check_error.c \r
++ check_list.c \r
++ check_log.c \r
++ check_msg.c \r
++ check_pack.c \r
++ check_print.c \r
++ check_run.c \r
++ check_str.c\r
++)\r
++\r
++set ( HEADERS \r
++ check.h \r
++ check_error.h \r
++ check_impl.h \r
++ check_list.h \r
++ check_log.h \r
++ check_msg.h \r
++ check_pack.h \r
++ check_print.h \r
++ check_str.h\r
++)\r
++\r
++configure_file ( check.h.in \r
++ check.h \r
++)\r
++\r
++add_library ( check SHARED\r
++ ${SOURCES}\r
++ ${HEADERS}\r
++)\r
++\r
++if (MSVC)\r
++ add_definitions ( -DCK_DLL_EXP=_declspec\(dllexport\) )\r
++endif (MSVC)\r
++\r
++INSTALL ( TARGETS check \r
++ RUNTIME DESTINATION bin\r
++ LIBRARY DESTINATION lib\r
++ ARCHIVE DESTINATION lib\r
++) \r
++\r
++INSTALL ( FILES ${CMAKE_BINARY_DIR}/check.h DESTINATION include )\r
+Index: README\r
+===================================================================\r
+--- README (Revision 444)\r
++++ README (Arbeitskopie)\r
+@@ -72,3 +72,57 @@\r
+ The same holds for .rpm packages. The Check maintainer for Fedora
+ Extras, Tom 'spot' Callaway, confirmed that they do not depend on an
+ upstream rpm target in Check.
++
++Building on Windows
++-------------------
++
++Building on windows is requires the cmake http://www.cmake.org
++build environment. No other tools like automake e.t.c. are
++required. The build can be done either with MINGW/MSYS or
++Microsoft Visual C. As windows does not support fork(), both
++versions do not support forked testing. So you have work in
++"NO FORK" mode. That can be done e.g. via setting the
++environment variable:
++
++export CK_FORK=no
++
++Building on Windows with MINGW/MSYS
++-----------------------------------
++- install the MINGW GNU Compiler Suite
++- install the MSYS Environment. That provides some unix like
++ commands like rm.
++- install cmake
++- open a msys shell and edit the .profile to include
++ cmake and MINGW to PATH, like
++ export PATH=${PATH}:<path_to_cmake>/bin
++- make sure you can run gcc and cmake.
++- extract the source code of the check libray to some
++ directory, e.g. check-0.9.5
++- make a new build directory outside the source tree and
++ change to that directory.
++- run
++ cmake -G"MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=<path_to_install> <path_to_cmake_source>
++ make
++ make install
++
++Building on Windows with MSVC
++-----------------------------
++- install MSYS (no idea if this is required...)
++- install MSVC
++- add MSVC to the PATH
++- open a msys shell
++- extrace the source code to some directory
++- make a build directory outside the source tree
++- run
++ cmake -G"NMake Makefiles" -DCMAKE_INSTALL_PREFIX=<path_to_install> <path_to_cmake_source>
++ nmake
++ nmake install
++
++ -- Friedrich Beckmann, 2008
++
++
++
++
++
++
++ \r
+\ Kein Zeilenvorschub am Ende der Datei\r
+Index: tests/check_check_pack.c\r
+===================================================================\r
+--- tests/check_check_pack.c (Revision 444)\r
++++ tests/check_check_pack.c (Arbeitskopie)\r
+@@ -1,3 +1,4 @@\r
++#include "config.h"
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -187,7 +188,7 @@\r
+ pack (CK_MSG_LOC, &buf, (CheckMsg *) lmsgp);
+ }
+ END_TEST
+-
++#ifdef HAVE_FORK
+ START_TEST(test_ppack)
+ {
+ int filedes[2];
+@@ -370,7 +371,7 @@\r
+ free (fmsg.msg);
+ }
+ END_TEST
+-
++#endif
+ Suite *make_pack_suite(void)
+ {
+
+@@ -387,16 +388,20 @@\r
+ tcase_add_test (tc_core, test_pack_loc);
+ tcase_add_test (tc_core, test_pack_ctx);
+ tcase_add_test (tc_core, test_pack_len);
++#ifdef HAVE_FORK
+ tcase_add_test (tc_core, test_ppack);
+ tcase_add_test (tc_core, test_ppack_noctx);
+ tcase_add_test (tc_core, test_ppack_onlyctx);
+ tcase_add_test (tc_core, test_ppack_multictx);
+ tcase_add_test (tc_core, test_ppack_nofail);
++#endif
+ suite_add_tcase (s, tc_limit);
+ tcase_add_test (tc_limit, test_pack_ctx_limit);
+ tcase_add_test (tc_limit, test_pack_fail_limit);
+ tcase_add_test (tc_limit, test_pack_loc_limit);
++#ifdef HAVE_FORK
+ tcase_add_test (tc_limit, test_ppack_big);
++#endif
+
+ return s;
+ }
+Index: tests/check_check_main.c\r
+===================================================================\r
+--- tests/check_check_main.c (Revision 444)\r
++++ tests/check_check_main.c (Arbeitskopie)\r
+@@ -1,3 +1,4 @@\r
++#include "config.h"
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <check.h>
+@@ -6,11 +7,14 @@\r
+ int main (void)
+ {
+ int n;
+- SRunner *sr;
++ SRunner *sr = NULL;
+
++#ifdef HAVE_FORK
+ fork_setup();
+ setup_fixture();
+ setup();
++#endif
++
+ sr = srunner_create (make_master_suite());
+ srunner_add_suite(sr, make_list_suite());
+ srunner_add_suite(sr, make_msg_suite());
+Index: tests/check_check_sub.c\r
+===================================================================\r
+--- tests/check_check_sub.c (Revision 444)\r
++++ tests/check_check_sub.c (Arbeitskopie)\r
+@@ -1,3 +1,4 @@\r
++#include "config.h"
+ #include <stdlib.h>
+ #include <signal.h>
+ #include <unistd.h>
+@@ -2,13 +3,8 @@\r
+ #include <sys/types.h>
++#ifdef HAVE_SYS_WAIT_H
+ #include <sys/wait.h>
++#endif
+ #include <check.h>
+ #include "check_check.h"
+
+-
+-
+-
+-
+-
+-
+-
+ START_TEST(test_lno)
+@@ -310,7 +306,7 @@\r
+ fail("Completed properly");
+ }
+ END_TEST
+-
++#ifdef HAVE_FORK
+ START_TEST(test_fork1p_pass)
+ {
+ pid_t pid;
+@@ -414,6 +410,7 @@\r
+ check_waitpid_and_exit(pid);
+ }
+ END_TEST
++#endif /* HAVE_FORK */
+
+ START_TEST(test_srunner)
+ {
+@@ -551,13 +548,14 @@\r
+ tcase_add_test (tc_limit, test_early_exit);
+ tcase_add_test (tc_limit, test_null);
+ tcase_add_test (tc_limit, test_null_2);
+-
++#ifdef HAVE_FORK
+ tcase_add_test (tc_messaging_and_fork, test_fork1p_pass);
+ tcase_add_test (tc_messaging_and_fork, test_fork1p_fail);
+ tcase_add_test (tc_messaging_and_fork, test_fork1c_pass);
+ tcase_add_test (tc_messaging_and_fork, test_fork1c_fail);
+ tcase_add_test (tc_messaging_and_fork, test_fork2_pass);
+ tcase_add_test (tc_messaging_and_fork, test_fork2_fail);
++#endif
+
+ return s;
+ }
+Index: tests/check_check_master.c\r
+===================================================================\r
+--- tests/check_check_master.c (Revision 444)\r
++++ tests/check_check_master.c (Arbeitskopie)\r
+@@ -1,5 +1,6 @@\r
+ #define _GNU_SOURCE
+
++#include "config.h"
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -312,8 +313,14 @@\r
+ static void init_signal_strings(void)
+ {
+ /* strsignal may overwrite the string returned by the previous call */
++#ifdef HAVE_STRSIGNAL
+ char *s8 = strdup(strsignal(8));
+ char *s11 = strdup(strsignal(11));
++#else
++ char *s8 = strdup("Signal 8");
++ char *s11 = strdup("Signal 11");
++#endif
++
+ int n;
+ n = snprintf(signal_11_str, SIG_STR_LEN, "Received signal 11 (%s)", s11);
+ assert(n < SIG_STR_LEN);
+Index: tests/CMakeLists.txt\r
+===================================================================\r
+--- tests/CMakeLists.txt (Revision 0)\r
++++ tests/CMakeLists.txt (Revision 0)\r
+@@ -0,0 +1,43 @@\r
++#\r
++# Check: a unit test framework for C\r
++# Copyright (C) 2001, 2002 Arien Malec\r
++#\r
++# This library is free software; you can redistribute it and/or\r
++# modify it under the terms of the GNU Lesser General Public\r
++# License as published by the Free Software Foundation; either\r
++# version 2.1 of the License, or (at your option) any later version.\r
++#\r
++# This library is distributed in the hope that it will be useful,\r
++# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
++# Lesser General Public License for more details.\r
++#\r
++# You should have received a copy of the GNU Lesser General Public\r
++# License along with this library; if not, write to the\r
++# Free Software Foundation, Inc., 59 Temple Place - Suite 330,\r
++# Boston, MA 02111-1307, USA.\r
++#\r
++\r
++INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../src )\r
++\r
++set ( CHECK_CHECK_SOURCES \r
++ check_list.c \r
++ check_check_sub.c \r
++ check_check_master.c \r
++ check_check_msg.c \r
++ check_check_log.c \r
++ check_check_limit.c \r
++ check_check_fork.c \r
++ check_check_fixture.c \r
++ check_check_pack.c\r
++ check_check_main.c\r
++)\r
++\r
++set ( CHECK_CHECK_HEADERS \r
++ check_check.h\r
++)\r
++\r
++add_executable ( check_check ${CHECK_CHECK_HEADERS} ${CHECK_CHECK_SOURCES} )\r
++\r
++target_link_libraries ( check_check check )\r
++\r
+Index: config.h.cmake\r
+===================================================================\r
+--- config.h.cmake (Revision 0)\r
++++ config.h.cmake (Revision 0)\r
+@@ -0,0 +1,37 @@\r
++/*-*- mode:C; -*- */\r
++/*\r
++ * Check: a unit test framework for C\r
++ * Copyright (C) 2001, 2002 Arien Malec\r
++ *\r
++ * This library is free software; you can redistribute it and/or\r
++ * modify it under the terms of the GNU Lesser General Public\r
++ * License as published by the Free Software Foundation; either\r
++ * version 2.1 of the License, or (at your option) any later version.\r
++ *\r
++ * This library is distributed in the hope that it will be useful,\r
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
++ * Lesser General Public License for more details.\r
++ *\r
++ * You should have received a copy of the GNU Lesser General Public\r
++ * License along with this library; if not, write to the\r
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\r
++ * Boston, MA 02111-1307, USA.\r
++ */\r
++\r
++#ifndef __CONFIG_H__\r
++#define __CONFIG_H__\r
++\r
++#cmakedefine HAVE_SIGACTION 1\r
++#cmakedefine HAVE_FORK 1\r
++#cmakedefine HAVE_LOCALTIME_R 1\r
++#cmakedefine HAVE_STRSIGNAL 1\r
++#cmakedefine HAVE_SYS_TYPES_H 1\r
++#cmakedefine HAVE_SYS_WAIT_H 1\r
++#cmakedefine HAVE_SYS_TIME_H 1\r
++#cmakedefine HAVE_UNISTD_H 1\r
++#cmakedefine HAVE_SIGNAL_H 1\r
++#cmakedefine HAVE_PID_T 1\r
++#define TIMEOUT_TESTS_ENABLED @TIMEOUT_TESTS_ENABLED@\r
++\r
++#endif /* __CONFIG_H */\r
+\ Kein Zeilenvorschub am Ende der Datei\r
+Index: CMakeLists.txt\r
+===================================================================\r
+--- CMakeLists.txt (Revision 0)\r
++++ CMakeLists.txt (Revision 0)\r
+@@ -0,0 +1,70 @@\r
++#\r
++# Check: a unit test framework for C\r
++# Copyright (C) 2001, 2002 Arien Malec\r
++#\r
++# This library is free software; you can redistribute it and/or\r
++# modify it under the terms of the GNU Lesser General Public\r
++# License as published by the Free Software Foundation; either\r
++# version 2.1 of the License, or (at your option) any later version.\r
++#\r
++# This library is distributed in the hope that it will be useful,\r
++# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
++# Lesser General Public License for more details.\r
++#\r
++# You should have received a copy of the GNU Lesser General Public\r
++# License along with this library; if not, write to the\r
++# Free Software Foundation, Inc., 59 Temple Place - Suite 330,\r
++# Boston, MA 02111-1307, USA.\r
++#\r
++\r
++cmake_minimum_required ( VERSION 2.6 FATAL_ERROR )\r
++\r
++project ( check C )\r
++\r
++set (CHECK_MAJOR_VERSION 0)\r
++set (CHECK_MINOR_VERSION 9)\r
++set (CHECK_MICRO_VERSION 6)\r
++\r
++set ( CMAKE_BUILD_TYPE Debug )\r
++\r
++#SET( CMAKE_INSTALL_PREFIX "f:/doof" )\r
++\r
++SET ( TIMEOUT_TESTS_ENABLED 0 )\r
++\r
++INCLUDE ( CheckFunctionExists )\r
++CHECK_FUNCTION_EXISTS ( sigaction HAVE_SIGACTION )\r
++CHECK_FUNCTION_EXISTS ( fork HAVE_FORK )\r
++CHECK_FUNCTION_EXISTS ( localtime_r HAVE_LOCALTIME_R )\r
++CHECK_FUNCTION_EXISTS ( strsignal HAVE_STRSIGNAL )\r
++\r
++INCLUDE ( CheckIncludeFiles )\r
++CHECK_INCLUDE_FILES ( sys/wait.h HAVE_SYS_WAIT_H )\r
++CHECK_INCLUDE_FILES ( sys/types.h HAVE_SYS_TYPES_H )\r
++CHECK_INCLUDE_FILES ( sys/time.h HAVE_SYS_TIME_H )\r
++check_include_files ( unistd.h HAVE_UNISTD_H )\r
++check_include_files ( signal.h HAVE_SIGNAL_H )\r
++\r
++INCLUDE ( CheckTypeSize )\r
++CHECK_TYPE_SIZE ( pid_t HAVE_PID_T )\r
++\r
++IF (MSVC)\r
++ ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS)\r
++ENDIF (MSVC)\r
++\r
++INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} )\r
++\r
++configure_file ( config.h.cmake\r
++ config.h \r
++)\r
++\r
++add_subdirectory ( src )\r
++\r
++IF (NOT MSVC)\r
++#todo\r
++ add_subdirectory ( tests )\r
++ENDIF (NOT MSVC)\r
++\r
++\r
++\r
++\r
+
+