Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/include Add an explanation of how namespace.h works.
details: https://anonhg.NetBSD.org/src/rev/e969adda6873
branches: trunk
changeset: 356947:e969adda6873
user: christos <christos%NetBSD.org@localhost>
date: Sun Oct 22 00:20:50 2017 +0000
description:
Add an explanation of how namespace.h works.
diffstat:
lib/libc/include/namespace.h | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (26 lines):
diff -r 1c7621bcf49f -r e969adda6873 lib/libc/include/namespace.h
--- a/lib/libc/include/namespace.h Sat Oct 21 23:49:28 2017 +0000
+++ b/lib/libc/include/namespace.h Sun Oct 22 00:20:50 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: namespace.h,v 1.186 2017/02/08 17:30:27 maya Exp $ */
+/* $NetBSD: namespace.h,v 1.187 2017/10/22 00:20:50 christos Exp $ */
/*-
* Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
@@ -96,6 +96,16 @@
#define warnc _warnc
#define warnx _warnx
+/*
+ * namespace protection for libc functions that are used internally
+ * in libc and should be not overriden by applications. To do this,
+ * this header renames them to a name that starts with an "_" so that
+ * libc uses the "_" flavor internally (and this name is not part of
+ * the application namespace), and then a weak alias is added to the
+ * "_" name next to the function definition so that the function is
+ * exposed again.
+ */
+
#ifdef __weak_alias
#define MD2Data _MD2Data
#define MD2End _MD2End
Home |
Main Index |
Thread Index |
Old Index