aboutsummaryrefslogtreecommitdiff
path: root/module/glob.scm
diff options
context:
space:
mode:
authorHugo Hornquist <hugo@lysator.liu.se>2020-05-12 10:35:17 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-05-14 17:46:26 +0200
commitf4dab405a4648848aa3b5982f18172090b40d918 (patch)
tree3166eead1e2274359af7d2f3cdedc4dde45776c6 /module/glob.scm
parentserver /month/ round to start of month. (diff)
downloadcalp-f4dab405a4648848aa3b5982f18172090b40d918.tar.gz
calp-f4dab405a4648848aa3b5982f18172090b40d918.tar.xz
Glob, and the whole, now works on 32 bit systems.
Guile really needs to have better way to get the native width of a pointer. Creating a symbol from a sizeof is nothing but ugly.
Diffstat (limited to 'module/glob.scm')
-rw-r--r--module/glob.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/glob.scm b/module/glob.scm
index f460ea0b..dfa2a508 100644
--- a/module/glob.scm
+++ b/module/glob.scm
@@ -53,8 +53,8 @@
(unless (zero? globret)
(error "Globret errror ~a" globret))
(let* ((globstr (parse-c-struct (bytevector->pointer bv) (list size_t '* size_t)))
- ;; TODO the 'u64 requires that the system has 64 bit wide pointers...
- (strvec (pointer->bytevector (cadr globstr) (car globstr) 0 'u64))
+ (strvec (pointer->bytevector (cadr globstr) (car globstr) 0
+ (string->symbol (format #f "u~a" (* 8 (sizeof '*))))))
(ret (map (compose pointer->string make-pointer)
(bytevector->uint-list strvec (native-endianness) (sizeof '*)))))