Libpano13 Patch

106 views
Skip to first unread message

Matthew Petroff

unread,
Feb 11, 2014, 5:11:00 PM2/11/14
to hugi...@googlegroups.com
Attached is a small patch for libpano13 that uses the default atanh function for MSVC 2012+ instead of the bundled version. It fixes shared library compilation on MSVC 2013. Could someone with repository access please commit it?

Thanks.

-Matthew
libpano-msvc-patch.diff

Terry Duell

unread,
Feb 11, 2014, 5:45:23 PM2/11/14
to hugi...@googlegroups.com
Hello Matthew,

On Wed, 12 Feb 2014 09:11:00 +1100, Matthew Petroff <mat...@mpetroff.net>
wrote:
I tried, but it failed to apply...

[terry@localhost libpano13]$ hg import ../libpano-msvc-patch.diff
applying ../libpano-msvc-patch.diff
patching file math.c
Hunk #1 FAILED at 50
1 out of 1 hunks FAILED -- saving rejects to file math.c.rej
abort: patch failed to apply

The content of math.c.rej,

--- math.c
+++ math.c
@@ -51,8 +51,8 @@

//------------------------- Some auxilliary math functions
--------------------------------------------

-// atanh is not available on MSVC. Use the atanh routine from gsl
-#ifdef _MSC_VER
+// atanh is not available on MSVC until Visual Studio 2012. Use the atanh
routine from gsl.
+#if _MSC_VER < 1700

#define GSL_DBL_EPSILON 2.2204460492503131e-16
#define GSL_SQRT_DBL_EPSILON 1.4901161193847656e-08

I can't see any other changes in these lines of math.c in my working copy
that would affect the patch.

Cheers,
--
Regards,
Terry Duell

Bruno Postle

unread,
Feb 11, 2014, 6:20:03 PM2/11/14
to Hugin ptx
On Wed 12-Feb-2014 at 09:45 +1100, Terry Duell wrote:
>On Wed, 12 Feb 2014 09:11:00 +1100, Matthew Petroff wrote:
>
>>Attached is a small patch for libpano13 that uses the default atanh
>>function for MSVC 2012+ instead of the bundled version. It fixes shared
>>library compilation on MSVC 2013. Could someone with repository access
>>please commit it?
>
>I tried, but it failed to apply...
>
>[terry@localhost libpano13]$ hg import ../libpano-msvc-patch.diff
>applying ../libpano-msvc-patch.diff
>patching file math.c
>Hunk #1 FAILED at 50

I can't check from here, but I'm not sure hg import will work with
this diff, probably something like this should do it:

patch -p1 < ../libpano-msvc-patch.diff

--
Bruno

Matthew Petroff

unread,
Feb 11, 2014, 8:11:04 PM2/11/14
to hugi...@googlegroups.com
It wasn't an hg patch. Attached is an hg patch that should work with hg import.

-Matthew
824.patch

Terry Duell

unread,
Feb 11, 2014, 10:44:49 PM2/11/14
to hugi...@googlegroups.com
Hello Matthew,

On Wed, 12 Feb 2014 12:11:04 +1100, Matthew Petroff <mat...@mpetroff.net>
wrote:

> It wasn't an hg patch. Attached is an hg patch that should work with hg
> import.
>

That one failed in the same manner.
I managed to do it using your original patch and Bruno's method.

Terry Duell

unread,
Feb 11, 2014, 10:45:33 PM2/11/14
to hugi...@googlegroups.com
On Wed, 12 Feb 2014 10:20:03 +1100, Bruno Postle <br...@postle.net> wrote:

>
> I can't check from here, but I'm not sure hg import will work with this
> diff, probably something like this should do it:
>
> patch -p1 < ../libpano-msvc-patch.diff
>

That worked OK, thanks.

Matthew Petroff

unread,
Feb 12, 2014, 11:18:04 AM2/12/14
to hugi...@googlegroups.com
I looked at my patch again and realized it breaks things for non-Windows. Attached is a revised patch that should actually fix things.

-Matthew
patch2.diff

T. Modes

unread,
Feb 12, 2014, 11:56:13 AM2/12/14
to hugi...@googlegroups.com
Hi Matthew,


Am Mittwoch, 12. Februar 2014 17:18:04 UTC+1 schrieb Matthew Petroff:
I looked at my patch again and realized it breaks things for non-Windows. Attached is a revised patch that should actually fix things.

thanks for fixing. Committed a slightly modified version to repository.

Thomas

Terry Duell

unread,
Feb 12, 2014, 5:00:06 PM2/12/14
to hugi...@googlegroups.com
Hello Thomas,
Blind in one eye and can't see out the other...I misread the above and
assumed Matthew's revised patch was still to be committed, so I committed
it. Should have updated and checked first.
I have now backed that out, but see your commit is in a different head.
Did I cause that?

T. Modes

unread,
Feb 13, 2014, 11:52:56 AM2/13/14
to hugi...@googlegroups.com
Hi Terry


Am Mittwoch, 12. Februar 2014 23:00:06 UTC+1 schrieb Tduell:
Blind in one eye and can't see out the other...I misread the above and  
assumed Matthew's revised patch was still to be committed, so I committed  
it. Should have updated and checked first.
I have now backed that out, but see your commit is in a different head.  
Did I cause that?


I don't see this in the public repository. So it seems only in your repo - the changes were probably not yet pushed to the public one.

So in this case I think it is the cleanest to make a new clone on your side to get a fresh and clean copy.

Thomas

Terry Duell

unread,
Feb 13, 2014, 4:55:23 PM2/13/14
to hugi...@googlegroups.com
Hello Thomas,

On Fri, 14 Feb 2014 03:52:56 +1100, T. Modes <Thomas...@gmx.de> wrote:


> I don't see this in the public repository. So it seems only in your repo
> - the changes were probably not yet pushed to the public one.
>
> So in this case I think it is the cleanest to make a new clone on your
> side to get a fresh and clean copy.

I have a clean copy and it all looks much better, thanks.
Now seeing things as they really are, I see that Matthews 'patch2.diff'
hasn't been applied.
It's all greek to me, so not sure if it is still applicable. Perhaps you
should have a look.

T. Modes

unread,
Feb 14, 2014, 10:40:31 AM2/14/14
to hugi...@googlegroups.com
Hi Terry,


Am Donnerstag, 13. Februar 2014 22:55:23 UTC+1 schrieb Tduell:
Now seeing things as they really are, I see that Matthews 'patch2.diff'  
hasn't been applied.
It's all greek to me, so not sure if it is still applicable. Perhaps you  
should have a look.

The mentioned patch2.diff has been applied in changeset 071273ed3a44fc614d0927d0d4340477d6add9f0 in a slightly different form.

Thomas
Reply all
Reply to author
Forward
0 new messages