gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog configure.ac libnet/rtmp.cpp li...


From: Russ Nelson
Subject: [Gnash-commit] gnash ChangeLog configure.ac libnet/rtmp.cpp li...
Date: Tue, 08 Apr 2008 02:48:57 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Russ Nelson <nelsonrn>  08/04/08 02:48:57

Modified files:
        .              : ChangeLog configure.ac 
        libnet         : rtmp.cpp rtmp.h 
        macros         : ming.m4 

Log message:
        Make sure that an existing libming is properly detected, so that
        we don't tell people to install a libming-dev which is already
        there.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6212&r2=1.6213
http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.506&r2=1.507
http://cvs.savannah.gnu.org/viewcvs/gnash/libnet/rtmp.cpp?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/libnet/rtmp.h?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/ming.m4?cvsroot=gnash&r1=1.18&r2=1.19

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6212
retrieving revision 1.6213
diff -u -b -r1.6212 -r1.6213
--- ChangeLog   7 Apr 2008 22:01:55 -0000       1.6212
+++ ChangeLog   8 Apr 2008 02:48:56 -0000       1.6213
@@ -1,3 +1,9 @@
+2008-04-07 Russ Nelson <address@hidden>
+
+       * Make sure that an existing libming is properly detected, so that
+         we don't tell people to install a libming-dev which is already
+        there.
+
 2008-04-07 Benjamin Wolsey <address@hidden>
 
        * testsuite/swfdec/PASSING: update for some new tests

Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.506
retrieving revision 1.507
diff -u -b -r1.506 -r1.507
--- configure.ac        1 Apr 2008 16:55:10 -0000       1.506
+++ configure.ac        8 Apr 2008 02:48:56 -0000       1.507
@@ -2698,17 +2698,25 @@
 
 dnl don't look for the flash compilers when cross compiling.
 if test x$cross_compiling = xno; then
+  if test x"$MING_LIBS" == ancientx; then
+    echo "        WARNING: The version of Ming that you have installed is too 
old for"
+    echo "                 us to use.  If you installed it from a package, 
uninstall and"
+    echo "                 Install it from http://ming.sourceforge.net";
+    echo "                 If necessary, use --with-ming-incl and 
--with-ming-lib"
+    echo "        MAKESWF is $MAKESWF"
+  else
   if test x"$MING_LIBS" != x; then
     echo "        MING version code is $MING_VERSION_CODE"
     echo "        MING flags are $MING_CFLAGS"
     echo "        MING libs are $MING_LIBS"
     echo "        MAKESWF is $MAKESWF"
-else
+    else
     echo "        WARNING: You need to have the Ming development and utilities 
packages"
     echo "                 installed to run most of the tests in Gnash 
testsuite."
     echo "                 Install it from http://ming.sourceforge.net";
     echo "                 or .deb users: apt-get install libming-dev"
   fi
+  fi
 
   if test x"$SWFDEC_TESTSUITE" != x; then
     echo "        SWFDEC testsuite dir is $SWFDEC_TESTSUITE"

Index: libnet/rtmp.cpp
===================================================================
RCS file: /sources/gnash/gnash/libnet/rtmp.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- libnet/rtmp.cpp     1 Apr 2008 22:20:38 -0000       1.5
+++ libnet/rtmp.cpp     8 Apr 2008 02:48:57 -0000       1.6
@@ -130,6 +130,10 @@
 RTMP::addVariable(amf::Element *el)
 {
 //    GNASH_REPORT_FUNCTION;
+    // by using a set we'd just insert the new element
+    // and the comparator would properly maintain the
+    // binary tree. See comment in header about 
+    // the _variables member
     _variables[el->getName()] = el;
 }
 
@@ -137,6 +141,12 @@
 RTMP::addVariable(char *name, amf::Element *el)
 { 
 //    GNASH_REPORT_FUNCTION;
+    assert(name); // caller should check for null
+    // NOTE: this method seems the only one preventing
+    // _variables to be a std::set, in that explicitly
+    // specifies a name, which may be different from
+    // the name stored in the amf::Element itself
+    // TODO: check if needed
     _variables[name] = el;
 }
 
@@ -144,7 +154,8 @@
 RTMP::getVariable(const std::string &name)
 {
 //    GNASH_REPORT_FUNCTION;
-//    return _variables[name.c_str()];
+    return _variables[name];
+#if 0
     map<const char *, amf::Element *>::iterator it;
     for (it = _variables.begin(); it != _variables.end(); it++) {
        const char *title = it->first;
@@ -154,6 +165,7 @@
            return el;
        }
     }
+#endif
 }
 
 // A request for a handshake is initiated by sending a byte with a
@@ -374,7 +386,7 @@
 RTMP::dump()
 {
     cerr << "RTMP packet contains " << _variables.size() << " variables." << 
endl;
-    map<const char *, amf::Element *>::iterator it;
+    Variables::iterator it;
     for (it = _variables.begin(); it != _variables.end(); it++) {
 //     const char *name = it->first;
        amf::Element *el = it->second;

Index: libnet/rtmp.h
===================================================================
RCS file: /sources/gnash/gnash/libnet/rtmp.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- libnet/rtmp.h       1 Apr 2008 22:20:38 -0000       1.4
+++ libnet/rtmp.h       8 Apr 2008 02:48:57 -0000       1.5
@@ -205,7 +205,13 @@
     bool invoke();
     void dump();
   protected:
-    std::map<const char *, amf::Element *> _variables;
+
+    // this could be reduced to a std::set if there's
+    // never the need to specify a different name from the
+    // one actually found in the Element object
+    typedef std::map<std::string, amf::Element *> Variables;
+    Variables _variables;
+
     amf::Buffer                *_handshake;
     Handler            *_handler;
     int                 _amf_index;

Index: macros/ming.m4
===================================================================
RCS file: /sources/gnash/gnash/macros/ming.m4,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- macros/ming.m4      24 Nov 2007 16:47:11 -0000      1.18
+++ macros/ming.m4      8 Apr 2008 02:48:57 -0000       1.19
@@ -62,7 +62,8 @@
     AC_PATH_PROG([MAKESWF], [makeswf], , [$MING_PATH:$PATH])
   fi
 
-  if test x"${MING_CFLAGS}" = x; then
+  dnl if MING_LIBS is empty, no MING_CONFIG found.
+  if test x"${MING_LIBS}" = x; then
     AC_ARG_WITH(ming_incl, AC_HELP_STRING([--with-ming-incl], [Directory where 
Ming header is]), with_ming_incl=${withval})
     AC_CACHE_VAL(ac_cv_path_ming_incl, [
       if test x"${with_ming_incl}" != x ; then
@@ -74,6 +75,7 @@
       fi
     ])
 
+    dnl if they didn't successfully force it, see if it's not in /usr/include.
     if test x"${ac_cv_path_ming_incl}" = x; then
       for i in $incllist; do
              if test -f $i/ming.h; then
@@ -88,6 +90,7 @@
       done
     fi
 
+    dnl if it's not somewhere weird, make sure we can #include it already.
     if test x"${ac_cv_path_ming_incl}" = x; then
       AC_CHECK_HEADERS(ming.h, [ac_cv_path_ming_incl=""])
     fi
@@ -107,8 +110,7 @@
       fi
     ])
 
-    dnl If the header doesn't exist, there is no point looking for the library.
-    if test x"${ac_cv_path_ming_incl}" != x; then
+    dnl look for the library, but don't add -L if it's in a standard place
       for i in $libslist; do
        if test -f $i/libming.a -o -f $i/libming.${shlibext}; then
          if test ! x"$i" = x"/usr/lib" -a ! x"$i" = x"/usr/lib64"; then
@@ -120,12 +122,11 @@
          fi
          fi
       done
-      if test x"${ac_cv_path_ming_incl}" = x; then
+    if test x"${ac_cv_path_ming_lib}" = x; then
         AC_CHECK_LIB(ming, ming_init_io, [ac_cv_path_ming_lib=""])
       fi
       AC_MSG_CHECKING([for libming library])
       AC_MSG_RESULT(${ac_cv_path_ming_lib})
-    fi
 
     if test x"${ac_cv_path_ming_incl}" != x ; then
       MING_CFLAGS="${ac_cv_path_ming_incl}"




reply via email to

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