gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash configure.ac ChangeLog libbase/utility.h ...


From: Markus Gothe
Subject: [Gnash-commit] gnash configure.ac ChangeLog libbase/utility.h ...
Date: Wed, 18 Jun 2008 00:16:41 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Markus Gothe <nihilus>  08/06/18 00:16:41

Modified files:
        .              : configure.ac ChangeLog 
        libbase        : utility.h 
        libamf         : element.cpp 

Log message:
        Some non-GLIBC lacks strndup, so use Nils Möller's version that is in 
the public domain for it.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.547&r2=1.548
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6965&r2=1.6966
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/utility.h?cvsroot=gnash&r1=1.61&r2=1.62
http://cvs.savannah.gnu.org/viewcvs/gnash/libamf/element.cpp?cvsroot=gnash&r1=1.29&r2=1.30

Patches:
Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.547
retrieving revision 1.548
diff -u -b -r1.547 -r1.548
--- configure.ac        13 Jun 2008 23:51:03 -0000      1.547
+++ configure.ac        18 Jun 2008 00:16:39 -0000      1.548
@@ -1457,6 +1457,7 @@
 AC_CHECK_FUNCS(sysconf)
 AC_CHECK_FUNCS(shmget shmat shmdt mmap)
 AC_CHECK_FUNCS(memmove)
+AC_CHECK_FUNC(strndup, AC_DEFINE(HAVE_STRNDUP, 1, [Has strndup()] ))
 AC_CHECK_FUNC(clock_gettime, AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Has 
clock_gettime()] ))
 AC_CHECK_FUNCS(strlcpy, AC_DEFINE(HAVE_STRLCPY_PROTO, [1],[Define if you have 
the strlcpy prototype]))
 AC_CHECK_FUNCS(strlcat, AC_DEFINE(HAVE_STRLCAT_PROTO, [1],[Define if you have 
the strlcat prototype]))

Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6965
retrieving revision 1.6966
diff -u -b -r1.6965 -r1.6966
--- ChangeLog   17 Jun 2008 19:36:43 -0000      1.6965
+++ ChangeLog   18 Jun 2008 00:16:39 -0000      1.6966
@@ -1,3 +1,9 @@
+2008-06-17 Markus Gothe <address@hidden>
+
+       * configure.ac, libbase/utility.h, libamf/element.cpp:
+         Some non-GLIBC lacks strndup, so use Nils Möller's version
+         that is in the public domain for it.
+
 2008-06-17 Benjamin Wolsey <address@hidden>
 
        * server/vm/ActionExec.{h,cpp}, ASHandlers.cpp: add more accessors to

Index: libbase/utility.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/utility.h,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- libbase/utility.h   16 Jun 2008 07:22:20 -0000      1.61
+++ libbase/utility.h   18 Jun 2008 00:16:40 -0000      1.62
@@ -313,6 +313,28 @@
 #endif
 }
 
+#ifndef HAVE_STRNDUP
+/* Written by Niels Möller <address@hidden> and placed in the public domain. 
*/
+
+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.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- libamf/element.cpp  17 Jun 2008 14:55:13 -0000      1.29
+++ libamf/element.cpp  18 Jun 2008 00:16:41 -0000      1.30
@@ -30,6 +30,7 @@
 #include "log.h"
 #include "amf.h"
 #include "amfutf8.h"
+#include "utility.h"
 #include "element.h"
 #include <boost/cstdint.hpp> // for boost::?int??_t
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]