+ Replaced define-stubless-foreign by import-lambda-definition or

import-os-error-syscall
+ Removed loading of cig-aux and define-foreign
This commit is contained in:
mainzelm 2001-09-13 07:59:40 +00:00
parent b2451a608d
commit b30eed8d54
3 changed files with 26 additions and 28 deletions

View File

@ -207,7 +207,7 @@
family
(socket-address:address name)))))))
(define-stubless-foreign %bind (sockfd family name) "scheme_bind")
(import-os-error-syscall %bind (sockfd family name) "scheme_bind")
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
;;; connect syscall
@ -246,7 +246,7 @@
(if (not (zero? val))
(errno-error val "scheme_connect"))))
(define-stubless-foreign %connect (sockfd family name) "scheme_connect")
(import-os-error-syscall %connect (sockfd family name) "scheme_connect")
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
;;; listen syscall
@ -285,7 +285,7 @@
(fdport-data (socket:inport sock))))
(loop))))))))
(define-stubless-foreign %accept (sockfd family) "scheme_accept")
(import-os-error-syscall %accept (sockfd family) "scheme_accept")
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@ -300,7 +300,7 @@
family)))
(make-socket-address family addr))))
(define-stubless-foreign %peer-name (sockfd family) "scheme_peer_name")
(import-os-error-syscall %peer-name (sockfd family) "scheme_peer_name")
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
;;; getsockname syscall
@ -313,7 +313,7 @@
(addr (%socket-name (socket->fdes sock) family)))
(make-socket-address family addr))))
(define-stubless-foreign %socket-name (sockfd family) "scheme_socket_name")
(import-os-error-syscall %socket-name (sockfd family) "scheme_socket_name")
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
;;; shutdown syscall
@ -344,7 +344,7 @@
(make-socket protocol-family/unix in2 out2))))
(%socket-pair type))))
(define-stubless-foreign %socket-pair (type) "scheme_socket_pair")
(import-os-error-syscall %socket-pair (type) "scheme_socket_pair")
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@ -463,7 +463,7 @@
(fdport-data (socket:inport socket))))
(loop))))))
(define-stubless-foreign %recv-substring! (sockfd flags buf start end)
(import-os-error-syscall %recv-substring! (sockfd flags buf start end)
"recv_substring")
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
;;; send syscall
@ -536,7 +536,7 @@
(fdport-data (socket:inport socket))))
(loop)))))
(define-stubless-foreign
(import-os-error-syscall
%send-substring (sockfd flags buf start end family name)
"send_substring")
@ -567,14 +567,14 @@
(else
"socket-option: unknown option type ~s" option)))
(define-stubless-foreign %getsockopt (sock level option) "scheme_getsockopt")
(import-os-error-syscall %getsockopt (sock level option) "scheme_getsockopt")
;;; returns (list on-off linger)
(define-stubless-foreign %getsockopt-linger (sockfd level optname)
(import-os-error-syscall %getsockopt-linger (sockfd level optname)
"scheme_getsockopt_linger")
;;; returns (list secs usecs)
(define-stubless-foreign %getsockopt-timeout (sockfd level optname)
(import-os-error-syscall %getsockopt-timeout (sockfd level optname)
"scheme_getsockopt_timeout")
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@ -603,13 +603,13 @@
(else
"set-socket-option: unknown option type")))
(define-stubless-foreign %setsockopt (sockfd level optname optval)
(import-os-error-syscall %setsockopt (sockfd level optname optval)
"scheme_setsockopt")
(define-stubless-foreign %setsockopt-linger
(import-os-error-syscall %setsockopt-linger
(sockfd level optname on-off time) "scheme_setsockopt_linger")
(define-stubless-foreign %setsockopt-timeout
(import-os-error-syscall %setsockopt-timeout
(sockfd level optname secs usecs) "scheme_setsockopt_timeout")
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@ -653,10 +653,10 @@
(let ((res (%host-address->host-info/h-errno
(socket-address:address name))))
(if (number? res)
(error "address->host-info: non-zero herrno ~s ~s" res name)
(error "address->host-info: non-zero herrno" res name)
res))))
(define-stubless-foreign %host-address->host-info/h-errno (name)
(import-lambda-definition %host-address->host-info/h-errno (name)
"scheme_host_address2host_info")
(define (name->host-info name)
@ -664,10 +664,10 @@
(error "name->host-info: string expected ~s" name)
(let ((res (%host-name->host-info/h-errno name)))
(if (number? res)
(error "name->host-info: non-zero herrno ~s ~s" res name)
(error "name->host-info: non-zero herrno" res name)
res))))
(define-stubless-foreign %host-name->host-info/h-errno (name)
(import-lambda-definition %host-name->host-info/h-errno (name)
"scheme_host_name2host_info")
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@ -691,7 +691,7 @@
(error "address->network-info: integer expected ~s" addr)
(%net-address->network-info addr)))
(define-stubless-foreign %net-address->network-info (addr)
(import-lambda-definition %net-address->network-info (addr)
"scheme_net_address2net_info")
(define (name->network-info name)
@ -699,7 +699,7 @@
(error "name->network-info: string expected ~s" name)
(%net-name->network-info name)))
(define-stubless-foreign %net-name->network-info (name)
(import-lambda-definition %net-name->network-info (name)
"scheme_net_name2net_info")
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@ -730,7 +730,7 @@
#f
proto))))))
(define-stubless-foreign %service-port->service-info (port proto)
(import-lambda-definition %service-port->service-info (port proto)
"scheme_serv_port2serv_info")
(define (name->service-info name . maybe-proto)
@ -744,7 +744,7 @@
#f
proto))))))
(define-stubless-foreign %service-name->service-info (name proto)
(import-lambda-definition %service-name->service-info (name proto)
"scheme_serv_name2serv_info")
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@ -767,7 +767,7 @@
(error "number->protocol-info: integer expected ~s" name)
(%protocol-port->protocol-info name)))
(define-stubless-foreign %protocol-port->protocol-info (name)
(import-lambda-definition %protocol-port->protocol-info (name)
"scheme_proto_num2proto_info")
(define (name->protocol-info name)
@ -775,6 +775,6 @@
(error "name->protocol-info: string expected ~s" name)
(%protocol-name->protocol-info name)))
(define-stubless-foreign %protocol-name->protocol-info (name)
(import-lambda-definition %protocol-name->protocol-info (name)
"scheme_proto_name2proto_info")

View File

@ -144,11 +144,9 @@
defenum-package
external-calls ;JMG new FFI
structure-refs
cig-aux
receiving
defrec-package
define-record-types
define-foreign-syntax
formats
os-dependent ; OS dependent stuff
buffered-io-flags ; stdio dependent

View File

@ -32,7 +32,7 @@
;;; Map a Unix async signal to its S48 interrupt value.
;;; -1 => Not defined.
(define-stubless-foreign %signal->interrupt (sig) "sig2interrupt")
(import-lambda-definition %signal->interrupt (sig) "sig2interrupt")
(define (signal->interrupt sig)
(let ((int (%signal->interrupt sig)))
@ -123,7 +123,7 @@
;;; to our waiting parent proc correctly reflects how we died, and also
;;; makes the core dump happen if it should. Details, details.
(define-stubless-foreign %do-default-sigaction (signal) "do_default_sigaction")
(import-lambda-definition %do-default-sigaction (signal) "do_default_sigaction")
(define default-int-handler-vec
;; Non-Unix-signal interrupts just get their default values from