Module Name: src
Committed By: kamil
Date: Fri Jan 5 19:01:36 UTC 2018
Modified Files:
src/lib/libc/gen: closefrom.c exect.c
src/lib/libc/stdio: fopen.c freopen.c
Log Message:
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>
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/gen/closefrom.c
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/gen/exect.c
cvs rdiff -u -r1.17 -r1.18 src/lib/libc/stdio/fopen.c
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/stdio/freopen.c
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/gen/closefrom.c
diff -u src/lib/libc/gen/closefrom.c:1.2 src/lib/libc/gen/closefrom.c:1.3
--- src/lib/libc/gen/closefrom.c:1.2 Tue Jun 22 13:49:43 2004
+++ src/lib/libc/gen/closefrom.c Fri Jan 5 19:01:36 2018
@@ -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>
Index: src/lib/libc/gen/exect.c
diff -u src/lib/libc/gen/exect.c:1.1 src/lib/libc/gen/exect.c:1.2
--- src/lib/libc/gen/exect.c:1.1 Tue Feb 7 19:29:40 2017
+++ src/lib/libc/gen/exect.c Fri Jan 5 19:01:36 2018
@@ -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,
Index: src/lib/libc/stdio/fopen.c
diff -u src/lib/libc/stdio/fopen.c:1.17 src/lib/libc/stdio/fopen.c:1.18
--- src/lib/libc/stdio/fopen.c:1.17 Thu Nov 9 20:30:02 2017
+++ src/lib/libc/stdio/fopen.c Fri Jan 5 19:01:36 2018
@@ -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>
Index: src/lib/libc/stdio/freopen.c
diff -u src/lib/libc/stdio/freopen.c:1.20 src/lib/libc/stdio/freopen.c:1.21
--- src/lib/libc/stdio/freopen.c:1.20 Thu Nov 9 20:30:02 2017
+++ src/lib/libc/stdio/freopen.c Fri Jan 5 19:01:36 2018
@@ -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>