summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/arm/crt0.S7
-rw-r--r--libc/sysdeps/linux/common/Makefile2
-rw-r--r--libc/sysdeps/linux/common/errno.c (renamed from libc/sysdeps/linux/m68k/errno.c)3
-rw-r--r--libc/sysdeps/linux/i386/crt0.S7
-rw-r--r--libc/sysdeps/linux/m68k/Makefile2
5 files changed, 4 insertions, 17 deletions
diff --git a/libc/sysdeps/linux/arm/crt0.S b/libc/sysdeps/linux/arm/crt0.S
index 3944bd34c..90478fa59 100644
--- a/libc/sysdeps/linux/arm/crt0.S
+++ b/libc/sysdeps/linux/arm/crt0.S
@@ -53,14 +53,9 @@ _start:
.data
.align 2
- .global __errno, __environ
+ .global __environ
__environ: .long 0
.weak environ
environ = __environ
-__errno: .long 0
-.weak errno
-errno = __errno
-
-
diff --git a/libc/sysdeps/linux/common/Makefile b/libc/sysdeps/linux/common/Makefile
index 3a66e4c2e..46fd22008 100644
--- a/libc/sysdeps/linux/common/Makefile
+++ b/libc/sysdeps/linux/common/Makefile
@@ -28,7 +28,7 @@ LIBC=$(TOPDIR)libc.a
CSRC =closedir.c dirfd.c getdents.c getdnnm.c gethstnm.c getpagesize.c \
isatty.c kernel_version.c mkfifo.c opendir.c readdir.c rewinddir.c \
seekdir.c setegid.c seteuid.c setpgrp.c statfix.c tell.c telldir.c \
- wait.c wait3.c _xmknod.c libc_init.c tcgetatr.c
+ wait.c wait3.c _xmknod.c libc_init.c errno.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
NISRC= _fxstat.c _lxstat.c _xstat.c
diff --git a/libc/sysdeps/linux/m68k/errno.c b/libc/sysdeps/linux/common/errno.c
index 7c46530d9..418fc933b 100644
--- a/libc/sysdeps/linux/m68k/errno.c
+++ b/libc/sysdeps/linux/common/errno.c
@@ -2,8 +2,7 @@
int errno = 0;
-int *
-__errno_location ( void )
+int * __errno_location ( void )
{
return &errno;
}
diff --git a/libc/sysdeps/linux/i386/crt0.S b/libc/sysdeps/linux/i386/crt0.S
index 08e406cc6..46d77e09d 100644
--- a/libc/sysdeps/linux/i386/crt0.S
+++ b/libc/sysdeps/linux/i386/crt0.S
@@ -24,7 +24,6 @@ Cambridge, MA 02139, USA. */
*/
.global __environ
-.global __errno
.global _start
.global exit
.global main
@@ -115,9 +114,3 @@ __environ:
.align 4
environ = __environ
-.data
-__errno:
- .long 0
-.weak errno
-.align 4
-errno = __errno
diff --git a/libc/sysdeps/linux/m68k/Makefile b/libc/sysdeps/linux/m68k/Makefile
index fd55d7944..12c659a07 100644
--- a/libc/sysdeps/linux/m68k/Makefile
+++ b/libc/sysdeps/linux/m68k/Makefile
@@ -33,7 +33,7 @@ CRT0_OBJ=$(patsubst %.S,%.o, $(CRT0))
SSRC=setjmp.S # longjmp.S _start.S clone.S
SOBJS=$(patsubst %.S,%.o, $(SSRC))
-CSRC=errno.c
+CSRC=#errno.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
OBJS=$(SOBJS) $(MOBJ) $(COBJS)