gnucash maint: Multiple changes pushed

Mike Alexander mta at code.gnucash.org
Sun Apr 27 16:29:11 EDT 2014


Updated	 via  https://github.com/Gnucash/gnucash/commit/2c4463e7 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/4ec1f6b7 (commit)
	from  https://github.com/Gnucash/gnucash/commit/fb8018b3 (commit)



commit 2c4463e77f7ab94464e1a0373037356cd139f8d7
Author: Mike Alexander <mta at umich.edu>
Date:   Sat Apr 26 14:38:10 2014 -0400

    Ignore SIGTTOU while importing Python console class.
    
    Importing it causes this signal to be sent and if GnuCash is running
    in the background it hangs.

diff --git a/src/python/init.py b/src/python/init.py
index 8180793..59a49c1 100644
--- a/src/python/init.py
+++ b/src/python/init.py
@@ -8,8 +8,17 @@ sys.path.append(os.path.dirname(__file__))
 noisy = gnc_prefs_is_extra_enabled()
 if noisy:
     print "woop", os.path.dirname(__file__)
+# Importing the console class causes SIGTTOU to be thrown if GnuCash is
+# started in the background.  This causes a hang if it is not handled, 
+# so ignore it for the duration
+import signal
+old_sigttou = signal.signal(signal.SIGTTOU, signal.SIG_IGN)
+
 import pycons.console as cons
 
+# Restore the SIGTTOU handler
+signal.signal(signal.SIGTTOU, old_sigttou)
+
 if noisy:
     print "Hello from python!"
     print "test", sys.modules.keys()

commit 4ec1f6b724165b281842fda45769694e231c4027
Author: Mike Alexander <mta at umich.edu>
Date:   Fri Apr 25 23:32:25 2014 -0400

    Fix code that customizes parameters for specific gcc versions
    to agree with the comments.

diff --git a/configure.ac b/configure.ac
index 55000e3..553be43 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1305,18 +1305,18 @@ then
   # -Wdeclaration-after-statement in order to preserve source code
   # compatibility to gcc 2.95 and other compilers.
   GCC_VERSION=`${CC} -dumpversion`
-  if test "`echo ${GCC_VERSION} | cut -d. -f1`" -ge 3; then
-    # This is gcc >= 3.x.x
+  if test "`echo ${GCC_VERSION} | cut -d. -f1`" -eq 3; then
+    # This is gcc 3.x.x
     if test "`echo ${GCC_VERSION} | cut -d. -f2`" -ge 4; then
       # This is gcc >= 3.4.x
       warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement"
-    else if test "`echo ${GCC_VERSION} | cut -d. -f1`" -ge 4; then
-           # This is gcc == 4.x.x
-           warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement -Wno-pointer-sign"
-           # rpmbuild on FC4 forces this flag. Can't hurt to always compile with it.
-           warnFLAGS="${warnFLAGS} -D_FORTIFY_SOURCE=2"
-         fi
     fi
+  else if test "`echo ${GCC_VERSION} | cut -d. -f1`" -ge 4; then
+         # This is gcc >= 4.x.x
+         warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement -Wno-pointer-sign"
+         # rpmbuild on FC4 forces this flag. Can't hurt to always compile with it.
+         warnFLAGS="${warnFLAGS} -D_FORTIFY_SOURCE=2"
+       fi
   fi
   CFLAGS="${warnFLAGS} ${CFLAGS}"
 else



Summary of changes:
 configure.ac       | 16 ++++++++--------
 src/python/init.py |  9 +++++++++
 2 files changed, 17 insertions(+), 8 deletions(-)



More information about the gnucash-changes mailing list