aboutsummaryrefslogtreecommitdiff
path: root/libgloss
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2001-02-06 19:17:20 +0000
committerJeff Johnston <jjohnstn@redhat.com>2001-02-06 19:17:20 +0000
commitea8a3d42ab21f5184b89f8b2f2872bc73e0f0f02 (patch)
tree5d8f69867930ebad552c1d9848a2cb64cee5873b /libgloss
parentd7ed877ba3bf05bc13b7f90000d1d6e7a299c85d (diff)
downloadnewlib-ea8a3d42ab21f5184b89f8b2f2872bc73e0f0f02.zip
newlib-ea8a3d42ab21f5184b89f8b2f2872bc73e0f0f02.tar.gz
newlib-ea8a3d42ab21f5184b89f8b2f2872bc73e0f0f02.tar.bz2
2001-02-06 Will Cohen <wcohen@redhat.com>
* rs6000/sim-errno.c (__errno): Removed. (_cerror): Use re-entrant version of errno.
Diffstat (limited to 'libgloss')
-rw-r--r--libgloss/ChangeLog5
-rw-r--r--libgloss/rs6000/sim-errno.c11
2 files changed, 8 insertions, 8 deletions
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog
index 875e1d5..46eeaea 100644
--- a/libgloss/ChangeLog
+++ b/libgloss/ChangeLog
@@ -1,3 +1,8 @@
+2001-02-06 Will Cohen <wcohen@redhat.com>
+
+ * rs6000/sim-errno.c (__errno): Removed.
+ (_cerror): Use re-entrant version of errno.
+
2000-09-05 Geoff Keating <geoffk@cygnus.com>
* rs6000/simulator.S: Use conditional returns for documentation
diff --git a/libgloss/rs6000/sim-errno.c b/libgloss/rs6000/sim-errno.c
index 9a771b4..29cb4a2 100644
--- a/libgloss/rs6000/sim-errno.c
+++ b/libgloss/rs6000/sim-errno.c
@@ -14,13 +14,8 @@
* they apply.
*/
-int errno;
-
-int *
-__errno ()
-{
- return &errno;
-}
+#include <errno.h>
+#include <reent.h>
/* syscall handler branches here in case of error. */
@@ -28,6 +23,6 @@ int
_cerror (e)
int e;
{
- errno = e;
+ _REENT->_errno = e;
return -1;
}