From: Christian Grothoff Date: Wed, 13 Jun 2012 07:36:54 +0000 (+0000) Subject: -LRN: kind of fix for gnunet-testing-run-service for W32 X-Git-Tag: initial-import-from-subversion-38251~13101 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0208a977b07da249d2a849c349b6f70dce62a8a5;p=oweals%2Fgnunet.git -LRN: kind of fix for gnunet-testing-run-service for W32 --- diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am index 7ddc8e857..670b1d2e0 100644 --- a/src/testing/Makefile.am +++ b/src/testing/Makefile.am @@ -37,6 +37,9 @@ gnunet_testing_run_service_LDADD = \ $(top_builddir)/src/util/libgnunetutil.la \ $(top_builddir)/src/testing/libgnunettesting.la \ $(GN_LIBINTL) +gnunet_testing_run_service_DEPENDENCIES = \ + libgnunettesting.la + check_PROGRAMS = \ test_testing_portreservation \ diff --git a/src/testing/gnunet-testing-run-service.c b/src/testing/gnunet-testing-run-service.c index f4527a1e2..fe0028971 100644 --- a/src/testing/gnunet-testing-run-service.c +++ b/src/testing/gnunet-testing-run-service.c @@ -112,7 +112,7 @@ void testing_main (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_TESTING_Peer *peer) { - my_peer = peer; + my_peer = (struct GNUNET_TESTING_Peer *) peer; tmpfilename = tmpnam (NULL); if (NULL == tmpfilename) { @@ -134,7 +134,14 @@ testing_main (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_break(NULL != GNUNET_SIGNAL_handler_install(SIGTERM, &cleanup)); GNUNET_break(NULL != GNUNET_SIGNAL_handler_install(SIGINT, &cleanup)); +#if !WINDOWS fh.fd = 0; /* 0=stdin */ +#else + /* FIXME: box GetStdHandle(STD_INPUT_HANDLE) somehow. + * Note that it will only work if parent process spawns + * gnunet-testing-run-service with custom-created asynchronous standard input + */ +#endif tid = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, &fh, &stdin_cb, NULL); }