forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scmail-gauche-0.9.diff
35 lines (31 loc) · 1.29 KB
/
scmail-gauche-0.9.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- scmail-1.3.orig/scbayes.in
+++ scmail-1.3/scbayes.in
@@ -16,6 +16,7 @@
(use gauche.parseopt)
(use gauche.parameter)
+(use gauche.version)
(use dbm)
(use dbm.gdbm) ;; should be customizable
(use util.digest)
@@ -130,12 +131,18 @@
(sys-rename (temporary-table-file) (table-file))
(sys-rename (temporary-digest-file) (digest-file)))))
-(define (lock)
- (unless (eq? (create-directory* (lock-file)) #t)
- (scmail-wformat "~a is now being updated" (table-file))
- (scmail-wformat "or perhaps ~a is staled." (lock-file))
- (scmail-eformat "(Please remove the lock file if it is staled.)"))
- )
+(if (version<? (gauche-version) "0.9")
+ (define (lock)
+ (unless (eq? (create-directory* (lock-file)) #t)
+ (scmail-wformat "~a is now being updated" (table-file))
+ (scmail-wformat "or perhaps ~a is staled." (lock-file))
+ (scmail-eformat "(Please remove the lock file if it is staled.)")))
+ (define (lock)
+ (guard (e (else
+ (scmail-wformat "~a is now being updated" (table-file))
+ (scmail-wformat "or perhaps ~a is staled." (lock-file))
+ (scmail-eformat "(Please remove the lock file if it is staled.)")))
+ (create-directory* (lock-file)))))
(define force-learn? (make-parameter #f))