+ 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:
parent
b2451a608d
commit
b30eed8d54
|
@ -207,7 +207,7 @@
|
||||||
family
|
family
|
||||||
(socket-address:address name)))))))
|
(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
|
;;; connect syscall
|
||||||
|
@ -246,7 +246,7 @@
|
||||||
(if (not (zero? val))
|
(if (not (zero? val))
|
||||||
(errno-error val "scheme_connect"))))
|
(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
|
;;; listen syscall
|
||||||
|
@ -285,7 +285,7 @@
|
||||||
(fdport-data (socket:inport sock))))
|
(fdport-data (socket:inport sock))))
|
||||||
(loop))))))))
|
(loop))))))))
|
||||||
|
|
||||||
(define-stubless-foreign %accept (sockfd family) "scheme_accept")
|
(import-os-error-syscall %accept (sockfd family) "scheme_accept")
|
||||||
|
|
||||||
|
|
||||||
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||||
|
@ -300,7 +300,7 @@
|
||||||
family)))
|
family)))
|
||||||
(make-socket-address family addr))))
|
(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
|
;;; getsockname syscall
|
||||||
|
@ -313,7 +313,7 @@
|
||||||
(addr (%socket-name (socket->fdes sock) family)))
|
(addr (%socket-name (socket->fdes sock) family)))
|
||||||
(make-socket-address family addr))))
|
(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
|
;;; shutdown syscall
|
||||||
|
@ -344,7 +344,7 @@
|
||||||
(make-socket protocol-family/unix in2 out2))))
|
(make-socket protocol-family/unix in2 out2))))
|
||||||
(%socket-pair type))))
|
(%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))))
|
(fdport-data (socket:inport socket))))
|
||||||
(loop))))))
|
(loop))))))
|
||||||
|
|
||||||
(define-stubless-foreign %recv-substring! (sockfd flags buf start end)
|
(import-os-error-syscall %recv-substring! (sockfd flags buf start end)
|
||||||
"recv_substring")
|
"recv_substring")
|
||||||
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||||
;;; send syscall
|
;;; send syscall
|
||||||
|
@ -536,7 +536,7 @@
|
||||||
(fdport-data (socket:inport socket))))
|
(fdport-data (socket:inport socket))))
|
||||||
(loop)))))
|
(loop)))))
|
||||||
|
|
||||||
(define-stubless-foreign
|
(import-os-error-syscall
|
||||||
%send-substring (sockfd flags buf start end family name)
|
%send-substring (sockfd flags buf start end family name)
|
||||||
"send_substring")
|
"send_substring")
|
||||||
|
|
||||||
|
@ -567,14 +567,14 @@
|
||||||
(else
|
(else
|
||||||
"socket-option: unknown option type ~s" option)))
|
"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)
|
;;; 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")
|
"scheme_getsockopt_linger")
|
||||||
|
|
||||||
;;; returns (list secs usecs)
|
;;; returns (list secs usecs)
|
||||||
(define-stubless-foreign %getsockopt-timeout (sockfd level optname)
|
(import-os-error-syscall %getsockopt-timeout (sockfd level optname)
|
||||||
"scheme_getsockopt_timeout")
|
"scheme_getsockopt_timeout")
|
||||||
|
|
||||||
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||||
|
@ -603,13 +603,13 @@
|
||||||
(else
|
(else
|
||||||
"set-socket-option: unknown option type")))
|
"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")
|
"scheme_setsockopt")
|
||||||
|
|
||||||
(define-stubless-foreign %setsockopt-linger
|
(import-os-error-syscall %setsockopt-linger
|
||||||
(sockfd level optname on-off time) "scheme_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")
|
(sockfd level optname secs usecs) "scheme_setsockopt_timeout")
|
||||||
|
|
||||||
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||||
|
@ -653,10 +653,10 @@
|
||||||
(let ((res (%host-address->host-info/h-errno
|
(let ((res (%host-address->host-info/h-errno
|
||||||
(socket-address:address name))))
|
(socket-address:address name))))
|
||||||
(if (number? res)
|
(if (number? res)
|
||||||
(error "address->host-info: non-zero herrno ~s ~s" res name)
|
(error "address->host-info: non-zero herrno" res name)
|
||||||
res))))
|
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")
|
"scheme_host_address2host_info")
|
||||||
|
|
||||||
(define (name->host-info name)
|
(define (name->host-info name)
|
||||||
|
@ -664,10 +664,10 @@
|
||||||
(error "name->host-info: string expected ~s" name)
|
(error "name->host-info: string expected ~s" name)
|
||||||
(let ((res (%host-name->host-info/h-errno name)))
|
(let ((res (%host-name->host-info/h-errno name)))
|
||||||
(if (number? res)
|
(if (number? res)
|
||||||
(error "name->host-info: non-zero herrno ~s ~s" res name)
|
(error "name->host-info: non-zero herrno" res name)
|
||||||
res))))
|
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")
|
"scheme_host_name2host_info")
|
||||||
|
|
||||||
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||||
|
@ -691,7 +691,7 @@
|
||||||
(error "address->network-info: integer expected ~s" addr)
|
(error "address->network-info: integer expected ~s" addr)
|
||||||
(%net-address->network-info 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")
|
"scheme_net_address2net_info")
|
||||||
|
|
||||||
(define (name->network-info name)
|
(define (name->network-info name)
|
||||||
|
@ -699,7 +699,7 @@
|
||||||
(error "name->network-info: string expected ~s" name)
|
(error "name->network-info: string expected ~s" name)
|
||||||
(%net-name->network-info 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")
|
"scheme_net_name2net_info")
|
||||||
|
|
||||||
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||||
|
@ -730,7 +730,7 @@
|
||||||
#f
|
#f
|
||||||
proto))))))
|
proto))))))
|
||||||
|
|
||||||
(define-stubless-foreign %service-port->service-info (port proto)
|
(import-lambda-definition %service-port->service-info (port proto)
|
||||||
"scheme_serv_port2serv_info")
|
"scheme_serv_port2serv_info")
|
||||||
|
|
||||||
(define (name->service-info name . maybe-proto)
|
(define (name->service-info name . maybe-proto)
|
||||||
|
@ -744,7 +744,7 @@
|
||||||
#f
|
#f
|
||||||
proto))))))
|
proto))))))
|
||||||
|
|
||||||
(define-stubless-foreign %service-name->service-info (name proto)
|
(import-lambda-definition %service-name->service-info (name proto)
|
||||||
"scheme_serv_name2serv_info")
|
"scheme_serv_name2serv_info")
|
||||||
|
|
||||||
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||||
|
@ -767,7 +767,7 @@
|
||||||
(error "number->protocol-info: integer expected ~s" name)
|
(error "number->protocol-info: integer expected ~s" name)
|
||||||
(%protocol-port->protocol-info 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")
|
"scheme_proto_num2proto_info")
|
||||||
|
|
||||||
(define (name->protocol-info name)
|
(define (name->protocol-info name)
|
||||||
|
@ -775,6 +775,6 @@
|
||||||
(error "name->protocol-info: string expected ~s" name)
|
(error "name->protocol-info: string expected ~s" name)
|
||||||
(%protocol-name->protocol-info 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")
|
"scheme_proto_name2proto_info")
|
||||||
|
|
||||||
|
|
|
@ -144,11 +144,9 @@
|
||||||
defenum-package
|
defenum-package
|
||||||
external-calls ;JMG new FFI
|
external-calls ;JMG new FFI
|
||||||
structure-refs
|
structure-refs
|
||||||
cig-aux
|
|
||||||
receiving
|
receiving
|
||||||
defrec-package
|
defrec-package
|
||||||
define-record-types
|
define-record-types
|
||||||
define-foreign-syntax
|
|
||||||
formats
|
formats
|
||||||
os-dependent ; OS dependent stuff
|
os-dependent ; OS dependent stuff
|
||||||
buffered-io-flags ; stdio dependent
|
buffered-io-flags ; stdio dependent
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
;;; Map a Unix async signal to its S48 interrupt value.
|
;;; Map a Unix async signal to its S48 interrupt value.
|
||||||
;;; -1 => Not defined.
|
;;; -1 => Not defined.
|
||||||
(define-stubless-foreign %signal->interrupt (sig) "sig2interrupt")
|
(import-lambda-definition %signal->interrupt (sig) "sig2interrupt")
|
||||||
|
|
||||||
(define (signal->interrupt sig)
|
(define (signal->interrupt sig)
|
||||||
(let ((int (%signal->interrupt sig)))
|
(let ((int (%signal->interrupt sig)))
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
;;; to our waiting parent proc correctly reflects how we died, and also
|
;;; to our waiting parent proc correctly reflects how we died, and also
|
||||||
;;; makes the core dump happen if it should. Details, details.
|
;;; 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
|
(define default-int-handler-vec
|
||||||
;; Non-Unix-signal interrupts just get their default values from
|
;; Non-Unix-signal interrupts just get their default values from
|
||||||
|
|
Loading…
Reference in New Issue