Skip to content
Snippets Groups Projects
Commit a4a7cb9f authored by cshapiro's avatar cshapiro
Browse files

Make all ports use an accessor function to retrieve the value of

h_errno.  Like errno, it is left unspecified whether h_errno is a
macro or an identifier declared with external linkage.  Let the C
compiler sort this out for us.
parent 5c6f325d
No related branches found
No related tags found
No related merge requests found
......@@ -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.51 2006/03/17 02:56:45 rtoy Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/internet.lisp,v 1.52 2007/12/17 09:54:35 cshapiro Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -199,14 +199,7 @@ struct in_addr {
(len int)
(type int))
#+(and x86 linux)
(def-alien-routine get-h-errno c-call:int)
#-(and x86 linux)
(progn
(def-alien-variable "h_errno" c-call:int)
(defun get-h-errno ()
h-errno))
(def-alien-routine ("os_get_h_errno" get-h-errno) int)
(defun lookup-host-entry (host)
"Return a host-entry for the given host. The host may be an address
......
......@@ -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.35 2007/12/14 12:19:58 cshapiro Exp $
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.c,v 1.36 2007/12/17 09:54:35 cshapiro Exp $
*
*/
......@@ -40,7 +40,6 @@
#include <unistd.h>
#include <sys/resource.h>
#include <sys/wait.h>
#include <netdb.h>
#include <link.h>
#include <dlfcn.h>
#include <assert.h>
......@@ -382,12 +381,6 @@ os_dlsym(const char *sym_name, lispobj lib_list)
}
}
int
get_h_errno()
{
return h_errno;
}
void
restore_fpu(ucontext_t *context)
{
......
/*
$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/os-common.c,v 1.25 2007/12/10 21:14:16 rtoy Exp $
$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/os-common.c,v 1.26 2007/12/17 09:54:35 cshapiro Exp $
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University, and has been placed in the public domain.
......@@ -8,6 +8,7 @@
*/
#include <errno.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
......@@ -126,6 +127,12 @@ os_set_errno(int value)
return errno = value;
}
int
os_get_h_errno(void)
{
return h_errno;
}
#ifdef LINKAGE_TABLE
/* These declarations are lies. They actually take args, but are
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment