diff -u a/unix-sockets.meta b/unix-sockets.meta
a
|
b
|
|
3 | 3 | (files "unix-sockets.scm" "unix-sockets.release-info" "unix-sockets.meta" "unix-sockets.setup") |
4 | 4 | (synopsis "UNIX domain sockets") |
5 | 5 | (category net) |
6 | | (needs easyffi) |
| 6 | (needs easyffi pathname-expand) |
7 | 7 | (platform unix) |
8 | 8 | (license "BSD") |
9 | 9 | (doc-from-wiki) |
diff -u a/unix-sockets.scm b/unix-sockets.scm
a
|
b
|
|
47 | 47 | |
48 | 48 | ;; TODO: errno should be accessed using the proper API? |
49 | 49 | (import scheme (except chicken errno) easyffi foreign) |
50 | | (use ports posix) |
| 50 | (use ports posix pathname-expand) |
51 | 51 | |
52 | 52 | #> |
53 | 53 | #include <fcntl.h> |
… |
… |
|
161 | 161 | (make-property-condition 'unix 'errno errno) ) ) ) |
162 | 162 | |
163 | 163 | (define (unix-connect filename) |
164 | | (let ([n (##sys#pathname-resolution filename (lambda (f) (connect_to_server f)))]) |
| 164 | (let ([n (connect_to_server (pathname-expand filename))]) |
165 | 165 | (if (negative? n) |
166 | 166 | (unix-error 'unix-connect "can not connect" filename) |
167 | 167 | (io-ports 'unix-connect n) ) ) ) |
… |
… |
|
292 | 292 | (define (unix-listen filename #!optional (backlog 10)) |
293 | 293 | (when (file-exists? filename) |
294 | 294 | (delete-file filename) ) |
295 | | (let ([n (##sys#pathname-resolution filename (lambda (name) (create_socket name backlog)))]) |
| 295 | (let ([n (create_socket (pathname-expand filename) backlog)]) |
296 | 296 | (if (negative? n) |
297 | 297 | (unix-error 'unix-listen "can not create socket" filename) |
298 | 298 | (##sys#make-structure 'unix-listener n filename) ) ) ) |