summaryrefslogtreecommitdiff
path: root/libc/misc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/pthread/weaks.c24
-rw-r--r--libc/misc/time/time.c8
-rw-r--r--libc/misc/wchar/wchar.c22
3 files changed, 27 insertions, 27 deletions
diff --git a/libc/misc/pthread/weaks.c b/libc/misc/pthread/weaks.c
index 89c26110c..b17b13143 100644
--- a/libc/misc/pthread/weaks.c
+++ b/libc/misc/pthread/weaks.c
@@ -24,6 +24,18 @@
static int __pthread_return_0 __P ((void));
static int __pthread_return_1 __P ((void));
+static int
+__pthread_return_0 (void)
+{
+ return 0;
+}
+
+static int
+__pthread_return_1 (void)
+{
+ return 1;
+}
+
/**********************************************************************/
/* Weaks for application/library use.
*
@@ -105,15 +117,3 @@ weak_alias (__pthread_return_0, __pthread_mutex_trylock)
weak_alias (__pthread_return_0, __pthread_mutex_unlock)
/**********************************************************************/
-
-static int
-__pthread_return_0 (void)
-{
- return 0;
-}
-
-static int
-__pthread_return_1 (void)
-{
- return 1;
-}
diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
index 57ef2217a..914277698 100644
--- a/libc/misc/time/time.c
+++ b/libc/misc/time/time.c
@@ -713,15 +713,15 @@ struct tm *__time_localtime_tzi(register const time_t *__restrict timer,
/**********************************************************************/
#ifdef L_mktime
-/* Another name for `mktime'. */
-/* time_t timelocal(struct tm *tp) */
-weak_alias(mktime,timelocal);
-
time_t mktime(struct tm *timeptr)
{
return _time_mktime(timeptr, 1);
}
+/* Another name for `mktime'. */
+/* time_t timelocal(struct tm *tp) */
+weak_alias(mktime,timelocal);
+
#endif
/**********************************************************************/
#ifdef L_timegm
diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c
index d1383c99f..e3553166d 100644
--- a/libc/misc/wchar/wchar.c
+++ b/libc/misc/wchar/wchar.c
@@ -261,9 +261,6 @@ int mbsinit(const mbstate_t *ps)
/**********************************************************************/
#ifdef L_mbrlen
-size_t mbrlen(const char *__restrict s, size_t n, mbstate_t *__restrict ps)
- __attribute__ ((__weak__, __alias__("__mbrlen")));
-
size_t __mbrlen(const char *__restrict s, size_t n, mbstate_t *__restrict ps)
{
static mbstate_t mbstate; /* Rely on bss 0-init. */
@@ -271,6 +268,9 @@ size_t __mbrlen(const char *__restrict s, size_t n, mbstate_t *__restrict ps)
return mbrtowc(NULL, s, n, (ps != NULL) ? ps : &mbstate);
}
+size_t mbrlen(const char *__restrict s, size_t n, mbstate_t *__restrict ps)
+ __attribute__ ((__weak__, __alias__("__mbrlen")));
+
#endif
/**********************************************************************/
#ifdef L_mbrtowc
@@ -679,10 +679,6 @@ size_t _wchar_wcsntoutf8s(char *__restrict s, size_t n,
/* WARNING: We treat len as SIZE_MAX when dst is NULL! */
-size_t mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src,
- size_t NMC, size_t len, mbstate_t *__restrict ps)
- __attribute__ ((__weak__, __alias__("__mbsnrtowcs")));
-
size_t __mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src,
size_t NMC, size_t len, mbstate_t *__restrict ps)
{
@@ -782,6 +778,10 @@ size_t __mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src,
return len - count;
}
+size_t mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src,
+ size_t NMC, size_t len, mbstate_t *__restrict ps)
+ __attribute__ ((__weak__, __alias__("__mbsnrtowcs")));
+
#endif
/**********************************************************************/
#ifdef L___wcsnrtombs
@@ -791,10 +791,6 @@ size_t __mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src,
/* Note: We completely ignore ps in all currently supported conversions.
* TODO: Check for valid state anyway? */
-size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src,
- size_t NWC, size_t len, mbstate_t *__restrict ps)
- __attribute__ ((__weak__, __alias__("__wcsnrtombs")));
-
size_t __wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src,
size_t NWC, size_t len, mbstate_t *__restrict ps)
{
@@ -904,6 +900,10 @@ size_t __wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src,
return len - count;
}
+size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src,
+ size_t NWC, size_t len, mbstate_t *__restrict ps)
+ __attribute__ ((__weak__, __alias__("__wcsnrtombs")));
+
#endif
/**********************************************************************/
#ifdef L_wcswidth