gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash gui/Makefile.am utilities/Makefile.am lib...


From: Rob Savoye
Subject: [Gnash-commit] gnash gui/Makefile.am utilities/Makefile.am lib...
Date: Tue, 03 Oct 2006 15:40:50 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Rob Savoye <rsavoye>    06/10/03 15:40:50

Modified files:
        gui            : Makefile.am 
        utilities      : Makefile.am 
        libbase        : log.cpp 
        .              : ChangeLog 

Log message:
                * gui/Makefile.am: Add BOOST_CFLAGS and BOOST_LIBS.
                * libbase/Makefile.am: Add BOOST_CFLAGS and BOOST_LIBS.
                * utilities/Makefile.am: Add BOOST_CFLAGS and BOOST_LIBS.
                * libbase/log.cpp: Use Boost::mutex to make debug logging 
support
                thread-safe.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Makefile.am?cvsroot=gnash&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/gnash/utilities/Makefile.am?cvsroot=gnash&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/log.cpp?cvsroot=gnash&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1017&r2=1.1018

Patches:
Index: gui/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/gui/Makefile.am,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- gui/Makefile.am     3 Oct 2006 14:34:21 -0000       1.20
+++ gui/Makefile.am     3 Oct 2006 15:40:50 -0000       1.21
@@ -108,7 +108,8 @@
         $(PNG_CFLAGS) \
         $(JPEG_CFLAGS) \
         $(MP3_CFLAGS) \
-        $(OGG_CFLAGS)
+        $(OGG_CFLAGS) \
+       $(BOOST_CFLAGS)
 
 AM_CPPFLAGS = $(INCLUDES) -DPKGDATADIR=\"$(pkgdatadir)\"
 
@@ -121,30 +122,9 @@
 AM_LDFLAGS =  \
        $(GLIB_LIBS) \
        $(PANGO_LIBS) \
-       $(GLEXT_LIBS)
-#        ../libbase/libgnashbase.la \
-#      $(JPEG_LIBS) \
-#      $(PNG_LIBS) \
-#        $(OGG_LIBS) \
-#      $(ZLIB_LIBS) \
-#        $(LIBXML_LIBS) \
-#        $(SDL_LIBS) \
-#        $(SDL_MIXER_LIBS) \
-#        $(OPENGL_LIBS) \
-#      $(GLEXT_LIBS) \
-#      $(GTK2_LIBS) \
-#      $(FLTK_LIBS) \
-#      $(XFT_LIBS) \
-#      $(CAIRO_LIBS) \
-#      $(ATK_LIBS) \
-#      $(GLIB_LIBS) \
-#      $(X_LIBS) \
-#      $(DMALLOC_LIBS) \
-#      $(MP3_LIBS) \
-#      $(PTHREAD_LIBS) \
-#      $(KDE_LDFLAGS) \
-#      $(all_libraries) \
-#      $(KDE_RPATH)
+       $(GLEXT_LIBS) \
+       $(BOOST_LIBS) \
+       $(PTHREAD_LIBS)
 
 lib_LTLIBRARIES = libgnashgui.la libgnashplayer.la
 libgnashgui_la_SOURCES = \

Index: utilities/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/utilities/Makefile.am,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- utilities/Makefile.am       24 Aug 2006 08:24:37 -0000      1.25
+++ utilities/Makefile.am       3 Oct 2006 15:40:50 -0000       1.26
@@ -41,7 +41,9 @@
 ## WARNING: make sure GLIB_LIBS appears first
 ## See: http://lists.gnu.org/archive/html/gnash-dev/2006-07/msg00076.html
 AM_LDFLAGS = \
-       $(GLIB_LIBS)
+       $(GLIB_LIBS) \
+       $(BOOST_LIBS) \
+       $(PTHREAD_LIBS)
 #      $(LIBXML_LIBS) \
 #      $(JPEG_LIBS) \
 #      $(PNG_LIBS) \
@@ -64,7 +66,9 @@
         -I$(top_srcdir)/server/parser  \
         -I$(top_srcdir)/libgeometry \
         $(LIBXML_CFLAGS)       \
-        $(SDL_CFLAGS)
+        $(SDL_CFLAGS) \
+       $(BOOST_CFLAGS)
+
 #      $(PTHREAD_CFLAGS)        \
 #      $(LIBXML_CFLAGS)        \
 #      $(OPENGL_CFLAGS)        \

Index: libbase/log.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/log.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- libbase/log.cpp     23 Sep 2006 18:49:55 -0000      1.27
+++ libbase/log.cpp     3 Oct 2006 15:40:50 -0000       1.28
@@ -36,7 +36,7 @@
 //
 //
 
-/* $Id: log.cpp,v 1.27 2006/09/23 18:49:55 bjacques Exp $ */
+/* $Id: log.cpp,v 1.28 2006/10/03 15:40:50 rsavoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -61,11 +61,12 @@
 #include <libxml/parser.h>
 #include <libxml/xmlreader.h>
 #endif
+#include <ctime>
+#include <boost/thread/mutex.hpp>
+static boost::mutex io_mutex;
 
 #include "log.h"
 
-#include <ctime>
-
 using namespace std;
 
 namespace gnash {
@@ -122,6 +123,7 @@
     return x << buf << ": ";
 }
 
+
 string
 timestamp() {
     time_t t;
@@ -379,6 +381,7 @@
 LogFile&
 LogFile::operator << (char x)
 {
+    boost::mutex::scoped_lock lock(io_mutex);
     if (_verbose) {
        cout << x;
     }
@@ -396,6 +399,7 @@
 LogFile&
 LogFile::operator << (long x)
 {
+    boost::mutex::scoped_lock lock(io_mutex);
     if (_verbose) {
        cout << x;
     }
@@ -413,6 +417,7 @@
 LogFile&
 LogFile::operator << (unsigned int x)
 {
+    boost::mutex::scoped_lock lock(io_mutex);
     if (_verbose) {
        cout << x;
     }
@@ -430,6 +435,7 @@
 LogFile&
 LogFile::operator << (unsigned long x)
 {
+    boost::mutex::scoped_lock lock(io_mutex);
     if (_verbose) {
        cout << x;
     }
@@ -447,6 +453,7 @@
 LogFile&
 LogFile::operator << (float x)
 { 
+    boost::mutex::scoped_lock lock(io_mutex);
     if (_verbose > 0) {
        cout << x;
     }
@@ -464,6 +471,7 @@
 LogFile&
 LogFile::operator << (double &x)
 {
+    boost::mutex::scoped_lock lock(io_mutex);
     if (_verbose) {
        cout << x;
     }
@@ -498,6 +506,7 @@
 LogFile&
 LogFile::operator << (void *ptr)
 {
+    boost::mutex::scoped_lock lock(io_mutex);
     
     if (_verbose) {
        cout << ptr;
@@ -516,6 +525,8 @@
 LogFile& 
 LogFile::operator << (string &s)
 {
+    boost::mutex::scoped_lock lock(io_mutex);
+
     if (_verbose) {
        cout << s;
     }
@@ -558,10 +569,9 @@
     // now we don't.
     int len = c.length();
 
-               if (len > 0)
-               {
-           if (c[len-1] == '\n')
-                       {
+    boost::mutex::scoped_lock lock(io_mutex);
+    if (len > 0) {
+       if (c[len-1] == '\n') {
                                //c[len-1] = 0;
                                c.resize(len-1);
                        }
@@ -611,6 +621,7 @@
       return *this;
     }
     
+    boost::mutex::scoped_lock lock(io_mutex);
     if (_stamp == true && (_state == IDLE || _state == OPEN)) {
        _state = INPROGRESS;
        if (_verbose) {
@@ -637,6 +648,8 @@
 LogFile& 
 LogFile::operator << (const xmlChar *c)
 {
+    boost::mutex::scoped_lock lock(io_mutex);
+    
     _logentry = timestamp();
     _logentry += ": ";
 
@@ -670,6 +683,7 @@
 ostream&
 LogFile::operator << (ostream & (&)(ostream &))
 {
+    boost::mutex::scoped_lock lock(io_mutex);
     if (_trace) {
        if (_verbose >= TRACELEVEL) {
            cout << "\r" << endl;

Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1017
retrieving revision 1.1018
diff -u -b -r1.1017 -r1.1018
--- ChangeLog   3 Oct 2006 15:05:37 -0000       1.1017
+++ ChangeLog   3 Oct 2006 15:40:50 -0000       1.1018
@@ -1,3 +1,11 @@
+2006-10-03 Rob Savoye <address@hidden>
+
+       * gui/Makefile.am: Add BOOST_CFLAGS and BOOST_LIBS.
+       * libbase/Makefile.am: Add BOOST_CFLAGS and BOOST_LIBS.
+       * utilities/Makefile.am: Add BOOST_CFLAGS and BOOST_LIBS.
+       * libbase/log.cpp: Use Boost::mutex to make debug logging support
+       thread-safe.
+
 2006-10-03 Sandro Santilli  <address@hidden>
 
        * gui/gnash.cpp (usage): document -j and -k switches.




reply via email to

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