Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc Clarify the explanation of the compat_time.c defini...
details: https://anonhg.NetBSD.org/src/rev/a4a1bc874714
branches: trunk
changeset: 350453:a4a1bc874714
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Jan 12 00:38:25 2017 +0000
description:
Clarify the explanation of the compat_time.c definition of time.
diffstat:
lib/libc/README | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r 8a75a9720695 -r a4a1bc874714 lib/libc/README
--- a/lib/libc/README Thu Jan 12 00:38:01 2017 +0000
+++ b/lib/libc/README Thu Jan 12 00:38:25 2017 +0000
@@ -1,4 +1,4 @@
- $NetBSD: README,v 1.5 2015/07/11 15:23:57 riastradh Exp $
+ $NetBSD: README,v 1.6 2017/01/12 00:38:25 riastradh Exp $
libc: The C library.
@@ -217,14 +217,17 @@
Then compat_time.c defines `time' normally:
- time_t
- time(time_t *t)
+ int32_t
+ time(int32_t *t)
{
...
Again, macro expansion replaces `time' by `_time', but since there
is no __RENAME directive in <compat/include/time.h>, the resulting
- ELF global symbol is `_time'.
+ ELF global symbol is `_time'. (Actually, compat_time.c just has
+ `#define time_t int32_t' and `#include "gen/time.c"' to get the same
+ text of the definition of time. The above definition is what we get
+ effectively by substituting int32_t for the type time_t.)
Finally, alongside the definition in compat_time.c is
Home |
Main Index |
Thread Index |
Old Index