From 575eeceb5db3901dac61e565ddfbf95924fe857e Mon Sep 17 00:00:00 2001 From: kamil Date: Fri, 5 Jan 2018 19:01:36 +0000 Subject: [PATCH] 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 --- 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(-) diff --git a/lib/libc/gen/closefrom.c b/lib/libc/gen/closefrom.c index 4d84c0997c94..258e97d9dcb4 100644 --- a/lib/libc/gen/closefrom.c +++ b/lib/libc/gen/closefrom.c @@ -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 #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 #include diff --git a/lib/libc/gen/exect.c b/lib/libc/gen/exect.c index b81de620acde..92aa55f04d55 100644 --- a/lib/libc/gen/exect.c +++ b/lib/libc/gen/exect.c @@ -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 #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 __warn_references(exect, diff --git a/lib/libc/stdio/fopen.c b/lib/libc/stdio/fopen.c index 8e5327f7494d..4a95eaac4352 100644 --- a/lib/libc/stdio/fopen.c +++ b/lib/libc/stdio/fopen.c @@ -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 #include #include diff --git a/lib/libc/stdio/freopen.c b/lib/libc/stdio/freopen.c index ac3d2fbbcc5b..7104d8074333 100644 --- a/lib/libc/stdio/freopen.c +++ b/lib/libc/stdio/freopen.c @@ -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 #include