Module Name: src
Committed By: christos
Date: Sun Oct 22 00:20:50 UTC 2017
Modified Files:
src/lib/libc/include: namespace.h
Log Message:
Add an explanation of how namespace.h works.
To generate a diff of this commit:
cvs rdiff -u -r1.186 -r1.187 src/lib/libc/include/namespace.h
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.186 src/lib/libc/include/namespace.h:1.187
--- src/lib/libc/include/namespace.h:1.186 Wed Feb 8 12:30:27 2017
+++ src/lib/libc/include/namespace.h Sat Oct 21 20:20:50 2017
@@ -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