[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-ddrescue] Not compiling with uclibc++
From: |
Rosen Penev |
Subject: |
Re: [Bug-ddrescue] Not compiling with uclibc++ |
Date: |
Thu, 28 Mar 2019 14:50:51 -0700 |
On Thu, Mar 28, 2019 at 10:21 AM Antonio Diaz Diaz <address@hidden> wrote:
>
> Rosen Penev wrote:
> >> The problem seems to be that your implementation does not provide an
> >> implicit default constructor, as the C++ standard seems to require for
> >> class Sblock.
> > Right. I've seen similar issues in other projects but not quite like this.
>
> Thanks for reporting this.
>
> I have read the C++ standard again, and it seems that a default
> constructor is implicitly declared only if there is no user-declared
> constructor. The fix is trivial and will be in the next release of ddrescue:
>
> --- block.h~ 2019-01-22 22:56:14.0000
> +++ block.h 2019-03-28 17:24:41.0000
> @@ -35,6 +35,7 @@
> { if( size_ < 0 || size_ > LLONG_MAX - pos_ ) size_ = LLONG_MAX -
> pos_; }
>
> public:
> + Block() {} // default constructor
> Block( const long long p, const long long s ) : pos_( p ), size_( s )
> { if( p < 0 ) { pos_ = 0; if( s > 0 ) size_ -= std::min( s, -p ); }
> fix_size(); }
> @@ -103,6 +104,7 @@
> Status status_;
>
> public:
> + Sblock() {} // default constructor
> Sblock( const Block & b, const Status st )
> : Block( b ), status_( st ) {}
> Sblock( const long long p, const long long s, const Status st )
>
>
Wow. That's quite simple.
There's another issue with std::tolower being undefined. But that's fixed by
#include <cctype>
in mapbook.cc
Many thanks for looking into this.
> Best regards,
> Antonio.
>
> _______________________________________________
> Bug-ddrescue mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-ddrescue