Fix a few deprecation warnings when building and testing with guile 2

This commit is contained in:
Geert Janssens 2014-10-28 21:22:01 +01:00
parent 4e61f0fc9f
commit 9f15bb19fd
4 changed files with 23 additions and 7 deletions

View File

@ -7,8 +7,12 @@ exec @GUILE@ -s $0 "$@"
;; library-dirs ;; library-dirs
(use-modules (srfi srfi-13) (srfi srfi-14)) ;; for string-tokenize (use-modules (srfi srfi-13) (srfi srfi-14)) ;; for string-tokenize
;; 'debug is deprecated and unused since guile 2
(cond-expand
(guile-2 )
(else
(debug-enable 'debug)))
(debug-enable 'backtrace) (debug-enable 'backtrace)
(debug-enable 'debug)
(read-enable 'positions) (read-enable 'positions)
;; Are we on MS Windows here? If yes, make this a #t. ;; Are we on MS Windows here? If yes, make this a #t.

View File

@ -34,7 +34,11 @@
(gnc:module-load "gnucash/app-utils" 0) (gnc:module-load "gnucash/app-utils" 0)
(use-modules (gnucash report standard-reports)) (use-modules (gnucash report standard-reports))
(use-modules (gnucash report business-reports)) (use-modules (gnucash report business-reports))
(use-modules (ice-9 syncase)) ; for define-syntax ; Syncase is deprecated and redundant in guile 2
(cond-expand
(guile-2 )
(else
(use-modules (ice-9 syncase)))) ; for define-syntax
;(use-modules (srfi srfi-13)) ; for extra string functions ;(use-modules (srfi srfi-13)) ; for extra string functions

View File

@ -8,7 +8,11 @@
(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
(use-modules (gnucash gnc-module)) (use-modules (gnucash gnc-module))
(debug-enable 'debug) ;; 'debug is deprecated and unused since guile 2
(cond-expand
(guile-2 )
(else
(debug-enable 'debug)))
(debug-enable 'backtrace) (debug-enable 'backtrace)
(gnc:module-load "gnucash/report/report-system" 0) (gnc:module-load "gnucash/report/report-system" 0)

View File

@ -62,13 +62,17 @@
;; Do this stuff very early -- but other than that, don't add any ;; Do this stuff very early -- but other than that, don't add any
;; executable code until the end of the file if you can help it. ;; executable code until the end of the file if you can help it.
;; These are needed for a guile 1.3.4 bug ;; These are needed for a guile 1.3.4 bug
(debug-enable 'debug)
(debug-enable 'backtrace) (debug-enable 'backtrace)
(read-enable 'positions) (read-enable 'positions)
;; maxdepth doesn't exist in guile 2 and onwards: ;; These options should only be set for guile < 2.0
(if (< (string->number (major-version)) 2) ;; 'debug (deprecated and unused since guile 2)
(debug-set! maxdepth 100000)) ;; maxdepth (removed since guile 2)
(cond-expand
(guile-2 )
(else
(debug-enable 'debug)
(debug-set! maxdepth 100000)))
(debug-set! stack 200000) (debug-set! stack 200000)
;; Initalialize localization, otherwise reports may output ;; Initalialize localization, otherwise reports may output