Module Name: src
Committed By: kamil
Date: Fri Jan 5 20:01:32 UTC 2018
Modified Files:
src/lib/libc/include: namespace.h
src/lib/libc/time: asctime.c
Log Message:
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>
To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 src/lib/libc/include/namespace.h
cvs rdiff -u -r1.22 -r1.23 src/lib/libc/time/asctime.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/include/namespace.h
diff -u src/lib/libc/include/namespace.h:1.191 src/lib/libc/include/namespace.h:1.192
--- src/lib/libc/include/namespace.h:1.191 Fri Jan 5 19:29:44 2018
+++ src/lib/libc/include/namespace.h Fri Jan 5 20:01:31 2018
@@ -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
Index: src/lib/libc/time/asctime.c
diff -u src/lib/libc/time/asctime.c:1.22 src/lib/libc/time/asctime.c:1.23
--- src/lib/libc/time/asctime.c:1.22 Tue Oct 24 17:38:17 2017
+++ src/lib/libc/time/asctime.c Fri Jan 5 20:01:31 2018
@@ -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/
#include <stdio.h>
#ifdef __weak_alias
+__weak_alias(asctime,_asctime)
__weak_alias(asctime_r,_asctime_r)
#endif