Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add bunch of missing includes of namespace.h in libc
details: https://anonhg.NetBSD.org/src/rev/ff118faa1ef5
branches: trunk
changeset: 358509:ff118faa1ef5
user: kamil <kamil%NetBSD.org@localhost>
date: Thu Jan 04 20:57:28 2018 +0000
description:
Add bunch of missing includes of namespace.h in libc
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 eliminates usage of the global changes of the following symbols:
- strlcat -> _strlcat
- sysconf -> __sysconf
- closedir -> _closedir
- fparseln -> _fparseln
- kill -> _kill
- mkstemp -> _mkstemp
- reallocarr -> _reallocarr
- strcasecmp -> _strcasecmp
- strncasecmp -> _strncasecmp
- strptime -> _strptime
- strtok_r -> _strtok_r
- sysctl -> _sysctl
- dlopen -> __dlopen
- dlclose -> __dlclose
- dlsym -> __dlsym
Sponsored by <The NetBSD Foundation>
diffstat:
common/lib/libc/sys/cpuset.c | 8 ++++++--
lib/libc/citrus/citrus_module.c | 6 ++++--
lib/libc/compat-43/killpg.c | 6 ++++--
lib/libc/db/db/dbfile.c | 6 ++++--
lib/libc/gen/posix_spawnp.c | 7 ++++---
lib/libc/gen/signalnumber.c | 4 +++-
lib/libc/locale/generic_lc_all.c | 6 +++---
lib/libc/locale/setlocale.c | 5 +++--
lib/libc/stdlib/reallocarray.c | 6 ++++--
lib/libc/stdlib/strtonum.c | 6 ++++--
lib/libc/sys/sched.c | 5 +++--
lib/libc/time/getdate.c | 4 +++-
12 files changed, 45 insertions(+), 24 deletions(-)
diffs (259 lines):
diff -r 3eb6e5078b4f -r ff118faa1ef5 common/lib/libc/sys/cpuset.c
--- a/common/lib/libc/sys/cpuset.c Thu Jan 04 20:38:30 2018 +0000
+++ b/common/lib/libc/sys/cpuset.c Thu Jan 04 20:57:28 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuset.c,v 1.18 2012/03/09 15:41:16 christos Exp $ */
+/* $NetBSD: cpuset.c,v 1.19 2018/01/04 20:57:28 kamil Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -32,9 +32,13 @@
#ifndef _STANDALONE
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: cpuset.c,v 1.18 2012/03/09 15:41:16 christos Exp $");
+__RCSID("$NetBSD: cpuset.c,v 1.19 2018/01/04 20:57:28 kamil Exp $");
#endif /* LIBC_SCCS and not lint */
+#ifdef _LIBC
+#include "namespace.h"
+#endif
+
#include <sys/param.h>
#include <sys/sched.h>
#ifdef _KERNEL
diff -r 3eb6e5078b4f -r ff118faa1ef5 lib/libc/citrus/citrus_module.c
--- a/lib/libc/citrus/citrus_module.c Thu Jan 04 20:38:30 2018 +0000
+++ b/lib/libc/citrus/citrus_module.c Thu Jan 04 20:57:28 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_module.c,v 1.12 2015/08/28 11:45:02 joerg Exp $ */
+/* $NetBSD: citrus_module.c,v 1.13 2018/01/04 20:57:28 kamil Exp $ */
/*-
* Copyright (c)1999, 2000, 2001, 2002 Citrus Project,
@@ -89,9 +89,11 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_module.c,v 1.12 2015/08/28 11:45:02 joerg Exp $");
+__RCSID("$NetBSD: citrus_module.c,v 1.13 2018/01/04 20:57:28 kamil Exp $");
#endif /* LIBC_SCCS and not lint */
+#include "namespace.h"
+
#include <assert.h>
#include <errno.h>
#include <limits.h>
diff -r 3eb6e5078b4f -r ff118faa1ef5 lib/libc/compat-43/killpg.c
--- a/lib/libc/compat-43/killpg.c Thu Jan 04 20:38:30 2018 +0000
+++ b/lib/libc/compat-43/killpg.c Thu Jan 04 20:57:28 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: killpg.c,v 1.8 2003/08/07 16:42:39 agc Exp $ */
+/* $NetBSD: killpg.c,v 1.9 2018/01/04 20:57:28 kamil Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -34,10 +34,12 @@
#if 0
static char sccsid[] = "@(#)killpg.c 8.1 (Berkeley) 6/2/93";
#else
-__RCSID("$NetBSD: killpg.c,v 1.8 2003/08/07 16:42:39 agc Exp $");
+__RCSID("$NetBSD: killpg.c,v 1.9 2018/01/04 20:57:28 kamil Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
+#include "namespace.h"
+
#include <sys/types.h>
#include <signal.h>
#include <errno.h>
diff -r 3eb6e5078b4f -r ff118faa1ef5 lib/libc/db/db/dbfile.c
--- a/lib/libc/db/db/dbfile.c Thu Jan 04 20:38:30 2018 +0000
+++ b/lib/libc/db/db/dbfile.c Thu Jan 04 20:57:28 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dbfile.c,v 1.1 2013/12/01 00:22:48 christos Exp $ */
+/* $NetBSD: dbfile.c,v 1.2 2018/01/04 20:57:29 kamil Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -31,7 +31,9 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: dbfile.c,v 1.1 2013/12/01 00:22:48 christos Exp $");
+__RCSID("$NetBSD: dbfile.c,v 1.2 2018/01/04 20:57:29 kamil Exp $");
+
+#include "namespace.h"
#include <sys/stat.h>
#include <stdio.h>
diff -r 3eb6e5078b4f -r ff118faa1ef5 lib/libc/gen/posix_spawnp.c
--- a/lib/libc/gen/posix_spawnp.c Thu Jan 04 20:38:30 2018 +0000
+++ b/lib/libc/gen/posix_spawnp.c Thu Jan 04 20:57:28 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: posix_spawnp.c,v 1.2 2012/02/22 17:51:01 martin Exp $ */
+/* $NetBSD: posix_spawnp.c,v 1.3 2018/01/04 20:57:29 kamil Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -31,9 +31,11 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: posix_spawnp.c,v 1.2 2012/02/22 17:51:01 martin Exp $");
+__RCSID("$NetBSD: posix_spawnp.c,v 1.3 2018/01/04 20:57:29 kamil Exp $");
#endif /* LIBC_SCCS and not lint */
+#include "namespace.h"
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -78,4 +80,3 @@
*/
return posix_spawn(pid, fpath, fa, sa, cav, env);
}
-
diff -r 3eb6e5078b4f -r ff118faa1ef5 lib/libc/gen/signalnumber.c
--- a/lib/libc/gen/signalnumber.c Thu Jan 04 20:38:30 2018 +0000
+++ b/lib/libc/gen/signalnumber.c Thu Jan 04 20:57:28 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: signalnumber.c,v 1.1 2017/05/09 11:14:16 kre Exp $ */
+/* $NetBSD: signalnumber.c,v 1.2 2018/01/04 20:57:29 kamil Exp $ */
/*
* Software available to all and sundry without limitations
@@ -17,6 +17,8 @@
* This licence must be retained with the software.
*/
+#include "namespace.h"
+
#include <signal.h>
#include <string.h>
diff -r 3eb6e5078b4f -r ff118faa1ef5 lib/libc/locale/generic_lc_all.c
--- a/lib/libc/locale/generic_lc_all.c Thu Jan 04 20:38:30 2018 +0000
+++ b/lib/libc/locale/generic_lc_all.c Thu Jan 04 20:57:28 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: generic_lc_all.c,v 1.5 2013/04/14 23:30:16 joerg Exp $ */
+/* $NetBSD: generic_lc_all.c,v 1.6 2018/01/04 20:57:29 kamil Exp $ */
/*-
* Copyright (c)2008 Citrus Project,
@@ -28,9 +28,10 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: generic_lc_all.c,v 1.5 2013/04/14 23:30:16 joerg Exp $");
+__RCSID("$NetBSD: generic_lc_all.c,v 1.6 2018/01/04 20:57:29 kamil Exp $");
#endif /* LIBC_SCCS and not lint */
+#include "namespace.h"
#include <sys/types.h>
#include <assert.h>
#include <langinfo.h>
@@ -114,4 +115,3 @@
return NULL;
return (const char *)&locale->query[0];
}
-
diff -r 3eb6e5078b4f -r ff118faa1ef5 lib/libc/locale/setlocale.c
--- a/lib/libc/locale/setlocale.c Thu Jan 04 20:38:30 2018 +0000
+++ b/lib/libc/locale/setlocale.c Thu Jan 04 20:57:28 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setlocale.c,v 1.64 2013/09/13 13:13:32 joerg Exp $ */
+/* $NetBSD: setlocale.c,v 1.65 2018/01/04 20:57:29 kamil Exp $ */
/*-
* Copyright (c)2008 Citrus Project,
@@ -28,9 +28,10 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: setlocale.c,v 1.64 2013/09/13 13:13:32 joerg Exp $");
+__RCSID("$NetBSD: setlocale.c,v 1.65 2018/01/04 20:57:29 kamil Exp $");
#endif /* LIBC_SCCS and not lint */
+#include "namespace.h"
#include <sys/types.h>
#include <sys/localedef.h>
#include <locale.h>
diff -r 3eb6e5078b4f -r ff118faa1ef5 lib/libc/stdlib/reallocarray.c
--- a/lib/libc/stdlib/reallocarray.c Thu Jan 04 20:38:30 2018 +0000
+++ b/lib/libc/stdlib/reallocarray.c Thu Jan 04 20:57:28 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: reallocarray.c,v 1.9 2017/10/07 21:15:48 christos Exp $ */
+/* $NetBSD: reallocarray.c,v 1.10 2018/01/04 20:57:29 kamil Exp $ */
/* $OpenBSD: reallocarray.c,v 1.1 2014/05/08 21:43:49 deraadt Exp $ */
/*-
@@ -31,7 +31,9 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: reallocarray.c,v 1.9 2017/10/07 21:15:48 christos Exp $");
+__RCSID("$NetBSD: reallocarray.c,v 1.10 2018/01/04 20:57:29 kamil Exp $");
+
+#include "namespace.h"
#define _OPENBSD_SOURCE
#include <errno.h>
diff -r 3eb6e5078b4f -r ff118faa1ef5 lib/libc/stdlib/strtonum.c
--- a/lib/libc/stdlib/strtonum.c Thu Jan 04 20:38:30 2018 +0000
+++ b/lib/libc/stdlib/strtonum.c Thu Jan 04 20:57:28 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: strtonum.c,v 1.4 2015/03/10 12:57:56 christos Exp $ */
+/* $NetBSD: strtonum.c,v 1.5 2018/01/04 20:57:29 kamil Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -29,7 +29,9 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: strtonum.c,v 1.4 2015/03/10 12:57:56 christos Exp $");
+__RCSID("$NetBSD: strtonum.c,v 1.5 2018/01/04 20:57:29 kamil Exp $");
+
+#include "namespace.h"
#define _OPENBSD_SOURCE
#include <stdio.h>
diff -r 3eb6e5078b4f -r ff118faa1ef5 lib/libc/sys/sched.c
--- a/lib/libc/sys/sched.c Thu Jan 04 20:38:30 2018 +0000
+++ b/lib/libc/sys/sched.c Thu Jan 04 20:57:28 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sched.c,v 1.5 2017/12/16 18:31:36 christos Exp $ */
+/* $NetBSD: sched.c,v 1.6 2018/01/04 20:57:29 kamil Exp $ */
/*
* Copyright (c) 2008, Mindaugas Rasiukevicius <rmind at NetBSD org>
@@ -27,8 +27,9 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: sched.c,v 1.5 2017/12/16 18:31:36 christos Exp $");
+__RCSID("$NetBSD: sched.c,v 1.6 2018/01/04 20:57:29 kamil Exp $");
+#include "namespace.h"
#include <string.h>
#include <unistd.h>
#include <errno.h>
diff -r 3eb6e5078b4f -r ff118faa1ef5 lib/libc/time/getdate.c
--- a/lib/libc/time/getdate.c Thu Jan 04 20:38:30 2018 +0000
+++ b/lib/libc/time/getdate.c Thu Jan 04 20:57:28 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getdate.c,v 1.3 2014/09/18 13:58:20 christos Exp $ */
+/* $NetBSD: getdate.c,v 1.4 2018/01/04 20:57:29 kamil Exp $ */
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -28,6 +28,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "namespace.h"
+
#include <sys/stat.h>
#include <errno.h>
Home |
Main Index |
Thread Index |
Old Index