vaseboot/VasEBoot-core/lib/posix_wrap/stdlib.h

56 lines
1.3 KiB
C

/*
* VasEBoot -- GRand Unified Bootloader
* Copyright (C) 2009, 2010 Free Software Foundation, Inc.
*
* VasEBoot is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* VasEBoot is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with VasEBoot. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef VasEBoot_POSIX_STDLIB_H
#define VasEBoot_POSIX_STDLIB_H 1
#include <VasEBoot/mm.h>
#include <VasEBoot/misc.h>
static inline void
free (void *ptr)
{
VasEBoot_free (ptr);
}
static inline void *
malloc (VasEBoot_size_t size)
{
return VasEBoot_malloc (size);
}
static inline void *
calloc (VasEBoot_size_t size, VasEBoot_size_t nelem)
{
return VasEBoot_zalloc (size * nelem);
}
static inline void *
realloc (void *ptr, VasEBoot_size_t size)
{
return VasEBoot_realloc (ptr, size);
}
static inline int
abs (int c)
{
return (c >= 0) ? c : -c;
}
#endif