From 7575e738e30477e9356585af215b95f29a51be54 Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Fri, 17 Mar 2006 02:56:45 +0000 Subject: [PATCH] lisp/Linux-os.c: o Add function get_h_errno to extract h_errno. code/internet.lisp: o On Linux, call the get_h_errno function to get h_errno instead of calling __h_errno_location ourselves since that's not part of the public API. --- code/internet.lisp | 7 ++----- lisp/Linux-os.c | 8 +++++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/code/internet.lisp b/code/internet.lisp index 8b19236e7..7e5e585ca 100644 --- a/code/internet.lisp +++ b/code/internet.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/internet.lisp,v 1.50 2006/03/14 15:22:02 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/internet.lisp,v 1.51 2006/03/17 02:56:45 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -200,10 +200,7 @@ struct in_addr { (type int)) #+(and x86 linux) -(progn - (def-alien-routine ("__h_errno_location" h-errno-location) (* c-call:int)) - (defun get-h-errno () - (alien:deref (h-errno-location) 0))) +(def-alien-routine get-h-errno c-call:int) #-(and x86 linux) (progn diff --git a/lisp/Linux-os.c b/lisp/Linux-os.c index 88b8fabd8..9e5baa38f 100644 --- a/lisp/Linux-os.c +++ b/lisp/Linux-os.c @@ -15,7 +15,7 @@ * GENCGC support by Douglas Crosher, 1996, 1997. * Alpha support by Julian Dolby, 1999. * - * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.c,v 1.25 2005/09/15 18:26:50 rtoy Exp $ + * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.c,v 1.26 2006/03/17 02:56:45 rtoy Exp $ * */ @@ -449,3 +449,9 @@ os_dlsym(const char *sym_name, lispobj lib_list) return sym_addr; } } + +int +get_h_errno() +{ + return h_errno; +} -- GitLab