On 2012.06.06 20:19, Lars Kanis wrote:
In theory libusb for Ruby should work on cygwin too, but I don't have a
proper test environment currently. Cygwin's gcc 4.6 will also default to
-fno-omit-frame-pointer but it shouldn't break anything there, since it
does not depend on msvcrt.dll.
If it's tied to msvcrt.dll, then we'll play it conservative and only
apply -fno-omit-frame-pointer to MinGW.
Proposed patch attached. I'm not seeing any ill effects from enforcing
the option, which is to be expected. If nobody comments on it, I'll push
it to the repository later on today.
To set the first context also as default context (Libusbx-commit
cf6e68a) is a good solution. I also would consider the warning about a
threading issue as a warning not just a debug message for the library user.
Yes. I would prefer leaving it as warn too, as users may want to know
why cancellation on XP is a bit more of a headache than with later
versions. The same is true for the other warnings, which I'd prefer
leaving with elevated priority, even if that means using the default
context instead of the user-specified one, and therefore potentially
ignoring the filtering level set by the app.
For now, I'm not going to touch anything there then.
Regards,
/Pete
From ff3259b440b3fa55a48cfb6233341c9ff664894a Mon Sep 17 00:00:00 2001
From: Pete Batard <[email protected]>
Date: Thu, 7 Jun 2012 11:55:30 +0100
Subject: [PATCH] Windows: Fix possible crash when using longjmp and gcc 4.6
* With gcc-4.6 the option -fomit-frame-pointer is turned on per default
even for the win32 target. This results in segfaults for any application
using setjmp/longjmp and MSVCRT.dll on WinXP.
See http://gcc.gnu.org/ml/gcc/2011-10/msg00351.html
* Issue reported by Lars Kanis
---
configure.ac | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index b305f68..b29b2bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,6 +71,7 @@ case $host in
AC_MSG_RESULT([Windows])
backend="windows"
threads="windows"
+ AM_CFLAGS="${AM_CFLAGS} -fno-omit-frame-pointer"
;;
*-cygwin*)
AC_MSG_RESULT([Cygwin (using Windows backend)])
@@ -212,7 +213,7 @@ AM_CONDITIONAL([HAVE_SIGACTION], [test "x$have_sigaction" =
"xyes"])
AC_CHECK_HEADERS([sys/time.h])
AC_CHECK_FUNCS(gettimeofday)
-AM_CFLAGS="-std=gnu99 -Wall -Wundef -Wunused -Wstrict-prototypes
-Werror-implicit-function-declaration $nopointersign_cflags -Wshadow"
+AM_CFLAGS="${AM_CFLAGS} -std=gnu99 -Wall -Wundef -Wunused -Wstrict-prototypes
-Werror-implicit-function-declaration $nopointersign_cflags -Wshadow"
AC_SUBST(VISIBILITY_CFLAGS)
AC_SUBST(AM_CFLAGS)
--
1.7.10.msysgit.1
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libusbx-devel