diff options
| author | kamil <kamil@NetBSD.org> | 2018-01-05 20:01:31 +0000 |
|---|---|---|
| committer | kamil <kamil@NetBSD.org> | 2018-01-05 20:01:31 +0000 |
| commit | 8b786c31c9bcbc7c7332cdc42d3cfb24ef8883c4 (patch) | |
| tree | 285b17414b5cae54c4e1b3c7038157334c7f38b1 /lib/libc | |
| parent | 0b1b42c6af471873804d5dbeaaf08d3dc4b79c2d (diff) | |
Register new weak symbol in libc for internal usage: asctime
The NetBSD Standard C Library uses internally some of its functions with
a mangled symbol name, usually "_symbol". The internal functions shall not
use the global (public) symbols.
Add asctime to namespace.h.
Register a new __weak_alias() entry for asctime() in asctime.c.
acstime() is used internally in ctime and __ctime50. This revision switches
the internal usage to the internal symbol.
Sponsored by <The NetBSD Foundation>
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/include/namespace.h | 3 | ||||
| -rw-r--r-- | lib/libc/time/asctime.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/libc/include/namespace.h b/lib/libc/include/namespace.h index 0ab96e994f9..df5639e395a 100644 --- a/lib/libc/include/namespace.h +++ b/lib/libc/include/namespace.h @@ -1,4 +1,4 @@ -/* $NetBSD: namespace.h,v 1.191 2018/01/05 19:29:44 kamil Exp $ */ +/* $NetBSD: namespace.h,v 1.192 2018/01/05 20:01:31 kamil Exp $ */ /*- * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -211,6 +211,7 @@ #define arc4random_buf _arc4random_buf #define arc4random_stir _arc4random_stir #define arc4random_uniform _arc4random_uniform +#define asctime _asctime #define asctime_r _asctime_r #define asprintf _asprintf #define asprintf_l _asprintf_l diff --git a/lib/libc/time/asctime.c b/lib/libc/time/asctime.c index d75b1c930af..fe8950d2f32 100644 --- a/lib/libc/time/asctime.c +++ b/lib/libc/time/asctime.c @@ -1,4 +1,4 @@ -/* $NetBSD: asctime.c,v 1.22 2017/10/24 17:38:17 christos Exp $ */ +/* $NetBSD: asctime.c,v 1.23 2018/01/05 20:01:31 kamil Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -16,7 +16,7 @@ #if 0 static char elsieid[] = "@(#)asctime.c 8.5"; #else -__RCSID("$NetBSD: asctime.c,v 1.22 2017/10/24 17:38:17 christos Exp $"); +__RCSID("$NetBSD: asctime.c,v 1.23 2018/01/05 20:01:31 kamil Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -27,6 +27,7 @@ __RCSID("$NetBSD: asctime.c,v 1.22 2017/10/24 17:38:17 christos Exp $"); #include <stdio.h> #ifdef __weak_alias +__weak_alias(asctime,_asctime) __weak_alias(asctime_r,_asctime_r) #endif |
