aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNils Durner <durner@gnunet.org>2009-06-11 15:37:44 +0000
committerNils Durner <durner@gnunet.org>2009-06-11 15:37:44 +0000
commit81aac31f13c1f57a84cc2ae79746688bf7f3ffe8 (patch)
tree2ee40a48ed4f5d945a2c42c5b9e799b121e4680c /src
parent4dcecfd72005cc8f990dea5fca456da54a6eaa98 (diff)
downloadgnunet-81aac31f13c1f57a84cc2ae79746688bf7f3ffe8.tar.gz
gnunet-81aac31f13c1f57a84cc2ae79746688bf7f3ffe8.zip
MinGW
Diffstat (limited to 'src')
-rw-r--r--src/core/test_core_api.c2
-rw-r--r--src/core/test_core_api_start_only.c2
-rw-r--r--src/peerinfo/test_peerinfo_api.c2
-rw-r--r--src/resolver/gnunet-service-resolver.c9
-rw-r--r--src/resolver/test_resolver_api.c2
-rw-r--r--src/statistics/gnunet-service-statistics.c4
-rw-r--r--src/statistics/test_statistics_api.c4
-rw-r--r--src/transport/Makefile.am4
-rw-r--r--src/transport/test_transport_api.c2
-rw-r--r--src/util/test_common_logging.c2
-rw-r--r--src/util/test_scheduler.c2
11 files changed, 24 insertions, 11 deletions
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c
index e8b7fbe3b..a2924be79 100644
--- a/src/core/test_core_api.c
+++ b/src/core/test_core_api.c
@@ -314,7 +314,7 @@ stop_arm (struct PeerContext *p)
314#if START_ARM 314#if START_ARM
315 if (0 != PLIBC_KILL (p->arm_pid, SIGTERM)) 315 if (0 != PLIBC_KILL (p->arm_pid, SIGTERM))
316 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); 316 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
317 if (p->arm_pid != waitpid (p->arm_pid, NULL, 0)) 317 if (GNUNET_OS_process_wait(p->arm_pid) != GNUNET_OK)
318 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); 318 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid");
319 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 319 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
320 "ARM process %u stopped\n", p->arm_pid); 320 "ARM process %u stopped\n", p->arm_pid);
diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c
index 5c24c339c..c3ea85593 100644
--- a/src/core/test_core_api_start_only.c
+++ b/src/core/test_core_api_start_only.c
@@ -202,7 +202,7 @@ stop_arm (struct PeerContext *p)
202#if START_ARM 202#if START_ARM
203 if (0 != PLIBC_KILL (p->arm_pid, SIGTERM)) 203 if (0 != PLIBC_KILL (p->arm_pid, SIGTERM))
204 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); 204 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
205 if (p->arm_pid != waitpid (p->arm_pid, NULL, 0)) 205 if (GNUNET_OS_process_wait(p->arm_pid) != GNUNET_OK)
206 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); 206 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid");
207 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 207 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
208 "ARM process %u stopped\n", p->arm_pid); 208 "ARM process %u stopped\n", p->arm_pid);
diff --git a/src/peerinfo/test_peerinfo_api.c b/src/peerinfo/test_peerinfo_api.c
index e7d632fd5..3091a6491 100644
--- a/src/peerinfo/test_peerinfo_api.c
+++ b/src/peerinfo/test_peerinfo_api.c
@@ -157,7 +157,7 @@ check ()
157 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); 157 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
158 ok = 1; 158 ok = 1;
159 } 159 }
160 waitpid (pid, NULL, 0); 160 GNUNET_OS_process_wait(p->arm_pid);
161 return ok; 161 return ok;
162} 162}
163 163
diff --git a/src/resolver/gnunet-service-resolver.c b/src/resolver/gnunet-service-resolver.c
index ac50f02d0..c65adacd3 100644
--- a/src/resolver/gnunet-service-resolver.c
+++ b/src/resolver/gnunet-service-resolver.c
@@ -220,7 +220,14 @@ getaddrinfo_resolve (struct GNUNET_SERVER_TransmitContext *tc,
220 AF_INET) ? "IPv4" : ((domain == 220 AF_INET) ? "IPv4" : ((domain ==
221 AF_INET6) ? "IPv6" : "any"), 221 AF_INET6) ? "IPv6" : "any"),
222 gai_strerror (s)); 222 gai_strerror (s));
223 if ((s == EAI_BADFLAGS) || (s == EAI_MEMORY) || (s == EAI_SYSTEM)) 223 if ((s == EAI_BADFLAGS) || (s == EAI_MEMORY) ||
224#ifndef MINGW
225 (s == EAI_SYSTEM)
226#else
227 // FIXME NILS
228 1
229#endif
230 )
224 return GNUNET_NO; /* other function may still succeed */ 231 return GNUNET_NO; /* other function may still succeed */
225 return GNUNET_SYSERR; 232 return GNUNET_SYSERR;
226 } 233 }
diff --git a/src/resolver/test_resolver_api.c b/src/resolver/test_resolver_api.c
index 09be33f8c..b28dd0ca4 100644
--- a/src/resolver/test_resolver_api.c
+++ b/src/resolver/test_resolver_api.c
@@ -185,7 +185,7 @@ check ()
185 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); 185 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
186 ok = 1; 186 ok = 1;
187 } 187 }
188 waitpid (pid, NULL, 0); 188 GNUNET_OS_process_wait(pid);
189 if (ok != 0) 189 if (ok != 0)
190 fprintf (stderr, "Missed some resolutions: %u\n", ok); 190 fprintf (stderr, "Missed some resolutions: %u\n", ok);
191 return ok; 191 return ok;
diff --git a/src/statistics/gnunet-service-statistics.c b/src/statistics/gnunet-service-statistics.c
index 676db1b02..42ff8d927 100644
--- a/src/statistics/gnunet-service-statistics.c
+++ b/src/statistics/gnunet-service-statistics.c
@@ -120,7 +120,7 @@ load (struct GNUNET_SERVER_Handle *server,
120 GNUNET_free (fn); 120 GNUNET_free (fn);
121 return; 121 return;
122 } 122 }
123 buf = mmap (NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0); 123 buf = MMAP (NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0);
124 if (MAP_FAILED == buf) 124 if (MAP_FAILED == buf)
125 { 125 {
126 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "mmap", fn); 126 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "mmap", fn);
@@ -143,7 +143,7 @@ load (struct GNUNET_SERVER_Handle *server,
143 } 143 }
144 off += ntohs (msg->size); 144 off += ntohs (msg->size);
145 } 145 }
146 GNUNET_break (0 == munmap (buf, sb.st_size)); 146 GNUNET_break (0 == MUNMAP (buf, sb.st_size));
147 GNUNET_break (0 == CLOSE (fd)); 147 GNUNET_break (0 == CLOSE (fd));
148 GNUNET_free (fn); 148 GNUNET_free (fn);
149} 149}
diff --git a/src/statistics/test_statistics_api.c b/src/statistics/test_statistics_api.c
index 7a39f54b6..b9f81d652 100644
--- a/src/statistics/test_statistics_api.c
+++ b/src/statistics/test_statistics_api.c
@@ -141,7 +141,7 @@ check ()
141 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); 141 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
142 ok = 1; 142 ok = 1;
143 } 143 }
144 waitpid (pid, NULL, 0); 144 GNUNET_OS_process_wait(pid);
145 if (ok != 0) 145 if (ok != 0)
146 return ok; 146 return ok;
147 ok = 1; 147 ok = 1;
@@ -160,7 +160,7 @@ check ()
160 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); 160 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
161 ok = 1; 161 ok = 1;
162 } 162 }
163 waitpid (pid, NULL, 0); 163 GNUNET_OS_process_wait(pid);
164 return ok; 164 return ok;
165} 165}
166 166
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index 236dec7c4..4d682c60d 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -54,13 +54,17 @@ plugin_LTLIBRARIES = \
54libgnunet_plugin_transport_tcp_la_SOURCES = \ 54libgnunet_plugin_transport_tcp_la_SOURCES = \
55 plugin_transport_tcp.c 55 plugin_transport_tcp.c
56libgnunet_plugin_transport_tcp_la_LIBADD = \ 56libgnunet_plugin_transport_tcp_la_LIBADD = \
57 $(top_builddir)/src/hello/libgnunethello.la \
57 $(top_builddir)/src/resolver/libgnunetresolver.la \ 58 $(top_builddir)/src/resolver/libgnunetresolver.la \
59 $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
58 $(top_builddir)/src/util/libgnunetutil.la 60 $(top_builddir)/src/util/libgnunetutil.la
59libgnunet_plugin_transport_tcp_la_LDFLAGS = \ 61libgnunet_plugin_transport_tcp_la_LDFLAGS = \
60 $(GN_PLUGIN_LDFLAGS) 62 $(GN_PLUGIN_LDFLAGS)
61 63
62libgnunet_plugin_transport_template_la_SOURCES = \ 64libgnunet_plugin_transport_template_la_SOURCES = \
63 plugin_transport_template.c 65 plugin_transport_template.c
66libgnunet_plugin_transport_template_la_LIBADD = \
67 $(top_builddir)/src/util/libgnunetutil.la
64libgnunet_plugin_transport_template_la_LDFLAGS = \ 68libgnunet_plugin_transport_template_la_LDFLAGS = \
65 $(GN_PLUGIN_LDFLAGS) 69 $(GN_PLUGIN_LDFLAGS)
66 70
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c
index 6c4e94e04..ea22b9f12 100644
--- a/src/transport/test_transport_api.c
+++ b/src/transport/test_transport_api.c
@@ -255,7 +255,7 @@ stop_arm (struct PeerContext *p)
255#if START_ARM 255#if START_ARM
256 if (0 != PLIBC_KILL (p->arm_pid, SIGTERM)) 256 if (0 != PLIBC_KILL (p->arm_pid, SIGTERM))
257 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); 257 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
258 waitpid (p->arm_pid, NULL, 0); 258 GNUNET_OS_process_wait(p->arm_pid);
259#endif 259#endif
260 GNUNET_CONFIGURATION_destroy (p->cfg); 260 GNUNET_CONFIGURATION_destroy (p->cfg);
261} 261}
diff --git a/src/util/test_common_logging.c b/src/util/test_common_logging.c
index eb337aac4..3d07661c2 100644
--- a/src/util/test_common_logging.c
+++ b/src/util/test_common_logging.c
@@ -43,7 +43,9 @@ main (int argc, char *argv[])
43 unsigned int logs = 0; 43 unsigned int logs = 0;
44 44
45 fclose (stderr); 45 fclose (stderr);
46#ifndef MINGW
46 stderr = NULL; 47 stderr = NULL;
48#endif
47 GNUNET_logger_add (&my_log, &logs); 49 GNUNET_logger_add (&my_log, &logs);
48 GNUNET_logger_add (&my_log, &logs); 50 GNUNET_logger_add (&my_log, &logs);
49 GNUNET_log (GNUNET_ERROR_TYPE_BULK, "Testing...\n"); 51 GNUNET_log (GNUNET_ERROR_TYPE_BULK, "Testing...\n");
diff --git a/src/util/test_scheduler.c b/src/util/test_scheduler.c
index fe15e987b..855b3a08a 100644
--- a/src/util/test_scheduler.c
+++ b/src/util/test_scheduler.c
@@ -114,7 +114,7 @@ task5 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
114 int *ok = cls; 114 int *ok = cls;
115 GNUNET_assert (5 == *ok); 115 GNUNET_assert (5 == *ok);
116 (*ok) = 6; 116 (*ok) = 6;
117 GNUNET_assert (0 == pipe (fds)); 117 GNUNET_assert (0 == PIPE (fds));
118 GNUNET_SCHEDULER_add_read (tc->sched, 118 GNUNET_SCHEDULER_add_read (tc->sched,
119 GNUNET_NO, 119 GNUNET_NO,
120 GNUNET_SCHEDULER_PRIORITY_DEFAULT, 120 GNUNET_SCHEDULER_PRIORITY_DEFAULT,