-LRN: kind of fix for gnunet-testing-run-service for W32
authorChristian Grothoff <christian@grothoff.org>
Wed, 13 Jun 2012 07:36:54 +0000 (07:36 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 13 Jun 2012 07:36:54 +0000 (07:36 +0000)
src/testing/Makefile.am
src/testing/gnunet-testing-run-service.c

index 7ddc8e8570a17e3c9eb2e9779fbf31cb30a26074..670b1d2e04baa4861b26571d2f2da138a48b0aff 100644 (file)
@@ -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 \
index f4527a1e22bc77b59ce9603995042595be7e8d08..fe0028971d4a2dad09fd54417ec0b3305de703de 100644 (file)
@@ -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);
 }