[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog libbase/utility.h libamf/elemen...
From: |
Markus Gothe |
Subject: |
[Gnash-commit] gnash ChangeLog libbase/utility.h libamf/elemen... |
Date: |
Wed, 18 Jun 2008 21:55:58 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Markus Gothe <nihilus> 08/06/18 21:55:58
Modified files:
. : ChangeLog
libbase : utility.h
libamf : element.cpp
Log message:
revert strndup impl.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6973&r2=1.6974
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/utility.h?cvsroot=gnash&r1=1.63&r2=1.64
http://cvs.savannah.gnu.org/viewcvs/gnash/libamf/element.cpp?cvsroot=gnash&r1=1.31&r2=1.32
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6973
retrieving revision 1.6974
diff -u -b -r1.6973 -r1.6974
--- ChangeLog 18 Jun 2008 21:48:16 -0000 1.6973
+++ ChangeLog 18 Jun 2008 21:55:56 -0000 1.6974
@@ -39,9 +39,8 @@
2008-06-17 Markus Gothe <address@hidden>
- * configure.ac, libbase/utility.h, libamf/element.cpp:
- Some non-GLIBC lacks strndup, so use Niels Möller's version
- that is in the public domain for it.
+ * configure.ac, libamf/element.cpp:
+ Some non-GLIBC lacks strndup.
2008-06-17 Benjamin Wolsey <address@hidden>
Index: libbase/utility.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/utility.h,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- libbase/utility.h 18 Jun 2008 00:38:06 -0000 1.63
+++ libbase/utility.h 18 Jun 2008 21:55:57 -0000 1.64
@@ -313,28 +313,6 @@
#endif
}
-#ifndef HAVE_STRNDUP
-/* Written by Niels Möller <address@hidden> and placed in the public domain.
*/
-
-inline char *strndup(const char *s, size_t size)
-{
- char *r, *end = static_cast<char *>(memchr(s, 0, size));
-
- if (end)
- /* Length + 1 */
- size = end - s + 1;
-
- r = static_cast<char *>(malloc(size));
-
- if (size)
- {
- memcpy(r, s, size-1);
- r[size-1] = '\0';
- }
- return r;
-}
-#endif
-
#endif // UTILITY_H
Index: libamf/element.cpp
===================================================================
RCS file: /sources/gnash/gnash/libamf/element.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- libamf/element.cpp 18 Jun 2008 17:19:25 -0000 1.31
+++ libamf/element.cpp 18 Jun 2008 21:55:57 -0000 1.32
@@ -941,7 +941,11 @@
case Element::STRING_AMF0:
cerr << "(" << getLength() << " bytes): ";
if (getLength() > 0) {
+#ifdef HAVE_STRNDUP
char *term = strndup(to_string(), getLength());
+#else
+ char *term = const_cast<char *>(to_string());
+#endif
cerr << "\t\"" << term << "\"" << endl;
} else {
cerr << endl;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog libbase/utility.h libamf/elemen...,
Markus Gothe <=