Re: -nostdinc, <bsd.kmod.mk>, and <std{arg,def}.h>

From: Juergen Lock <nox_at_jelal.kn-bremen.de>
Date: Tue, 27 Jul 2010 18:53:53 +0200
On Mon, Jul 26, 2010 at 06:44:29AM +0400, Anonymous wrote:
> Juergen Lock <nox_at_jelal.kn-bremen.de> writes:
> 
> > On Sun, Jul 25, 2010 at 12:59:00AM +0200, Juergen Lock wrote:
> >> On Sat, Jul 24, 2010 at 05:17:51PM -0400, Ryan Stone wrote:
> >> > I believe that you should be using <sys/stddef.h> and <machine/stdarg.h>
> >> 
> >> Aaah thank you! :)  I shall make a patch tomorrow.
> >
> > Anyone want to test this patch on head?  It can go in
> > /usr/ports/emulators/kqemu-kmod-devel/files/patch-common-kqemu_int.h:
> >
> >  Thanx, :)
> > 	Juergen
> >
> > --- common/kqemu_int.h.orig
> > +++ common/kqemu_int.h
> > _at__at_ -17,8 +17,14 _at__at_
> >   * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
> >   */
> >  #ifndef __ASSEMBLY__
> > +#ifdef __FreeBSD__
> > +#include <sys/types.h>
> > +#include <sys/stddef.h>
> > +#include <machine/stdarg.h>
> 
> You're not gonna make _at_ and machine symlinks and include them using `-I_at_'?
> I think typedefs need to be hidden, too.
> 
>   gcc -Wall -O2 -fomit-frame-pointer -fno-strict-aliasing -Werror  -mno-red-zone -fno-stack-protector    -fpic  -D__KERNEL__ -nostdinc -iwithprefix include -I. -I.. -c -o monitor.o monitor.c -I_at_
>   In file included from monitor.c:20:
>   kqemu_int.h:31: error: redefinition of typedef 'uint8_t'
>   _at_/sys/types.h:84: error: previous declaration of 'uint8_t' was here
>   kqemu_int.h:32: error: redefinition of typedef 'uint16_t'
>   _at_/sys/types.h:89: error: previous declaration of 'uint16_t' was here
>   kqemu_int.h:33: error: redefinition of typedef 'uint32_t'
>   _at_/sys/types.h:94: error: previous declaration of 'uint32_t' was here
>   kqemu_int.h:35: error: redefinition of typedef 'uint64_t'
>   _at_/sys/types.h:99: error: previous declaration of 'uint64_t' was here
>   kqemu_int.h:40: error: redefinition of typedef 'int8_t'
>   _at_/sys/types.h:64: error: previous declaration of 'int8_t' was here
>   kqemu_int.h:41: error: redefinition of typedef 'int16_t'
>   _at_/sys/types.h:69: error: previous declaration of 'int16_t' was here
>   kqemu_int.h:42: error: redefinition of typedef 'int32_t'
>   _at_/sys/types.h:74: error: previous declaration of 'int32_t' was here
>   kqemu_int.h:44: error: redefinition of typedef 'int64_t'
>   _at_/sys/types.h:79: error: previous declaration of 'int64_t' was here
> 
Yeah I meanwhile got reminded of ref9-* and got something on ref9-i386
that at least builds again, which I just committed.

> BTW, the port doesn't respect CC and CFLAGS.

 Well in this case there's probably not much point, and also most ppl
use vbox now anyway. :)

 Thanx,
	Juergen
Received on Tue Jul 27 2010 - 15:00:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:05 UTC