Hal Patch for __u8 types
JP Rosevear
jpr at novell.com
Thu Jul 14 05:34:04 PDT 2005
On Thu, 2005-07-14 at 08:49 +0100, Alvaro Lopez Ortega wrote:
> David Zeuthen wrote:
>
> >>On linux the AC_CHECK_TYPE in configure.in was always failing
> >>because it didn't #include the file, i updated the check to #include
> >><asm/types.h> because thats what gets included in the various source
> >>files. A small cleanup as well to make sure it all compiles clean
> >>again.
> >
> > This works for me on Linux but I want to check with that it doesn't
> > break anything on Solaris. Alvaro, can you confirm?
>
> The asm/types.h header file is Linux specific.
If so the AC_CHECK_TYPES call will fail so the types will get defined.
As well, currently <asm/types.h> is included unconditionally in several
files as well as linux/hdreg.h files outside of agents/hald. This leads
me to believe hal doesn't build on solaris currently, so there is no
harm in taking this patch until a complete build solution is created for
solaris. The other alternative is to set up a bunch of check header
autoconf macros as below, although i have no idea what the linux/hdreg.h
equivalent is on solaris.
> JP is right, it won't find __u8 either in a Linux or Solaris box, so
> currently it always redefines those kernel types with C types, even
> if the platform supports it.
>
> As far a I have seen, there are two options:
>
> - Check for asm/types.h with AC_CHECK_HEADERS. It found, use the
> HAVE_ASM_TYPES_H definition to include the header in each source
> file.
>
> - Remove the check for __u8 and redefine the Linux kernel types with
> C types always, even if it is a Linux box.
>
> The second approach is a little bit dirtier at the base, but it will
> keep the source code a little bit cleaner.
This was failing for me with the 2.6.12 kernel headers in the glibc we
are using for suse 10.0.
-JP
--
JP Rosevear <jpr at novell.com>
Novell, Inc.
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list