Clean up OS X build slightly. Better error on failure of xmlSecDSigCtxSign.
authorCarl Hetherington <cth@carlh.net>
Sat, 15 Mar 2014 17:49:40 +0000 (17:49 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 15 Mar 2014 17:49:40 +0000 (17:49 +0000)
src/asset.cc
src/asset.h
src/picture_asset.h
src/signer.cc
src/stereo_picture_frame.h
wscript

index d51b78fd50650a53d7432825cbfd6c357e4495b9..4ad29dde8226a75d6eaffdf7f022804f42f04e7f 100644 (file)
@@ -33,8 +33,9 @@
 #include "metadata.h"
 #include "compose.hpp"
 
-using namespace std;
-using namespace boost;
+using std::string;
+using boost::shared_ptr;
+using boost::lexical_cast;
 using namespace libdcp;
 
 Asset::Asset (boost::filesystem::path directory, boost::filesystem::path file_name)
@@ -58,7 +59,7 @@ Asset::write_to_pkl (xmlpp::Node* node, bool interop) const
        asset->add_child("Id")->add_child_text ("urn:uuid:" + _uuid);
        asset->add_child("AnnotationText")->add_child_text (_file_name.string ());
        asset->add_child("Hash")->add_child_text (digest ());
-       asset->add_child("Size")->add_child_text (lexical_cast<string> (filesystem::file_size(path())));
+       asset->add_child("Size")->add_child_text (lexical_cast<string> (boost::filesystem::file_size(path())));
        if (interop) {
                asset->add_child("Type")->add_child_text (String::compose ("application/x-smpte-mxf;asdcpKind=%1", asdcp_kind ()));
        } else {
@@ -76,13 +77,13 @@ Asset::write_to_assetmap (xmlpp::Node* node) const
        chunk->add_child("Path")->add_child_text (_file_name.string ());
        chunk->add_child("VolumeIndex")->add_child_text ("1");
        chunk->add_child("Offset")->add_child_text ("0");
-       chunk->add_child("Length")->add_child_text (lexical_cast<string> (filesystem::file_size(path())));
+       chunk->add_child("Length")->add_child_text (lexical_cast<string> (boost::filesystem::file_size(path())));
 }
 
-filesystem::path
+boost::filesystem::path
 Asset::path () const
 {
-       filesystem::path p;
+       boost::filesystem::path p;
        p /= _directory;
        p /= _file_name;
        return p;
index 773e3d48ae2fb9c2b060519b2620693db36107e9..6db8e5c271761670e0ce20d7187ed34460466650 100644 (file)
@@ -32,7 +32,7 @@
 #include "types.h"
 
 namespace ASDCP {
-       class WriterInfo;
+       struct WriterInfo;
 }
 
 namespace xmlpp {
index c09808e2dd382e93918b96bd16dbc707677cffd0..b404abd2e5d0bb897d23391adcd3e520e4291d5f 100644 (file)
@@ -31,7 +31,7 @@
 
 namespace ASDCP {
        namespace JP2K {
-               class PictureDescriptor;
+               struct PictureDescriptor;
        }
 }
 
index 63da8d8e28001a12c34488b9b2a6a8142164aee0..11cf5eb874b73093c4c45f00aea2a7b8b9e7a846 100644 (file)
@@ -25,6 +25,7 @@
 #include <libcxml/cxml.h>
 #include "signer.h"
 #include "exceptions.h"
+#include "compose.hpp"
 
 using std::string;
 using std::list;
@@ -107,8 +108,9 @@ Signer::add_signature_value (xmlpp::Node* parent, string ns) const
                throw MiscError ("could not set key name");
        }
 
-       if (xmlSecDSigCtxSign (signature_context, parent->cobj ()) < 0) {
-               throw MiscError ("could not sign");
+       int const r = xmlSecDSigCtxSign (signature_context, parent->cobj ());
+       if (r < 0) {
+               throw MiscError (String::compose ("could not sign (%1)", r));
        }
 
        xmlSecDSigCtxDestroy (signature_context);
index ab99ceac8e9b7c02893c80718dd265c2cc4dc17d..878f6ab4c40e21858357cadf1a13f10e3ff06502 100644 (file)
@@ -24,7 +24,7 @@
 
 namespace ASDCP {
        namespace JP2K {
-               class SFrameBuffer;
+               struct SFrameBuffer;
        }
        class AESDecContext;
 }
diff --git a/wscript b/wscript
index b0295084226af90ffbfff99be9b77d0286fffe56..3f7da8776d992691f3f6e94918427ceaf6d4fc6d 100644 (file)
--- a/wscript
+++ b/wscript
@@ -27,7 +27,7 @@ def configure(conf):
         conf.env.append_value('CXXFLAGS', '-DLIBDCP_POSIX')
 
     if not conf.options.osx:
-        conf.env.append_value('CXXFLAGS', ['-Wno-unused-result'])
+        conf.env.append_value('CXXFLAGS', ['-Wno-unused-result', '-Wno-unused-parameter'])
 
     conf.check_cfg(package = 'openssl', args = '--cflags --libs', uselib_store = 'OPENSSL', mandatory = True)
     conf.check_cfg(package = 'libxml++-2.6', args = '--cflags --libs', uselib_store = 'LIBXML++', mandatory = True)