[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28676 - gnunet/src/gns
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28676 - gnunet/src/gns |
Date: |
Fri, 16 Aug 2013 06:08:14 +0200 |
Author: LRN
Date: 2013-08-16 06:08:14 +0200 (Fri, 16 Aug 2013)
New Revision: 28676
Modified:
gnunet/src/gns/gnunet-service-gns_resolver.c
Log:
Fix the lack of memrchr on W32
Modified: gnunet/src/gns/gnunet-service-gns_resolver.c
===================================================================
--- gnunet/src/gns/gnunet-service-gns_resolver.c 2013-08-16 04:08:11 UTC
(rev 28675)
+++ gnunet/src/gns/gnunet-service-gns_resolver.c 2013-08-16 04:08:14 UTC
(rev 28676)
@@ -1324,6 +1324,18 @@
GNS_resolver_lookup_cancel (rh);
}
+#ifdef WINDOWS
+/* Don't have this on W32, here's a naive implementation */
+void *memrchr (const void *s, int c, size_t n)
+{
+ size_t i;
+ unsigned char *ucs = (unsigned char *) s;
+ for (i = n - 1; i >= 0; i--)
+ if (ucs[i] == c)
+ return (void *) &ucs[i];
+ return NULL;
+}
+#endif
/**
* Get the next, rightmost label from the name that we are trying to resolve,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28676 - gnunet/src/gns,
gnunet <=