From 9f883436e460186ed453728f21c10853cbeea3e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dvo=C5=99=C3=A1k?= Date: Mon, 21 Oct 2013 10:37:24 +0200 Subject: [PATCH] unix sockets: Linux is fine on any architecture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No need to limit ourselves to x86. Regardless of architecture, sun_path is always 108 bytes long on Linux. Signed-off-by: Jan Dvořák --- racket/collects/unstable/socket.rkt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/racket/collects/unstable/socket.rkt b/racket/collects/unstable/socket.rkt index e28e18dc66..00b4bccd6e 100644 --- a/racket/collects/unstable/socket.rkt +++ b/racket/collects/unstable/socket.rkt @@ -12,7 +12,7 @@ (let ([os (system-type 'os)] [machine (system-type 'machine)]) (cond [(eq? os 'macosx) 'macosx] - [(regexp-match #rx"Linux.*86" machine) 'linux86] ;; includes x86_64 + [(regexp-match #rx"^Linux" machine) 'linux] [else #f]))) #| @@ -30,7 +30,7 @@ macosx (64): (define _socklen_t (case platform - ((linux86) _uint) ;; in practice, _uint32 + ((linux) _uint) ;; in practice, _uint32 ((macosx) _uint32))) (define-cstruct _linux_sockaddr_un @@ -52,8 +52,8 @@ macosx (64): (_fun #:save-errno 'posix _int (case platform - ((linux86) _linux_sockaddr_un-pointer) - ((macosx) _macosx_sockaddr_un-pointer) + ((linux) _linux_sockaddr_un-pointer) + ((macosx) _macosx_sockaddr_un-pointer) (else _pointer)) ;; dummy type to avoid error _int -> _int)) @@ -66,7 +66,7 @@ macosx (64): ;; make-sockaddr : bytes -> (U _linux_sockaddr_un _macosx_sockaddr_un) (define (make-sockaddr path) (case platform - ((linux86) + ((linux) (make-linux_sockaddr_un AF_UNIX path)) ((macosx) (make-macosx_sockaddr_un (bytes-length path) AF_UNIX path)) @@ -74,7 +74,7 @@ macosx (64): (define strerror_r (get-ffi-obj (case platform - ((linux86) "__xpg_strerror_r") + ((linux) "__xpg_strerror_r") (else "strerror_r")) #f (_fun (errno) ::