[Midnightbsd-cvs] src [10555] trunk/lib/libc/stdlib: tag

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Jun 7 20:53:14 EDT 2018


Revision: 10555
          http://svnweb.midnightbsd.org/src/?rev=10555
Author:   laffer1
Date:     2018-06-07 20:53:13 -0400 (Thu, 07 Jun 2018)
Log Message:
-----------
tag

Modified Paths:
--------------
    trunk/lib/libc/stdlib/Makefile.inc
    trunk/lib/libc/stdlib/Symbol.map
    trunk/lib/libc/stdlib/_Exit.c
    trunk/lib/libc/stdlib/abs.3
    trunk/lib/libc/stdlib/abs.c
    trunk/lib/libc/stdlib/aligned_alloc.3
    trunk/lib/libc/stdlib/atexit.3
    trunk/lib/libc/stdlib/atexit.c
    trunk/lib/libc/stdlib/atexit.h
    trunk/lib/libc/stdlib/atof.3
    trunk/lib/libc/stdlib/atof.c
    trunk/lib/libc/stdlib/atoi.c

Property Changed:
----------------
    trunk/lib/libc/stdlib/Makefile.inc
    trunk/lib/libc/stdlib/Symbol.map
    trunk/lib/libc/stdlib/abs.3
    trunk/lib/libc/stdlib/atexit.3
    trunk/lib/libc/stdlib/atof.3

Modified: trunk/lib/libc/stdlib/Makefile.inc
===================================================================
--- trunk/lib/libc/stdlib/Makefile.inc	2018-06-08 00:45:53 UTC (rev 10554)
+++ trunk/lib/libc/stdlib/Makefile.inc	2018-06-08 00:53:13 UTC (rev 10555)
@@ -1,13 +1,16 @@
 #	from @(#)Makefile.inc	8.3 (Berkeley) 2/4/95
-# $FreeBSD$
+# $FreeBSD: stable/10/lib/libc/stdlib/Makefile.inc 312590 2017-01-21 12:30:07Z kib $
+# $MidnightBSD$
 
 # machine-independent stdlib sources
 .PATH: ${.CURDIR}/${LIBC_ARCH}/stdlib ${.CURDIR}/stdlib
 
 MISRCS+=_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \
-	bsearch.c div.c exit.c getenv.c getopt.c getopt_long.c \
+	bsearch.c \
+	cxa_thread_atexit.c cxa_thread_atexit_impl.c \
+	div.c exit.c getenv.c getopt.c getopt_long.c \
 	getsubopt.c hcreate.c heapsort.c imaxabs.c imaxdiv.c \
-	insque.c l64a.c labs.c ldiv.c llabs.c lldiv.c lsearch.c malloc.c \
+	insque.c l64a.c labs.c ldiv.c llabs.c lldiv.c lsearch.c \
 	merge.c ptsname.c qsort.c qsort_r.c quick_exit.c radixsort.c rand.c \
 	random.c reallocarray.c reallocf.c realpath.c remque.c strfmon.c strtoimax.c \
 	strtol.c strtoll.c strtoq.c strtoul.c strtonum.c strtoull.c \
@@ -18,18 +21,17 @@
 # machine-dependent stdlib sources
 .sinclude "${.CURDIR}/${LIBC_ARCH}/stdlib/Makefile.inc"
 
-MAN+=	a64l.3 abort.3 abs.3 aligned_alloc.3 alloca.3 atexit.3 atof.3 atoi.3 atol.3 \
-	at_quick_exit.3 bsearch.3 \
+MAN+=	a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 \
+	atoi.3 atol.3 at_quick_exit.3 bsearch.3 \
 	div.3 exit.3 getenv.3 getopt.3 getopt_long.3 getsubopt.3 \
 	hcreate.3 imaxabs.3 imaxdiv.3 insque.3 labs.3 ldiv.3 llabs.3 lldiv.3 \
-	lsearch.3 malloc.3 memory.3 posix_memalign.3 ptsname.3 qsort.3 \
+	lsearch.3 memory.3 ptsname.3 qsort.3 \
 	quick_exit.3 \
-	radixsort.3 rand.3 random.3 \
+	radixsort.3 rand.3 random.3 reallocf.3 \
 	realpath.3 strfmon.3 strtod.3 strtol.3 strtonum.3 strtoul.3 system.3 \
 	tsearch.3
 
 MLINKS+=a64l.3 l64a.3 a64l.3 l64a_r.3
-MLINKS+=aligned_alloc.3 posix_memalign.3
 MLINKS+=atol.3 atoll.3
 MLINKS+=exit.3 _Exit.3
 MLINKS+=getenv.3 putenv.3 getenv.3 setenv.3 getenv.3 unsetenv.3
@@ -48,11 +50,4 @@
 MLINKS+=strtod.3 strtof.3 strtod.3 strtold.3
 MLINKS+=strtol.3 strtoll.3 strtol.3 strtoq.3 strtol.3 strtoimax.3
 MLINKS+=strtoul.3 strtoull.3 strtoul.3 strtouq.3 strtoul.3 strtoumax.3
-MLINKS+=malloc.3 calloc.3 malloc.3 free.3 malloc.3 malloc.conf.5 \
-	malloc.3 realloc.3 malloc.3 reallocarray.3 malloc.3 reallocf.3 malloc.3 malloc_usable_size.3
 MLINKS+=tsearch.3 tdelete.3 tsearch.3 tfind.3 tsearch.3 twalk.3
-
-.if defined(MALLOC_PRODUCTION)
-CFLAGS+=	-DMALLOC_PRODUCTION
-.endif
-


Property changes on: trunk/lib/libc/stdlib/Makefile.inc
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/lib/libc/stdlib/Symbol.map
===================================================================
--- trunk/lib/libc/stdlib/Symbol.map	2018-06-08 00:45:53 UTC (rev 10554)
+++ trunk/lib/libc/stdlib/Symbol.map	2018-06-08 00:53:13 UTC (rev 10555)
@@ -47,14 +47,6 @@
 	lldiv;
 	lsearch;
 	lfind;
-	_malloc_options;
-	_malloc_message;
-	malloc;
-	posix_memalign;
-	calloc;
-	realloc;
-	free;
-	malloc_usable_size;
 	mergesort;
 	putenv;
 	qsort_r;
@@ -93,19 +85,18 @@
 };
 
 FBSD_1.3 {
-	aligned_alloc;
+	at_quick_exit;
 	atof_l;
 	atoi_l;
 	atol_l;
 	atoll_l;
-	at_quick_exit;
 	quick_exit;
 	strtod_l;
-	strtol_l;
-	strtoll_l;
 	strtof_l;
 	strtoimax_l;
+	strtol_l;
 	strtold_l;
+	strtoll_l;
 	strtoq_l;
 	strtoul_l;
 	strtoull_l;
@@ -113,6 +104,11 @@
 	strtouq_l;
 };
 
+FBSD_1.5 {
+	__cxa_thread_atexit;
+	__cxa_thread_atexit_impl;
+}
+
 MNBSD_1.1 {
 	clearenv;
 };
@@ -122,9 +118,8 @@
 };
 
 FBSDprivate_1.0 {
-	_malloc_thread_cleanup;
-	_malloc_prefork;
-	_malloc_postfork;
 	__system;
 	_system;
+	__libc_system;
+	__cxa_thread_call_dtors;
 };


Property changes on: trunk/lib/libc/stdlib/Symbol.map
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/lib/libc/stdlib/_Exit.c
===================================================================
--- trunk/lib/libc/stdlib/_Exit.c	2018-06-08 00:45:53 UTC (rev 10554)
+++ trunk/lib/libc/stdlib/_Exit.c	2018-06-08 00:53:13 UTC (rev 10555)
@@ -1,8 +1,9 @@
+/* $MidnightBSD$ */
 /*
  * This file is in the public domain.  Written by Garrett A. Wollman,
  * 2002-09-07.
  *
- * $FreeBSD$
+ * $FreeBSD: stable/10/lib/libc/stdlib/_Exit.c 103165 2002-09-10 02:04:49Z wollman $
  */
 
 #include <stdlib.h>

Modified: trunk/lib/libc/stdlib/abs.3
===================================================================
--- trunk/lib/libc/stdlib/abs.3	2018-06-08 00:45:53 UTC (rev 10554)
+++ trunk/lib/libc/stdlib/abs.3	2018-06-08 00:53:13 UTC (rev 10555)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\" Copyright (c) 1990, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -13,7 +14,7 @@
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"    notice, this list of conditions and the following disclaimer in the
 .\"    documentation and/or other materials provided with the distribution.
-.\" 4. Neither the name of the University nor the names of its contributors
+.\" 3. Neither the name of the University nor the names of its contributors
 .\"    may be used to endorse or promote products derived from this software
 .\"    without specific prior written permission.
 .\"
@@ -30,7 +31,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)abs.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD$
+.\" $FreeBSD: stable/10/lib/libc/stdlib/abs.3 251069 2013-05-28 20:57:40Z emaste $
 .\"
 .Dd November 14, 2001
 .Dt ABS 3


Property changes on: trunk/lib/libc/stdlib/abs.3
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/lib/libc/stdlib/abs.c
===================================================================
--- trunk/lib/libc/stdlib/abs.c	2018-06-08 00:45:53 UTC (rev 10554)
+++ trunk/lib/libc/stdlib/abs.c	2018-06-08 00:53:13 UTC (rev 10555)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -10,7 +11,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -31,7 +32,7 @@
 static char sccsid[] = "@(#)abs.c	8.1 (Berkeley) 6/4/93";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/lib/libc/stdlib/abs.c 251069 2013-05-28 20:57:40Z emaste $");
 
 #include <stdlib.h>
 

Modified: trunk/lib/libc/stdlib/aligned_alloc.3
===================================================================
--- trunk/lib/libc/stdlib/aligned_alloc.3	2018-06-08 00:45:53 UTC (rev 10554)
+++ trunk/lib/libc/stdlib/aligned_alloc.3	2018-06-08 00:53:13 UTC (rev 10555)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\" Copyright (C) 2006 Jason Evans <jasone at FreeBSD.org>.
 .\" All rights reserved.
 .\"

Modified: trunk/lib/libc/stdlib/atexit.3
===================================================================
--- trunk/lib/libc/stdlib/atexit.3	2018-06-08 00:45:53 UTC (rev 10554)
+++ trunk/lib/libc/stdlib/atexit.3	2018-06-08 00:53:13 UTC (rev 10555)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\" Copyright (c) 1990, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -13,7 +14,7 @@
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"    notice, this list of conditions and the following disclaimer in the
 .\"    documentation and/or other materials provided with the distribution.
-.\" 4. Neither the name of the University nor the names of its contributors
+.\" 3. Neither the name of the University nor the names of its contributors
 .\"    may be used to endorse or promote products derived from this software
 .\"    without specific prior written permission.
 .\"
@@ -30,7 +31,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)atexit.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD$
+.\" $FreeBSD: stable/10/lib/libc/stdlib/atexit.3 251069 2013-05-28 20:57:40Z emaste $
 .\"
 .Dd September 6, 2002
 .Dt ATEXIT 3


Property changes on: trunk/lib/libc/stdlib/atexit.3
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/lib/libc/stdlib/atexit.c
===================================================================
--- trunk/lib/libc/stdlib/atexit.c	2018-06-08 00:45:53 UTC (rev 10554)
+++ trunk/lib/libc/stdlib/atexit.c	2018-06-08 00:53:13 UTC (rev 10555)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -13,7 +14,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -34,7 +35,7 @@
 static char sccsid[] = "@(#)atexit.c	8.2 (Berkeley) 7/3/94";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/lib/libc/stdlib/atexit.c 259288 2013-12-13 05:54:30Z kib $");
 
 #include "namespace.h"
 #include <link.h>
@@ -151,6 +152,8 @@
 #pragma weak __pthread_cxa_finalize
 void __pthread_cxa_finalize(const struct dl_phdr_info *);
 
+static int global_exit;
+
 /*
  * Call all handlers registered with __cxa_atexit for the shared
  * object owning 'dso'.  Note: if 'dso' is NULL, then all remaining
@@ -164,10 +167,12 @@
 	struct atexit_fn fn;
 	int n, has_phdr;
 
-	if (dso != NULL)
+	if (dso != NULL) {
 		has_phdr = _rtld_addr_phdr(dso, &phdr_info);
-	else
+	} else {
 		has_phdr = 0;
+		global_exit = 1;
+	}
 
 	_MUTEX_LOCK(&atexit_mutex);
 	for (p = __atexit; p; p = p->next) {
@@ -177,8 +182,9 @@
 			fn = p->fns[n];
 			if (dso != NULL && dso != fn.fn_dso) {
 				/* wrong DSO ? */
-				if (!has_phdr || !__elf_phdr_match_addr(
-				    &phdr_info, fn.fn_ptr.cxa_func))
+				if (!has_phdr || global_exit ||
+				    !__elf_phdr_match_addr(&phdr_info,
+				    fn.fn_ptr.cxa_func))
 					continue;
 			}
 			/*
@@ -200,6 +206,6 @@
 	if (dso == NULL)
 		_MUTEX_DESTROY(&atexit_mutex);
 
-	if (has_phdr && &__pthread_cxa_finalize != NULL)
+	if (has_phdr && !global_exit && &__pthread_cxa_finalize != NULL)
 		__pthread_cxa_finalize(&phdr_info);
 }

Modified: trunk/lib/libc/stdlib/atexit.h
===================================================================
--- trunk/lib/libc/stdlib/atexit.h	2018-06-08 00:45:53 UTC (rev 10554)
+++ trunk/lib/libc/stdlib/atexit.h	2018-06-08 00:53:13 UTC (rev 10555)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -10,7 +11,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -27,7 +28,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)atexit.h	8.2 (Berkeley) 7/3/94
- * $FreeBSD$
+ * $FreeBSD: stable/10/lib/libc/stdlib/atexit.h 251069 2013-05-28 20:57:40Z emaste $
  */
 
 /* must be at least 32 to guarantee ANSI conformance */

Modified: trunk/lib/libc/stdlib/atof.3
===================================================================
--- trunk/lib/libc/stdlib/atof.3	2018-06-08 00:45:53 UTC (rev 10554)
+++ trunk/lib/libc/stdlib/atof.3	2018-06-08 00:53:13 UTC (rev 10555)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -13,7 +14,7 @@
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"    notice, this list of conditions and the following disclaimer in the
 .\"    documentation and/or other materials provided with the distribution.
-.\" 4. Neither the name of the University nor the names of its contributors
+.\" 3. Neither the name of the University nor the names of its contributors
 .\"    may be used to endorse or promote products derived from this software
 .\"    without specific prior written permission.
 .\"
@@ -30,7 +31,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)atof.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD$
+.\" $FreeBSD: stable/10/lib/libc/stdlib/atof.3 251069 2013-05-28 20:57:40Z emaste $
 .\"
 .Dd June 4, 1993
 .Dt ATOF 3


Property changes on: trunk/lib/libc/stdlib/atof.3
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/lib/libc/stdlib/atof.c
===================================================================
--- trunk/lib/libc/stdlib/atof.c	2018-06-08 00:45:53 UTC (rev 10554)
+++ trunk/lib/libc/stdlib/atof.c	2018-06-08 00:53:13 UTC (rev 10555)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1988, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -15,7 +16,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -36,7 +37,7 @@
 static char sccsid[] = "@(#)atof.c	8.1 (Berkeley) 6/4/93";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/lib/libc/stdlib/atof.c 251069 2013-05-28 20:57:40Z emaste $");
 
 #include <stdlib.h>
 #include <xlocale.h>

Modified: trunk/lib/libc/stdlib/atoi.c
===================================================================
--- trunk/lib/libc/stdlib/atoi.c	2018-06-08 00:45:53 UTC (rev 10554)
+++ trunk/lib/libc/stdlib/atoi.c	2018-06-08 00:53:13 UTC (rev 10555)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1988, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -15,7 +16,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -36,7 +37,7 @@
 static char sccsid[] = "@(#)atoi.c	8.1 (Berkeley) 6/4/93";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/lib/libc/stdlib/atoi.c 251069 2013-05-28 20:57:40Z emaste $");
 
 #include <stdlib.h>
 #include <xlocale.h>



More information about the Midnightbsd-cvs mailing list