From 8e3c3d25cb51dc2ceb2044dec545dc4028cfe39a Mon Sep 17 00:00:00 2001 From: Andrew Udvare Date: Fri, 8 Feb 2019 18:10:21 -0500 Subject: [PATCH 1/4] Define off64_t=off_t for macOS Detect the systemd binary and install the systemd units conditionally. --- CMakeLists.txt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 951d874..2373eb5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,19 @@ set( GRIVE_VERSION "0.5.1-dev" ) # common compile options add_definitions( -DVERSION="${GRIVE_VERSION}" ) add_definitions( -D_FILE_OFFSET_BITS=64 -std=c++0x ) +if ( APPLE ) + add_definitions( -Doff64_t=off_t ) +endif ( APPLE ) + +find_program( + HAVE_SYSTEMD systemd + PATHS /lib/systemd /usr/lib/systemd + NO_DEFAULT_PATH +) +if ( HAVE_SYSTEMD ) + add_subdirectory( systemd ) +endif( NOT HAVE_SYSTEMD ) -add_subdirectory( systemd ) add_subdirectory( libgrive ) add_subdirectory( grive ) - \ No newline at end of file + From e972a77790d7e42bb71822a06836d38ec9b5537f Mon Sep 17 00:00:00 2001 From: Tatsh Date: Sat, 9 Feb 2019 10:56:23 -0500 Subject: [PATCH 2/4] Fix line --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2373eb5..737f696 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ find_program( ) if ( HAVE_SYSTEMD ) add_subdirectory( systemd ) -endif( NOT HAVE_SYSTEMD ) +endif( HAVE_SYSTEMD ) add_subdirectory( libgrive ) add_subdirectory( grive ) From 7ef50e9523b230876905ed437ed0b1eeefd14dc9 Mon Sep 17 00:00:00 2001 From: Andrew Udvare Date: Sat, 9 Feb 2019 17:01:00 -0500 Subject: [PATCH 3/4] libgrive: Fix destructors of Feed and Feed2 --- libgrive/src/base/Feed.cc | 4 ++++ libgrive/src/base/Feed.hh | 1 + libgrive/src/drive2/Feed2.cc | 4 ++++ libgrive/src/drive2/Feed2.hh | 1 + 4 files changed, 10 insertions(+) diff --git a/libgrive/src/base/Feed.cc b/libgrive/src/base/Feed.cc index 0ea834d..0a4f51b 100644 --- a/libgrive/src/base/Feed.cc +++ b/libgrive/src/base/Feed.cc @@ -30,6 +30,10 @@ Feed::Feed( const std::string &url ): { } +Feed::~Feed() +{ +} + Feed::iterator Feed::begin() const { return m_entries.begin() ; diff --git a/libgrive/src/base/Feed.hh b/libgrive/src/base/Feed.hh index d43c68c..fc73e75 100644 --- a/libgrive/src/base/Feed.hh +++ b/libgrive/src/base/Feed.hh @@ -41,6 +41,7 @@ public : public : Feed( const std::string& url ); virtual bool GetNext( http::Agent *http ) = 0 ; + virtual ~Feed() = 0 ; iterator begin() const ; iterator end() const ; diff --git a/libgrive/src/drive2/Feed2.cc b/libgrive/src/drive2/Feed2.cc index 8f3d234..037df37 100644 --- a/libgrive/src/drive2/Feed2.cc +++ b/libgrive/src/drive2/Feed2.cc @@ -36,6 +36,10 @@ Feed2::Feed2( const std::string& url ): { } +Feed2::~Feed2() +{ +} + bool Feed2::GetNext( http::Agent *http ) { if ( m_next.empty() ) diff --git a/libgrive/src/drive2/Feed2.hh b/libgrive/src/drive2/Feed2.hh index 4de411e..453c60d 100644 --- a/libgrive/src/drive2/Feed2.hh +++ b/libgrive/src/drive2/Feed2.hh @@ -31,6 +31,7 @@ class Feed2: public Feed { public : Feed2( const std::string& url ) ; + ~Feed2() ; bool GetNext( http::Agent *http ) ; } ; From 6354689a939518d2168b04c398500d119ec35ef8 Mon Sep 17 00:00:00 2001 From: Andrew Udvare Date: Sat, 9 Feb 2019 17:06:23 -0500 Subject: [PATCH 4/4] libgrive: fix formatting --- libgrive/src/base/Feed.hh | 2 +- libgrive/src/drive2/Feed2.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libgrive/src/base/Feed.hh b/libgrive/src/base/Feed.hh index fc73e75..c12f507 100644 --- a/libgrive/src/base/Feed.hh +++ b/libgrive/src/base/Feed.hh @@ -41,7 +41,7 @@ public : public : Feed( const std::string& url ); virtual bool GetNext( http::Agent *http ) = 0 ; - virtual ~Feed() = 0 ; + virtual ~Feed() = 0 ; iterator begin() const ; iterator end() const ; diff --git a/libgrive/src/drive2/Feed2.hh b/libgrive/src/drive2/Feed2.hh index 453c60d..c5643f6 100644 --- a/libgrive/src/drive2/Feed2.hh +++ b/libgrive/src/drive2/Feed2.hh @@ -31,7 +31,7 @@ class Feed2: public Feed { public : Feed2( const std::string& url ) ; - ~Feed2() ; + ~Feed2() ; bool GetNext( http::Agent *http ) ; } ;