2 * inline.c --- Includes the inlined functions defined in the header
3 * files as standalone functions, in case the application program
4 * is compiled with inlining turned off.
6 * Copyright (C) 1993, 1994 Theodore Ts'o.
9 * This file may be redistributed under the terms of the GNU Library
10 * General Public License, version 2.
27 #include <sys/types.h>
31 #define INCLUDE_INLINE_FUNCS
35 * We used to define this as an inline, but since we are now using
36 * autoconf-defined #ifdef's, we need to export this as a
37 * library-provided function exclusively.
39 errcode_t ext2fs_get_memalign(unsigned long size,
40 unsigned long align, void *ptr)
46 #ifdef HAVE_POSIX_MEMALIGN
47 retval = posix_memalign((void **) ptr, align, size);
50 return EXT2_ET_NO_MEMORY;
55 *ptr = memalign(align, size);
60 return EXT2_ET_NO_MEMORY;
63 #error memalign or posix_memalign must be defined!