Ignore:
Timestamp:
01/06/10 12:43:59 (12 years ago)
Author:
Alaric Snell-Pym
Message:

Made Ugarit compile with chicken 4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/ugarit/trunk/posixextras.scm

    r15242 r16950  
    8585   
    8686 
    87 (define-foreign-variable _seek_set int "SEEK_SET")
    88 (define-foreign-variable _seek_cur int "SEEK_CUR")
    89 (define-foreign-variable _seek_end int "SEEK_END")
     87;; (define-foreign-variable _seek_set int "SEEK_SET")
     88;; (define-foreign-variable _seek_cur int "SEEK_CUR")
     89;; (define-foreign-variable _seek_end int "SEEK_END")
    9090 
    91 (define set-file-position!
    92    (lambda (port pos . whence)
    93      (let ([whence (if (pair? whence) (car whence) _seek_set)])
    94        (##sys#check-exact pos 'set-file-position!)
    95        (##sys#check-exact whence 'set-file-position!)
    96        (when (fx< pos 0) (##sys#signal-hook #:bounds-error 'set-file-position! "invalid negative port position" pos port))
    97        (unless (cond [(port? port)
    98      (and (eq? (##sys#slot port 7) 'stream)
    99        (##core#inline "C_fseek" port pos whence) ) ]
    100      [(fixnum? port) (##core#inline "C_lseek" port pos whence)]
    101      [else (##sys#signal-hook #:type-error 'set-file-position! "invalid file" port)] )
    102    (posix-error #:file-error 'set-file-position! "cannot set file position" port pos) ) ) ) )
     91;; (define set-file-position!
     92;;    (lambda (port pos . whence)
     93;;      (let ([whence (if (pair? whence) (car whence) _seek_set)])
     94;;        (##sys#check-exact pos 'set-file-position!)
     95;;        (##sys#check-exact whence 'set-file-position!)
     96;;        (when (fx< pos 0) (##sys#signal-hook #:bounds-error 'set-file-position! "invalid negative port position" pos port))
     97;;        (unless (cond [(port? port)
     98;;      (and (eq? (##sys#slot port 7) 'stream)
     99;;        (##core#inline "C_fseek" port pos whence) ) ]
     100;;      [(fixnum? port) (##core#inline "C_lseek" port pos whence)]
     101;;      [else (##sys#signal-hook #:type-error 'set-file-position! "invalid file" port)] )
     102;;    (posix-error #:file-error 'set-file-position! "cannot set file position" port pos) ) ) ) )
    103103
Note: See TracChangeset for help on using the changeset viewer.