Changeset 10636 for trunk/source/level-1
- Timestamp:
- Sep 8, 2008, 5:57:04 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/level-1/l1-streams.lisp
r10491 r10636 17 17 18 18 (in-package "CCL") 19 20 (eval-when (:compile-toplevel :execute)21 #+linuxppc-target22 (require "PPC-LINUX-SYSCALLS")23 #+linuxx8664-target24 (require "X8664-LINUX-SYSCALLS")25 #+darwinppc-target26 (require "DARWINPPC-SYSCALLS")27 #+darwinx8632-target28 (require "DARWINX8632-SYSCALLS")29 #+darwinx8664-target30 (require "DARWINX8664-SYSCALLS")31 #+freebsdx8664-target32 (require "X8664-FREEBSD-SYSCALLS")33 #+solarisx8664-target34 (require "X8664-SOLARIS-SYSCALLS"))35 36 19 ;;; 37 20 … … 3316 3299 3317 3300 (defun optimal-buffer-size (fd element-type) 3318 (let* ((nominal (or (nth-value 6 (%fstat fd)) *elements-per-buffer*)) 3319 (octets (case (%unix-fd-kind fd) 3301 #+windows-target (declare (ignore fd)) 3302 (let* ((nominal #-windows-target (or (nth-value 6 (%fstat fd)) *elements-per-buffer*)) 3303 (octets #+windows-target #$BUFSIZ 3304 #-windows-target 3305 (case (%unix-fd-kind fd) 3320 3306 (:pipe (#_fpathconf fd #$_PC_PIPE_BUF)) 3321 3307 (:socket … … 5274 5260 #-freebsd-target 5275 5261 (rlet ((arg (* :char) (%null-ptr))) 5276 (when (zerop ( syscall syscalls::ioctl fd #$FIONREAD arg))5262 (when (zerop (int-errno-call (#_ioctl fd #$FIONREAD :address arg))) 5277 5263 (let* ((avail (pref arg :long))) 5278 5264 (and (> avail 0) avail))))) … … 5314 5300 5315 5301 (defun process-input-would-block (fd) 5302 #+windows-target (declare (ignore fd)) 5303 #+windows-target t 5304 #-windows-target 5316 5305 (if (logtest #$O_NONBLOCK (the fixnum (fd-get-flags fd))) 5317 5306 (process-input-wait fd) … … 5346 5335 5347 5336 (defun process-output-would-block (fd) 5337 #+windows-target (declare (ignore fd)) 5338 #+windows-target t 5339 #-windows-target 5348 5340 (if (logtest #$O_NONBLOCK (the fixnum (fd-get-flags fd))) 5349 5341 (process-output-wait fd) … … 5389 5381 (setf (pref (paref pollfds (:* (:struct :pollfd)) 0) :pollfd.fd) fd 5390 5382 (pref (paref pollfds (:* (:struct :pollfd)) 0) :pollfd.events) #$POLLIN) 5391 (let* ((res ( syscall syscalls::poll pollfds 1 (or milliseconds -1))))5383 (let* ((res (int-errno-call (#_poll pollfds 1 (or milliseconds -1))))) 5392 5384 (declare (fixnum res)) 5393 5385 (values (> res 0) res)))) … … 5398 5390 (setf (pref (paref pollfds (:* (:struct :pollfd)) 0) :pollfd.fd) fd 5399 5391 (pref (paref pollfds (:* (:struct :pollfd)) 0) :pollfd.events) #$POLLOUT) 5400 (let* ((res ( syscall syscalls::poll pollfds 1 (or milliseconds -1))))5392 (let* ((res (int-errno-call (#_poll pollfds 1 (or milliseconds -1))))) 5401 5393 (declare (fixnum res)) 5402 5394 (values (> res 0) res))))
Note: See TracChangeset
for help on using the changeset viewer.