[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch for successful compilation on FreeBSD Release-6.1
From: |
Harley D. Eades III |
Subject: |
Re: Patch for successful compilation on FreeBSD Release-6.1 |
Date: |
13 Jun 2006 16:52:04 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
"Yoshinori K. Okuji" <address@hidden> writes:
> On Monday 12 June 2006 17:31, Harley D. Eades III wrote:
> > --- grub2/configure.ac Sun Jun 11 17:49:23 2006
> > +++ grub2Hacked/configure.ac Sun Jun 11 17:55:34 2006
> > @@ -121,6 +121,15 @@
> > AC_CHECK_SIZEOF(void *)
> > AC_CHECK_SIZEOF(long)
> >
> > +# BSD checks.
> > +AC_CHECK_HEADER([malloc.h],
> > + [AC_DEFINE(HAVE_MALLOC_H, [],
> > + [Define to 1 if you have the malloc.h header file.])],
> > ,)
> > +
>
> Please use AC_CHECK_HEADERS instead. Usually, you don't have to use
> AC_CHECK_HEADER. See the autoconf manual for more details.
ok
>
> > +AC_CHECK_FUNC([memalign],
> > + [AC_DEFINE(HAVE_MEMALIGN, [],
> > + [Define to 1 if you have the memalign function.])], ,)
> > +
ok
> Likewise, please use AC_CHECK_FUNCS instead.
>
> > --- grub2/include/grub/util/misc.h Mon Feb 14 18:07:01 2005
> > +++ grub2Hacked/include/grub/util/misc.h Mon Jun 5 15:25:38
> > 2006
> > @@ -23,6 +23,7 @@
> > #include <stdlib.h>
> > #include <stdio.h>
> > #include <setjmp.h>
> > +#include <unistd.h>
>
> Can you tell me why it is necessary to include unistd.h here?
off_t is defined here on FreeBSD.
> > --- grub2/util/grub-emu.c Wed Apr 26 16:58:36 2006
> > +++ grub2Hacked/util/grub-emu.c Mon Jun 5 15:26:30 2006
> > @@ -18,7 +18,11 @@
> > */
> >
> > #include <stdlib.h>
> > +
> > +#ifdef HAVE_MALLOC_H
> > #include <malloc.h>
> > +#endif
> > +
>
> I don't know why it is necessary to include malloc.h. IIRC, FreeBSD does not
> use malloc.h since 4.2 or something. In fact, other projects, such as KDE,
> stop including malloc.h in all platforms. Can you elaborate on this change?
I am not adding the include. All I added was the #if statement so
this is not included on FreeBSD. So you are correct about the header
file not being used on FreeBSD, because it's not. :) IIRC, GNU/Linux
does define memalign in malloc.h though, so this could be the reason
it has been included already.
Cheers
Harley
- Patch for successful compilation on FreeBSD Release-6.1, Harley D. Eades III, 2006/06/11
- Re: Patch for successful compilation on FreeBSD Release-6.1, Jeroen Dekkers, 2006/06/11
- Re: Patch for successful compilation on FreeBSD Release-6.1, Harley D. Eades III, 2006/06/11
- Re: Patch for successful compilation on FreeBSD Release-6.1, Harley D. Eades III, 2006/06/12
- Re: Patch for successful compilation on FreeBSD Release-6.1, Marco Gerards, 2006/06/12
- Re: Patch for successful compilation on FreeBSD Release-6.1, Yoshinori K. Okuji, 2006/06/13
- Re: Patch for successful compilation on FreeBSD Release-6.1,
Harley D. Eades III <=
- Re: Patch for successful compilation on FreeBSD Release-6.1, Yoshinori K. Okuji, 2006/06/13
- Re: Patch for successful compilation on FreeBSD Release-6.1, Harley D. Eades III, 2006/06/13
- Re: Patch for successful compilation on FreeBSD Release-6.1, Harley D. Eades III, 2006/06/13