Browse Source

For now, permit overriding of the malloc family, to make emacs happy

OPENBSD_5_9
guenther 9 years ago
parent
commit
ec1a04d68c
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      src/lib/libc/stdlib/malloc.c

+ 6
- 6
src/lib/libc/stdlib/malloc.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: malloc.c,v 1.175 2015/09/13 08:31:47 guenther Exp $ */
/* $OpenBSD: malloc.c,v 1.176 2015/09/13 20:29:23 guenther Exp $ */
/* /*
* Copyright (c) 2008, 2010, 2011 Otto Moerbeek <otto@drijf.net> * Copyright (c) 2008, 2010, 2011 Otto Moerbeek <otto@drijf.net>
* Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org>
@ -1187,7 +1187,7 @@ malloc(size_t size)
errno = saved_errno; errno = saved_errno;
return r; return r;
} }
DEF_STRONG(malloc);
/*DEF_STRONG(malloc);*/
static void static void
ofree(void *p) ofree(void *p)
@ -1291,7 +1291,7 @@ free(void *ptr)
_MALLOC_UNLOCK(); _MALLOC_UNLOCK();
errno = saved_errno; errno = saved_errno;
} }
DEF_STRONG(free);
/*DEF_STRONG(free);*/
static void * static void *
@ -1432,7 +1432,7 @@ realloc(void *ptr, size_t size)
errno = saved_errno; errno = saved_errno;
return r; return r;
} }
DEF_STRONG(realloc);
/*DEF_STRONG(realloc);*/
/* /*
@ -1480,7 +1480,7 @@ calloc(size_t nmemb, size_t size)
errno = saved_errno; errno = saved_errno;
return r; return r;
} }
DEF_STRONG(calloc);
/*DEF_STRONG(calloc);*/
static void * static void *
mapalign(struct dir_info *d, size_t alignment, size_t sz, int zero_fill) mapalign(struct dir_info *d, size_t alignment, size_t sz, int zero_fill)
@ -1614,7 +1614,7 @@ err:
errno = saved_errno; errno = saved_errno;
return res; return res;
} }
DEF_STRONG(posix_memalign);
/*DEF_STRONG(posix_memalign);*/
#ifdef MALLOC_STATS #ifdef MALLOC_STATS


Loading…
Cancel
Save