summaryrefslogtreecommitdiffstats
path: root/include/malloc.h
diff options
context:
space:
mode:
authorJuergen Beisert <jbe@pengutronix.de>2009-12-10 13:09:02 +0100
committerJuergen Beisert <jbe@pengutronix.de>2009-12-10 13:09:02 +0100
commita8abb313cdb403b8818691bdb317d0800bf196e8 (patch)
tree29cb7666ffacc62ceaf86b0ee8818fa414f5a82d /include/malloc.h
parentda29ff9e006a822b647ffe7cd0d5b11dd377fd3f (diff)
downloadbarebox-a8abb313cdb403b8818691bdb317d0800bf196e8.tar.gz
barebox-a8abb313cdb403b8818691bdb317d0800bf196e8.tar.xz
Remove unused code
Remove unused code to get a better understanding what really is happen in the source. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Diffstat (limited to 'include/malloc.h')
-rw-r--r--include/malloc.h99
1 files changed, 0 insertions, 99 deletions
diff --git a/include/malloc.h b/include/malloc.h
index 43977b7949..c7a71b6edf 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -316,32 +316,6 @@ extern "C" {
/*
- WIN32 causes an emulation of sbrk to be compiled in
- mmap-based options are not currently supported in WIN32.
-*/
-
-/* #define WIN32 */
-#ifdef WIN32
-#define MORECORE wsbrk
-#define HAVE_MMAP 0
-
-#define LACKS_UNISTD_H
-#define LACKS_SYS_PARAM_H
-
-/*
- Include 'windows.h' to get the necessary declarations for the
- Microsoft Visual C++ data structures and routines used in the 'sbrk'
- emulation.
-
- Define WIN32_LEAN_AND_MEAN so that only the essential Microsoft
- Visual C++ header files are included.
-*/
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#endif
-
-
-/*
HAVE_MEMCPY should be defined if you are not otherwise using
ANSI STD C, but still have memcpy and memset in your C library
and want to use them in calloc and realloc. Otherwise simple
@@ -355,14 +329,7 @@ extern "C" {
*/
#define HAVE_MEMCPY
-
-#ifndef USE_MEMCPY
-#ifdef HAVE_MEMCPY
#define USE_MEMCPY 1
-#else
-#define USE_MEMCPY 0
-#endif
-#endif
#if (__STD_C || defined(HAVE_MEMCPY))
@@ -370,15 +337,10 @@ extern "C" {
void* memset(void*, int, size_t);
void* memcpy(void*, const void*, size_t);
#else
-#ifdef WIN32
-/* On Win32 platforms, 'memset()' and 'memcpy()' are already declared in */
-/* 'windows.h' */
-#else
Void_t* memset();
Void_t* memcpy();
#endif
#endif
-#endif
#if USE_MEMCPY
@@ -502,59 +464,8 @@ do { \
bsd/gnu getpagesize.h
*/
-#define LACKS_UNISTD_H /* Shortcut for U-Boot */
#define malloc_getpagesize 4096
-#ifndef LACKS_UNISTD_H
-# include <unistd.h>
-#endif
-
-#ifndef malloc_getpagesize
-# ifdef _SC_PAGESIZE /* some SVR4 systems omit an underscore */
-# ifndef _SC_PAGE_SIZE
-# define _SC_PAGE_SIZE _SC_PAGESIZE
-# endif
-# endif
-# ifdef _SC_PAGE_SIZE
-# define malloc_getpagesize sysconf(_SC_PAGE_SIZE)
-# else
-# if defined(BSD) || defined(DGUX) || defined(HAVE_GETPAGESIZE)
- extern size_t getpagesize();
-# define malloc_getpagesize getpagesize()
-# else
-# ifdef WIN32
-# define malloc_getpagesize (4096) /* TBD: Use 'GetSystemInfo' instead */
-# else
-# ifndef LACKS_SYS_PARAM_H
-# include <sys/param.h>
-# endif
-# ifdef EXEC_PAGESIZE
-# define malloc_getpagesize EXEC_PAGESIZE
-# else
-# ifdef NBPG
-# ifndef CLSIZE
-# define malloc_getpagesize NBPG
-# else
-# define malloc_getpagesize (NBPG * CLSIZE)
-# endif
-# else
-# ifdef NBPC
-# define malloc_getpagesize NBPC
-# else
-# ifdef PAGESIZE
-# define malloc_getpagesize PAGESIZE
-# else
-# define malloc_getpagesize (4096) /* just guess */
-# endif
-# endif
-# endif
-# endif
-# endif
-# endif
-# endif
-#endif
-
-
/*
This version of malloc supports the standard SVID/XPG mallinfo
@@ -769,16 +680,6 @@ struct mallinfo {
/*
- USE_DL_PREFIX will prefix all public routines with the string 'dl'.
- Useful to quickly avoid procedure declaration conflicts and linker
- symbol conflicts with existing memory allocation routines.
-
-*/
-
-/* #define USE_DL_PREFIX */
-
-
-/*
Special defines for linux libc