Module Name:    src
Committed By:   martin
Date:           Mon Oct  2 17:38:23 UTC 2023

Modified Files:
        src/external/bsd/jemalloc/lib [netbsd-10]: Makefile jemalloc_stub.c

Log Message:
Pull up following revision(s) (requested by rin in ticket #391):

        external/bsd/jemalloc/lib/jemalloc_stub.c: revision 1.2
        external/bsd/jemalloc/lib/jemalloc_stub.c: revision 1.3
        external/bsd/jemalloc/lib/jemalloc_stub.c: revision 1.4
        external/bsd/jemalloc/lib/Makefile: revision 1.5

libjemalloc: Compile in empty jemalloc_stub.c for HAVE_JEMALLOC=100

Fix strange parallel build failures observed on vax and sun2, which
should be due to empty SRCS.

No functional changes as library itself.

jemalloc_stub.c: Provide stubs for HAVE_JEMALLOC > 100

Instead of HAVE_JEMALLOC != 100. Just for sure.

jemalloc_stub.c: Forgot to update comment. No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.3.12.1 -r1.3.12.2 src/external/bsd/jemalloc/lib/Makefile
cvs rdiff -u -r1.1 -r1.1.12.1 src/external/bsd/jemalloc/lib/jemalloc_stub.c

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

Modified files:

Index: src/external/bsd/jemalloc/lib/Makefile
diff -u src/external/bsd/jemalloc/lib/Makefile:1.3.12.1 src/external/bsd/jemalloc/lib/Makefile:1.3.12.2
--- src/external/bsd/jemalloc/lib/Makefile:1.3.12.1	Fri Jul 14 08:33:25 2023
+++ src/external/bsd/jemalloc/lib/Makefile	Mon Oct  2 17:38:23 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3.12.1 2023/07/14 08:33:25 martin Exp $
+# $NetBSD: Makefile,v 1.3.12.2 2023/10/02 17:38:23 martin Exp $
 
 WARNS?= 5
 .include <bsd.init.mk>
@@ -6,8 +6,7 @@ WARNS?= 5
 LIB=jemalloc
 
 # The symbols from the stub only exist in newer jemalloc.
-.if ${HAVE_JEMALLOC:U0} != 100
-SRCS=jemalloc_stub.c
-.endif
+CPPFLAGS+=	-DHAVE_JEMALLOC=${HAVE_JEMALLOC:U0}
+SRCS=		jemalloc_stub.c
 
 .include <bsd.lib.mk>

Index: src/external/bsd/jemalloc/lib/jemalloc_stub.c
diff -u src/external/bsd/jemalloc/lib/jemalloc_stub.c:1.1 src/external/bsd/jemalloc/lib/jemalloc_stub.c:1.1.12.1
--- src/external/bsd/jemalloc/lib/jemalloc_stub.c:1.1	Tue Mar 12 15:13:25 2019
+++ src/external/bsd/jemalloc/lib/jemalloc_stub.c	Mon Oct  2 17:38:23 2023
@@ -26,6 +26,8 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
+
+#if HAVE_JEMALLOC > 100
 #include <malloc.h>
 
 void *__je_mallocx(size_t, int);
@@ -139,3 +141,4 @@ void malloc_conf_set(const char *m)
 {
 	__je_malloc_conf_set(m);
 }
+#endif /* HAVE_JEMALLOC > 100 */

Reply via email to