Module Name:    src
Committed By:   kamil
Date:           Thu Jan  4 20:57:29 UTC 2018

Modified Files:
        src/common/lib/libc/sys: cpuset.c
        src/lib/libc/citrus: citrus_module.c
        src/lib/libc/compat-43: killpg.c
        src/lib/libc/db/db: dbfile.c
        src/lib/libc/gen: posix_spawnp.c signalnumber.c
        src/lib/libc/locale: generic_lc_all.c setlocale.c
        src/lib/libc/stdlib: reallocarray.c strtonum.c
        src/lib/libc/sys: sched.c
        src/lib/libc/time: getdate.c

Log Message:
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>


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/common/lib/libc/sys/cpuset.c
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/citrus/citrus_module.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/compat-43/killpg.c
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/db/db/dbfile.c
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/gen/posix_spawnp.c
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/gen/signalnumber.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/locale/generic_lc_all.c
cvs rdiff -u -r1.64 -r1.65 src/lib/libc/locale/setlocale.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/stdlib/reallocarray.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/stdlib/strtonum.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/sys/sched.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/time/getdate.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/common/lib/libc/sys/cpuset.c
diff -u src/common/lib/libc/sys/cpuset.c:1.18 src/common/lib/libc/sys/cpuset.c:1.19
--- src/common/lib/libc/sys/cpuset.c:1.18	Fri Mar  9 15:41:16 2012
+++ src/common/lib/libc/sys/cpuset.c	Thu Jan  4 20:57:28 2018
@@ -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

Index: src/lib/libc/citrus/citrus_module.c
diff -u src/lib/libc/citrus/citrus_module.c:1.12 src/lib/libc/citrus/citrus_module.c:1.13
--- src/lib/libc/citrus/citrus_module.c:1.12	Fri Aug 28 11:45:02 2015
+++ src/lib/libc/citrus/citrus_module.c	Thu Jan  4 20:57:28 2018
@@ -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>

Index: src/lib/libc/compat-43/killpg.c
diff -u src/lib/libc/compat-43/killpg.c:1.8 src/lib/libc/compat-43/killpg.c:1.9
--- src/lib/libc/compat-43/killpg.c:1.8	Thu Aug  7 16:42:39 2003
+++ src/lib/libc/compat-43/killpg.c	Thu Jan  4 20:57:28 2018
@@ -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>

Index: src/lib/libc/db/db/dbfile.c
diff -u src/lib/libc/db/db/dbfile.c:1.1 src/lib/libc/db/db/dbfile.c:1.2
--- src/lib/libc/db/db/dbfile.c:1.1	Sun Dec  1 00:22:48 2013
+++ src/lib/libc/db/db/dbfile.c	Thu Jan  4 20:57:29 2018
@@ -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>

Index: src/lib/libc/gen/posix_spawnp.c
diff -u src/lib/libc/gen/posix_spawnp.c:1.2 src/lib/libc/gen/posix_spawnp.c:1.3
--- src/lib/libc/gen/posix_spawnp.c:1.2	Wed Feb 22 17:51:01 2012
+++ src/lib/libc/gen/posix_spawnp.c	Thu Jan  4 20:57:29 2018
@@ -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 @@ int posix_spawnp(pid_t * __restrict pid,
 	 */
 	return posix_spawn(pid, fpath, fa, sa, cav, env);
 }
-

Index: src/lib/libc/gen/signalnumber.c
diff -u src/lib/libc/gen/signalnumber.c:1.1 src/lib/libc/gen/signalnumber.c:1.2
--- src/lib/libc/gen/signalnumber.c:1.1	Tue May  9 11:14:16 2017
+++ src/lib/libc/gen/signalnumber.c	Thu Jan  4 20:57:29 2018
@@ -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>
 

Index: src/lib/libc/locale/generic_lc_all.c
diff -u src/lib/libc/locale/generic_lc_all.c:1.5 src/lib/libc/locale/generic_lc_all.c:1.6
--- src/lib/libc/locale/generic_lc_all.c:1.5	Sun Apr 14 23:30:16 2013
+++ src/lib/libc/locale/generic_lc_all.c	Thu Jan  4 20:57:29 2018
@@ -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 @@ _generic_LC_ALL_setlocale(const char * _
 		return NULL;
 	return (const char *)&locale->query[0];
 }
-

Index: src/lib/libc/locale/setlocale.c
diff -u src/lib/libc/locale/setlocale.c:1.64 src/lib/libc/locale/setlocale.c:1.65
--- src/lib/libc/locale/setlocale.c:1.64	Fri Sep 13 13:13:32 2013
+++ src/lib/libc/locale/setlocale.c	Thu Jan  4 20:57:29 2018
@@ -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>

Index: src/lib/libc/stdlib/reallocarray.c
diff -u src/lib/libc/stdlib/reallocarray.c:1.9 src/lib/libc/stdlib/reallocarray.c:1.10
--- src/lib/libc/stdlib/reallocarray.c:1.9	Sat Oct  7 21:15:48 2017
+++ src/lib/libc/stdlib/reallocarray.c	Thu Jan  4 20:57:29 2018
@@ -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>

Index: src/lib/libc/stdlib/strtonum.c
diff -u src/lib/libc/stdlib/strtonum.c:1.4 src/lib/libc/stdlib/strtonum.c:1.5
--- src/lib/libc/stdlib/strtonum.c:1.4	Tue Mar 10 12:57:56 2015
+++ src/lib/libc/stdlib/strtonum.c	Thu Jan  4 20:57:29 2018
@@ -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>

Index: src/lib/libc/sys/sched.c
diff -u src/lib/libc/sys/sched.c:1.5 src/lib/libc/sys/sched.c:1.6
--- src/lib/libc/sys/sched.c:1.5	Sat Dec 16 18:31:36 2017
+++ src/lib/libc/sys/sched.c	Thu Jan  4 20:57:29 2018
@@ -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>

Index: src/lib/libc/time/getdate.c
diff -u src/lib/libc/time/getdate.c:1.3 src/lib/libc/time/getdate.c:1.4
--- src/lib/libc/time/getdate.c:1.3	Thu Sep 18 13:58:20 2014
+++ src/lib/libc/time/getdate.c	Thu Jan  4 20:57:29 2018
@@ -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>

Reply via email to