move declaration of interfaces between malloc and ldso to dynlink.h
authorRich Felker <dalias@aerifal.cx>
Wed, 3 Jun 2020 01:38:25 +0000 (21:38 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 3 Jun 2020 01:38:25 +0000 (21:38 -0400)
this eliminates consumers of malloc_impl.h outside of the malloc
implementation.

ldso/dynlink.c
src/internal/dynlink.h
src/internal/malloc_impl.h

index 6468f20..f692691 100644 (file)
@@ -23,7 +23,6 @@
 #include "pthread_impl.h"
 #include "libc.h"
 #include "dynlink.h"
-#include "malloc_impl.h"
 
 static void error(const char *, ...);
 
index 764e3a1..b739add 100644 (file)
@@ -105,4 +105,7 @@ hidden void __dl_vseterr(const char *, va_list);
 
 hidden ptrdiff_t __tlsdesc_static(), __tlsdesc_dynamic();
 
+hidden extern int __malloc_replaced;
+hidden void __malloc_donate(char *, char *);
+
 #endif
index 59785a7..2c61b3f 100644 (file)
@@ -2,11 +2,10 @@
 #define MALLOC_IMPL_H
 
 #include <sys/mman.h>
+#include "dynlink.h"
 
 hidden void *__expand_heap(size_t *);
 
-hidden void __malloc_donate(char *, char *);
-
 hidden void *__memalign(size_t, size_t);
 
 struct chunk {
@@ -41,6 +40,4 @@ struct bin {
 
 hidden void __bin_chunk(struct chunk *);
 
-hidden extern int __malloc_replaced;
-
 #endif