2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
* util/misc.c: Include config.h. [!HAVE_MEMALIGN]: Do not include malloc.h. (grub_memalign): Use posix_memalign, if present. Then, use memalign, if present. Otherwise, emit an error. * util/grub-emu.c: Do not include malloc.h. * include/grub/util/misc.h: Include unistd.h. This is required for FreeBSD, because off_t is defined in unistd.h. Reported by Harley D. Eades III <hde@foobar-qux.org>. * configure.ac (AC_GNU_SOURCE): Added. (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host type.
This commit is contained in:
parent
fd39d4da42
commit
4889bdeca3
8 changed files with 165 additions and 6 deletions
|
@ -114,6 +114,7 @@ AC_PROG_CC
|
|||
# Must be GCC.
|
||||
test "x$GCC" = xyes || AC_MSG_ERROR([GCC is required])
|
||||
|
||||
AC_GNU_SOURCE
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
# Identify characteristics of the host architecture.
|
||||
|
@ -152,6 +153,9 @@ AC_SUBST(LIBCURSES)
|
|||
# Check for headers.
|
||||
AC_CHECK_HEADERS(ncurses/curses.h ncurses.h curses.h)
|
||||
|
||||
# Check for functions.
|
||||
AC_CHECK_FUNCS(posix_memalign memalign)
|
||||
|
||||
#
|
||||
# Check for target programs.
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue