[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-
From: |
Gabriele Giacone |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1278-ge43fcac |
Date: |
Tue, 06 Dec 2011 20:12:12 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".
The branch, master has been updated
via e43fcace72d8de544a72ce33ee531f800dbe4ceb (commit)
from 8fc19a890ee787d26200dc1b8b5546e3bb15ac7b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=e43fcace72d8de544a72ce33ee531f800dbe4ceb
commit e43fcace72d8de544a72ce33ee531f800dbe4ceb
Author: Gabriele Giacone <address@hidden>
Date: Tue Dec 6 20:50:47 2011 +0100
Fix for old boost and libc6 libs.
diff --git a/plugin/npapi/plugin.cpp b/plugin/npapi/plugin.cpp
index edcecfe..966b99f 100644
--- a/plugin/npapi/plugin.cpp
+++ b/plugin/npapi/plugin.cpp
@@ -25,6 +25,7 @@
#include <boost/scoped_array.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/find.hpp>
+#define BOOST_IOSTREAMS_USE_DEPRECATED
#include <boost/iostreams/device/file_descriptor.hpp>
#include <boost/iostreams/stream.hpp>
#include <cassert>
@@ -157,9 +158,29 @@ boost::iostreams::file_descriptor_sink getfdsink(char
mkstemplate[]);
boost::iostreams::file_descriptor_sink
getfdsink(char mksTemplate[])
{
- int suffix = std::string(mksTemplate).size() -
std::string(mksTemplate).find("XXXXXX") - 6;
- int fd = mkstemps (mksTemplate, suffix);
+ int fd, suffix = std::string(mksTemplate).size() -
std::string(mksTemplate).find("XXXXXX") - 6;
+#if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 11)
+ fd = mkstemps (mksTemplate, suffix);
+#else
+ if (suffix > 0) {
+ char *mksTNoSuff = const_cast<char*>(std::string(mksTemplate).substr(0,
std::string(mksTemplate).size() - suffix).c_str());
+ fd = mkstemp (mksTNoSuff);
+ const char *mksTSuffix =
std::string(mksTemplate).substr(std::string(mksTemplate).size() - suffix,
suffix).c_str();
+ std::stringstream mksTFull;
+ mksTFull << mksTNoSuff << mksTSuffix;
+ if (rename (mksTNoSuff, mksTFull.str().c_str()) != 0) {
+ gnash::log_error("Failed to rename %s", mksTNoSuff);
+ }
+ strcpy (mksTemplate, mksTFull.str().c_str());
+ } else {
+ fd = mkstemp (mksTemplate);
+ }
+#endif
+#if BOOST_VERSION < 104400
+ boost::iostreams::file_descriptor_sink fdsink(fd, true);
+#else
boost::iostreams::file_descriptor_sink fdsink(fd,
boost::iostreams::close_handle);
+#endif
return fdsink;
}
@@ -980,10 +1001,12 @@ create_standalone_launcher(const std::string& page_url,
const std::string& swf_u
char debugname[] = "/tmp/gnash-debug-XXXXXX.sh";
boost::iostreams::file_descriptor_sink fdsink = getfdsink(debugname);
+#if BOOST_VERSION >= 104400
if (fdsink.handle() == -1) {
gnash::log_error("Failed to create sink: %s", debugname);
return;
}
+#endif
boost::iostreams::stream<boost::iostreams::file_descriptor_sink>
saLauncher (fdsink);
@@ -1119,10 +1142,12 @@ nsPluginInstance::setupCookies(const std::string&
pageurl)
gnash::log_debug("The Cookie for %s is %s", url, ncookie);
char cookiename[] = "/tmp/gnash-cookies.XXXXXX";
boost::iostreams::file_descriptor_sink fdsink = getfdsink(cookiename);
+#if BOOST_VERSION >= 104400
if (fdsink.handle() == -1) {
gnash::log_error("Failed to create sink: %s", cookiename);
return;
}
+#endif
boost::iostreams::stream<boost::iostreams::file_descriptor_sink>
cookiefile (fdsink);
-----------------------------------------------------------------------
Summary of changes:
plugin/npapi/plugin.cpp | 29 +++++++++++++++++++++++++++--
1 files changed, 27 insertions(+), 2 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1278-ge43fcac,
Gabriele Giacone <=