* [Bitcoin-development] [PATCH] Boost filesystem v3 support
@ 2011-08-19 16:48 Luke-Jr
2011-08-24 19:19 ` Jeff Garzik
0 siblings, 1 reply; 4+ messages in thread
From: Luke-Jr @ 2011-08-19 16:48 UTC (permalink / raw)
To: bitcoin-development
[-- Attachment #1: Type: text/plain, Size: 230 bytes --]
This patch conditionally adapts the one line needed to support boost
filesystem version 3 (default in Boost 1.46+ and required for 1.48+)
I have tested it with Boost 1.41.0 to verify it still works on these older
versions too.
[-- Attachment #2: 0001-Support-for-boost-filesystem-version-3.patch --]
[-- Type: text/x-patch, Size: 771 bytes --]
From 1012103c4e7c24177f4ee7e15a64e5be5fec35ff Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Fri, 19 Aug 2011 12:45:27 -0400
Subject: [PATCH] Support for boost filesystem version 3
---
src/ui.cpp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/ui.cpp b/src/ui.cpp
index 372808f..a5252f8 100644
--- a/src/ui.cpp
+++ b/src/ui.cpp
@@ -1808,7 +1808,11 @@ void SetStartOnSystemStartup(bool fAutoStart)
{
if (!fAutoStart)
{
+#if defined(BOOST_FILESYSTEM_VERSION) && BOOST_FILESYSTEM_VERSION >= 3
+ unlink(GetAutostartFilePath().string().c_str());
+#else
unlink(GetAutostartFilePath().native_file_string().c_str());
+#endif
}
else
{
--
1.7.3.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Bitcoin-development] [PATCH] Boost filesystem v3 support
2011-08-19 16:48 [Bitcoin-development] [PATCH] Boost filesystem v3 support Luke-Jr
@ 2011-08-24 19:19 ` Jeff Garzik
2011-08-24 19:21 ` Luke-Jr
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2011-08-24 19:19 UTC (permalink / raw)
To: Luke-Jr; +Cc: bitcoin-development
On Fri, Aug 19, 2011 at 12:48 PM, Luke-Jr <luke@dashjr.org> wrote:
> This patch conditionally adapts the one line needed to support boost
> filesystem version 3 (default in Boost 1.46+ and required for 1.48+)
>
> I have tested it with Boost 1.41.0 to verify it still works on these older
> versions too.
Your change appears to be technically correct. It is disappointing
for #ifdefs to crap up the code, though...
--
Jeff Garzik
exMULTI, Inc.
jgarzik@exmulti.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bitcoin-development] [PATCH] Boost filesystem v3 support
2011-08-24 19:19 ` Jeff Garzik
@ 2011-08-24 19:21 ` Luke-Jr
2011-08-24 19:29 ` Jeff Garzik
0 siblings, 1 reply; 4+ messages in thread
From: Luke-Jr @ 2011-08-24 19:21 UTC (permalink / raw)
To: Jeff Garzik; +Cc: bitcoin-development
On Wednesday, August 24, 2011 3:19:08 PM Jeff Garzik wrote:
> On Fri, Aug 19, 2011 at 12:48 PM, Luke-Jr <luke@dashjr.org> wrote:
> > This patch conditionally adapts the one line needed to support boost
> > filesystem version 3 (default in Boost 1.46+ and required for 1.48+)
> >
> > I have tested it with Boost 1.41.0 to verify it still works on these
> > older versions too.
>
> Your change appears to be technically correct. It is disappointing
> for #ifdefs to crap up the code, though...
It's only one line, and can be removed when the old APIs are sufficiently
removed.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bitcoin-development] [PATCH] Boost filesystem v3 support
2011-08-24 19:21 ` Luke-Jr
@ 2011-08-24 19:29 ` Jeff Garzik
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2011-08-24 19:29 UTC (permalink / raw)
To: Luke-Jr; +Cc: bitcoin-development
On Wed, Aug 24, 2011 at 3:21 PM, Luke-Jr <luke@dashjr.org> wrote:
> On Wednesday, August 24, 2011 3:19:08 PM Jeff Garzik wrote:
>> On Fri, Aug 19, 2011 at 12:48 PM, Luke-Jr <luke@dashjr.org> wrote:
>> > This patch conditionally adapts the one line needed to support boost
>> > filesystem version 3 (default in Boost 1.46+ and required for 1.48+)
>> >
>> > I have tested it with Boost 1.41.0 to verify it still works on these
>> > older versions too.
>>
>> Your change appears to be technically correct. It is disappointing
>> for #ifdefs to crap up the code, though...
>
> It's only one line, and can be removed when the old APIs are sufficiently
> removed.
Yeah, I think it is fair to apply. Just saying... a nicer version
would be... nice. Most projects work a bit to hide this stuff in
headers, so that the actual code is a bit clean.
Now, this is a general guideline, not a hard rule. We have plenty of
#ifdef windows code already, for example.
--
Jeff Garzik
exMULTI, Inc.
jgarzik@exmulti.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-08-24 19:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-19 16:48 [Bitcoin-development] [PATCH] Boost filesystem v3 support Luke-Jr
2011-08-24 19:19 ` Jeff Garzik
2011-08-24 19:21 ` Luke-Jr
2011-08-24 19:29 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox