Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc Include namespace.h in a few of libc source files
details: https://anonhg.NetBSD.org/src/rev/01869fb7e0b0
branches: trunk
changeset: 828825:01869fb7e0b0
user: kamil <kamil%NetBSD.org@localhost>
date: Fri Jan 05 19:01:36 2018 +0000
description:
Include namespace.h in a few of libc source files
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.
This change finishes elimination of usage of the global name of the
following symbols:
- close -> _close
- execve -> _execve
- fcntl -> _fcntl
- setcontext -> _setcontext
- wait6 -> _wait6
- write -> _write
- writev -> _writev
Sponsored by <The NetBSD Foundation>
diffstat:
lib/libc/gen/closefrom.c | 5 +++--
lib/libc/gen/exect.c | 5 +++--
lib/libc/stdio/fopen.c | 5 +++--
lib/libc/stdio/freopen.c | 5 +++--
4 files changed, 12 insertions(+), 8 deletions(-)
diffs (86 lines):
diff -r 26f84ca8f534 -r 01869fb7e0b0 lib/libc/gen/closefrom.c
--- a/lib/libc/gen/closefrom.c Fri Jan 05 18:57:06 2018 +0000
+++ b/lib/libc/gen/closefrom.c Fri Jan 05 19:01:36 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: closefrom.c,v 1.2 2004/06/22 13:49:43 atatat Exp $ */
+/* $NetBSD: closefrom.c,v 1.3 2018/01/05 19:01:36 kamil Exp $ */
/*
* Copyright (C) 2004 WIDE Project.
@@ -31,9 +31,10 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: closefrom.c,v 1.2 2004/06/22 13:49:43 atatat Exp $");
+__RCSID("$NetBSD: closefrom.c,v 1.3 2018/01/05 19:01:36 kamil Exp $");
#endif /* LIBC_SCCS and not lint */
+#include "namespace.h"
#include <fcntl.h>
#include <unistd.h>
diff -r 26f84ca8f534 -r 01869fb7e0b0 lib/libc/gen/exect.c
--- a/lib/libc/gen/exect.c Fri Jan 05 18:57:06 2018 +0000
+++ b/lib/libc/gen/exect.c Fri Jan 05 19:01:36 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exect.c,v 1.1 2017/02/07 19:29:40 kamil Exp $ */
+/* $NetBSD: exect.c,v 1.2 2018/01/05 19:01:36 kamil Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -28,9 +28,10 @@
#include <sys/cdefs.h>
#if !defined(lint)
-__RCSID("$NetBSD: exect.c,v 1.1 2017/02/07 19:29:40 kamil Exp $");
+__RCSID("$NetBSD: exect.c,v 1.2 2018/01/05 19:01:36 kamil Exp $");
#endif
+#include "namespace.h"
#include <unistd.h>
__warn_references(exect,
diff -r 26f84ca8f534 -r 01869fb7e0b0 lib/libc/stdio/fopen.c
--- a/lib/libc/stdio/fopen.c Fri Jan 05 18:57:06 2018 +0000
+++ b/lib/libc/stdio/fopen.c Fri Jan 05 19:01:36 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fopen.c,v 1.17 2017/11/09 20:30:02 christos Exp $ */
+/* $NetBSD: fopen.c,v 1.18 2018/01/05 19:01:36 kamil Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -37,10 +37,11 @@
#if 0
static char sccsid[] = "@(#)fopen.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: fopen.c,v 1.17 2017/11/09 20:30:02 christos Exp $");
+__RCSID("$NetBSD: fopen.c,v 1.18 2018/01/05 19:01:36 kamil Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
+#include "namespace.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
diff -r 26f84ca8f534 -r 01869fb7e0b0 lib/libc/stdio/freopen.c
--- a/lib/libc/stdio/freopen.c Fri Jan 05 18:57:06 2018 +0000
+++ b/lib/libc/stdio/freopen.c Fri Jan 05 19:01:36 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: freopen.c,v 1.20 2017/11/09 20:30:02 christos Exp $ */
+/* $NetBSD: freopen.c,v 1.21 2018/01/05 19:01:36 kamil Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -37,10 +37,11 @@
#if 0
static char sccsid[] = "@(#)freopen.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: freopen.c,v 1.20 2017/11/09 20:30:02 christos Exp $");
+__RCSID("$NetBSD: freopen.c,v 1.21 2018/01/05 19:01:36 kamil Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
+#include "namespace.h"
#include <sys/types.h>
#include <sys/stat.h>
Home |
Main Index |
Thread Index |
Old Index