mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 01:24:49 +01:00
musl: remove macro redefinitions of malloc
This commit is contained in:
parent
6ccabbd4e5
commit
e2fccd8dd5
13 changed files with 0 additions and 66 deletions
5
lib/libc/musl/src/aio/aio.c
vendored
5
lib/libc/musl/src/aio/aio.c
vendored
|
|
@ -11,11 +11,6 @@
|
|||
#include "pthread_impl.h"
|
||||
#include "aio_impl.h"
|
||||
|
||||
#define malloc __libc_malloc
|
||||
#define calloc __libc_calloc
|
||||
#define realloc __libc_realloc
|
||||
#define free __libc_free
|
||||
|
||||
/* The following is a threads-based implementation of AIO with minimal
|
||||
* dependence on implementation details. Most synchronization is
|
||||
* performed with pthread primitives, but atomics and futex operations
|
||||
|
|
|
|||
5
lib/libc/musl/src/exit/atexit.c
vendored
5
lib/libc/musl/src/exit/atexit.c
vendored
|
|
@ -4,11 +4,6 @@
|
|||
#include "lock.h"
|
||||
#include "fork_impl.h"
|
||||
|
||||
#define malloc __libc_malloc
|
||||
#define calloc __libc_calloc
|
||||
#define realloc undef
|
||||
#define free undef
|
||||
|
||||
/* Ensure that at least 32 atexit handlers can be registered without malloc */
|
||||
#define COUNT 32
|
||||
|
||||
|
|
|
|||
6
lib/libc/musl/src/include/stdlib.h
vendored
6
lib/libc/musl/src/include/stdlib.h
vendored
|
|
@ -10,10 +10,4 @@ hidden int __ptsname_r(int, char *, size_t);
|
|||
hidden char *__randname(char *);
|
||||
hidden void __qsort_r (void *, size_t, size_t, int (*)(const void *, const void *, void *), void *);
|
||||
|
||||
hidden void *__libc_malloc(size_t);
|
||||
hidden void *__libc_malloc_impl(size_t);
|
||||
hidden void *__libc_calloc(size_t, size_t);
|
||||
hidden void *__libc_realloc(void *, size_t);
|
||||
hidden void __libc_free(void *);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
5
lib/libc/musl/src/ldso/dlerror.c
vendored
5
lib/libc/musl/src/ldso/dlerror.c
vendored
|
|
@ -5,11 +5,6 @@
|
|||
#include "dynlink.h"
|
||||
#include "atomic.h"
|
||||
|
||||
#define malloc __libc_malloc
|
||||
#define calloc __libc_calloc
|
||||
#define realloc __libc_realloc
|
||||
#define free __libc_free
|
||||
|
||||
char *dlerror()
|
||||
{
|
||||
pthread_t self = __pthread_self();
|
||||
|
|
|
|||
5
lib/libc/musl/src/locale/dcngettext.c
vendored
5
lib/libc/musl/src/locale/dcngettext.c
vendored
|
|
@ -12,11 +12,6 @@
|
|||
#include "lock.h"
|
||||
#include "fork_impl.h"
|
||||
|
||||
#define malloc __libc_malloc
|
||||
#define calloc __libc_calloc
|
||||
#define realloc undef
|
||||
#define free undef
|
||||
|
||||
struct binding {
|
||||
struct binding *next;
|
||||
int dirlen;
|
||||
|
|
|
|||
5
lib/libc/musl/src/locale/duplocale.c
vendored
5
lib/libc/musl/src/locale/duplocale.c
vendored
|
|
@ -3,11 +3,6 @@
|
|||
#include "locale_impl.h"
|
||||
#include "libc.h"
|
||||
|
||||
#define malloc __libc_malloc
|
||||
#define calloc undef
|
||||
#define realloc undef
|
||||
#define free undef
|
||||
|
||||
locale_t __duplocale(locale_t old)
|
||||
{
|
||||
locale_t new = malloc(sizeof *new);
|
||||
|
|
|
|||
5
lib/libc/musl/src/locale/freelocale.c
vendored
5
lib/libc/musl/src/locale/freelocale.c
vendored
|
|
@ -1,11 +1,6 @@
|
|||
#include <stdlib.h>
|
||||
#include "locale_impl.h"
|
||||
|
||||
#define malloc undef
|
||||
#define calloc undef
|
||||
#define realloc undef
|
||||
#define free __libc_free
|
||||
|
||||
void freelocale(locale_t l)
|
||||
{
|
||||
if (__loc_is_allocated(l)) free(l);
|
||||
|
|
|
|||
5
lib/libc/musl/src/locale/locale_map.c
vendored
5
lib/libc/musl/src/locale/locale_map.c
vendored
|
|
@ -7,11 +7,6 @@
|
|||
#include "lock.h"
|
||||
#include "fork_impl.h"
|
||||
|
||||
#define malloc __libc_malloc
|
||||
#define calloc undef
|
||||
#define realloc undef
|
||||
#define free undef
|
||||
|
||||
const char *__lctrans_impl(const char *msg, const struct __locale_map *lm)
|
||||
{
|
||||
const char *trans = 0;
|
||||
|
|
|
|||
5
lib/libc/musl/src/locale/newlocale.c
vendored
5
lib/libc/musl/src/locale/newlocale.c
vendored
|
|
@ -4,11 +4,6 @@
|
|||
#include "locale_impl.h"
|
||||
#include "lock.h"
|
||||
|
||||
#define malloc __libc_malloc
|
||||
#define calloc undef
|
||||
#define realloc undef
|
||||
#define free undef
|
||||
|
||||
static int default_locale_init_done;
|
||||
static struct __locale_struct default_locale, default_ctype_locale;
|
||||
|
||||
|
|
|
|||
5
lib/libc/musl/src/process/fdop.h
vendored
5
lib/libc/musl/src/process/fdop.h
vendored
|
|
@ -10,8 +10,3 @@ struct fdop {
|
|||
mode_t mode;
|
||||
char path[];
|
||||
};
|
||||
|
||||
#define malloc __libc_malloc
|
||||
#define calloc __libc_calloc
|
||||
#define realloc undef
|
||||
#define free __libc_free
|
||||
|
|
|
|||
5
lib/libc/musl/src/thread/pthread_atfork.c
vendored
5
lib/libc/musl/src/thread/pthread_atfork.c
vendored
|
|
@ -3,11 +3,6 @@
|
|||
#include "libc.h"
|
||||
#include "lock.h"
|
||||
|
||||
#define malloc __libc_malloc
|
||||
#define calloc undef
|
||||
#define realloc undef
|
||||
#define free undef
|
||||
|
||||
static struct atfork_funcs {
|
||||
void (*prepare)(void);
|
||||
void (*parent)(void);
|
||||
|
|
|
|||
5
lib/libc/musl/src/thread/sem_open.c
vendored
5
lib/libc/musl/src/thread/sem_open.c
vendored
|
|
@ -14,11 +14,6 @@
|
|||
#include "lock.h"
|
||||
#include "fork_impl.h"
|
||||
|
||||
#define malloc __libc_malloc
|
||||
#define calloc __libc_calloc
|
||||
#define realloc undef
|
||||
#define free undef
|
||||
|
||||
static struct {
|
||||
ino_t ino;
|
||||
sem_t *sem;
|
||||
|
|
|
|||
5
lib/libc/musl/src/time/__tz.c
vendored
5
lib/libc/musl/src/time/__tz.c
vendored
|
|
@ -9,11 +9,6 @@
|
|||
#include "lock.h"
|
||||
#include "fork_impl.h"
|
||||
|
||||
#define malloc __libc_malloc
|
||||
#define calloc undef
|
||||
#define realloc undef
|
||||
#define free undef
|
||||
|
||||
long __timezone = 0;
|
||||
int __daylight = 0;
|
||||
char *__tzname[2] = { 0, 0 };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue