nemiver r803 - in trunk: . src/common
- From: dodji svn gnome org
- To: svn-commits-list gnome org
- Subject: nemiver r803 - in trunk: . src/common
- Date: Mon, 5 May 2008 08:11:40 +0100 (BST)
Author: dodji
Date: Mon May 5 07:11:40 2008
New Revision: 803
URL: http://svn.gnome.org/viewvc/nemiver?rev=803&view=rev
Log:
[ustring] define strnlen() on FreeBSD.
Patch from Romain TartiÃre <romain blogreen org>
Modified:
trunk/ChangeLog
trunk/src/common/nmv-ustring.cc
Modified: trunk/src/common/nmv-ustring.cc
==============================================================================
--- trunk/src/common/nmv-ustring.cc (original)
+++ trunk/src/common/nmv-ustring.cc Mon May 5 07:11:40 2008
@@ -38,6 +38,18 @@
NEMIVER_BEGIN_NAMESPACE (nemiver)
NEMIVER_BEGIN_NAMESPACE (common)
+#if defined(__FreeBSD__)
+int
+strnlen (const gchar *string, gulong a_len)
+{
+ gchar *pos = (gchar*) memchr ((void*)string, '\0', a_len);
+ if (pos)
+ return (pos - string);
+ else
+ return (a_len);
+}
+#endif
+
UString
UString::from_int (long long an_int)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]