summaryrefslogtreecommitdiff
path: root/libc/misc/internals
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/internals')
-rw-r--r--libc/misc/internals/__errno_location.c9
-rw-r--r--libc/misc/internals/__h_errno_location.c2
-rw-r--r--libc/misc/internals/__uClibc_main.c18
3 files changed, 8 insertions, 21 deletions
diff --git a/libc/misc/internals/__errno_location.c b/libc/misc/internals/__errno_location.c
index aec7641ce..340950037 100644
--- a/libc/misc/internals/__errno_location.c
+++ b/libc/misc/internals/__errno_location.c
@@ -6,15 +6,8 @@
#include "internal_errno.h"
-/* psm: moved to bits/errno.h: */
-int *
-#ifndef __UCLIBC_HAS_THREADS__
-weak_const_function
-#endif
-__errno_location (void)
+int *__errno_location(void)
{
return &errno;
}
-#ifdef IS_IN_libc /* not really need, only to keep in sync w/ libc_hidden_proto */
libc_hidden_weak(__errno_location)
-#endif
diff --git a/libc/misc/internals/__h_errno_location.c b/libc/misc/internals/__h_errno_location.c
index 213d39894..113677682 100644
--- a/libc/misc/internals/__h_errno_location.c
+++ b/libc/misc/internals/__h_errno_location.c
@@ -6,7 +6,7 @@
#include "internal_errno.h"
-int * weak_const_function __h_errno_location (void)
+int *__h_errno_location(void)
{
return &h_errno;
}
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
index bda1bb8b4..9f7258d8a 100644
--- a/libc/misc/internals/__uClibc_main.c
+++ b/libc/misc/internals/__uClibc_main.c
@@ -15,9 +15,6 @@
*/
#include <features.h>
-#ifndef __UCLIBC_HAS_THREADS_NATIVE__
-#define _ERRNO_H
-#endif
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
@@ -25,13 +22,13 @@
#include <link.h>
#include <bits/uClibc_page.h>
#include <paths.h>
-#include <unistd.h>
-#include <asm/errno.h>
+#include <errno.h>
+#include <netdb.h>
+#include <stdio.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>
#ifdef __UCLIBC_HAS_THREADS_NATIVE__
-#include <errno.h>
#include <pthread-functions.h>
#include <not-cancel.h>
#include <atomic.h>
@@ -39,6 +36,9 @@
#ifdef __UCLIBC_HAS_THREADS__
#include <pthread.h>
#endif
+#ifdef __UCLIBC_HAS_LOCALE__
+#include <locale.h>
+#endif
#ifndef SHARED
void *__libc_stack_end = NULL;
@@ -116,12 +116,6 @@ static __always_inline int not_null_ptr(const void *p)
/*
* Prototypes.
*/
-extern int *weak_const_function __errno_location(void);
-extern int *weak_const_function __h_errno_location(void);
-extern void weak_function _stdio_init(void) attribute_hidden;
-#ifdef __UCLIBC_HAS_LOCALE__
-extern void weak_function _locale_init(void) attribute_hidden;
-#endif
#ifdef __UCLIBC_HAS_THREADS__
#if !defined (__UCLIBC_HAS_THREADS_NATIVE__) || defined (SHARED)
extern void weak_function __pthread_initialize_minimal(void);