Changeset 8613


Ignore:
Timestamp:
Feb 28, 2008, 12:14:20 AM (13 years ago)
Author:
wws
Message:

gb's fix to optimal-buffer-size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/level-1/l1-streams.lisp

    r8611 r8613  
    32833283
    32843284(defun optimal-buffer-size (fd element-type)
    3285   (let* ((octets (case (%unix-fd-kind fd)
     3285  (let* ((nominal (or (nth-value 6 (%fstat fd)) *elements-per-buffer*))
     3286         (octets (case (%unix-fd-kind fd)
    32863287                   (:pipe (#_fpathconf fd #$_PC_PIPE_BUF))
    3287                    (:socket (int-getsockopt fd #$SOL_SOCKET #$SO_SNDLOWAT))
     3288                   (:socket
     3289                    #+linux-target nominal
     3290                    #-linux-target
     3291                    (int-getsockopt fd #$SOL_SOCKET #$SO_SNDLOWAT))
    32883292                   ((:character-special :tty) (#_fpathconf fd #$_PC_MAX_INPUT))
    3289                    (t (or (nth-value 6 (%fstat fd)) *elements-per-buffer*)))))
     3293                   (t nominal))))
    32903294    (case (subtag-bytes (element-type-subtype element-type) 1)
    32913295      (1 octets)
Note: See TracChangeset for help on using the changeset viewer.