[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Workaround for broken GCC in Debian Etch



On Sun, Aug 02, 2009 at 05:36:20PM +0200, Maximilian Wilhelm wrote:
> Anno domini 2009 Daniel P. Berrange scripsit:
> 
> > > I missed one patch for working around a GCC bug in Debian Etch
> > > regarding limit definitions.
> 
> > > Sorry for the unstripped git-format-patch outputs, I just realised
> > > this after pressing send :(
> 
> > > (This seems to be not my day :))
> 
> > Since it is 'internal.h' that pulls in limits.h, we should probably
> > just put that logic in internal.h, so it is visible to all libvirt
> > source files, and delete the duplicate in storage_conf.c
> 
> Here we go.
> 

ACK, looks good.

Daniel

> diff --git a/src/internal.h b/src/internal.h
> index cf7e196..936cd03 100644
> --- a/src/internal.h
> +++ b/src/internal.h
> @@ -73,8 +73,14 @@
>  #else
>  #define __GNUC_PREREQ(maj,min) 0
>  #endif
> +
> +/* Work around broken limits.h on debian etch */
> +#if defined _GCC_LIMITS_H_ && ! defined ULLONG_MAX
> +#define ULLONG_MAX   ULONG_LONG_MAX
>  #endif
>  
> +#endif /* __GNUC__ */
> +
>  /**
>   * ATTRIBUTE_UNUSED:
>   *
> diff --git a/src/storage_conf.c b/src/storage_conf.c
> index 075279c..245b2d0 100644
> --- a/src/storage_conf.c
> +++ b/src/storage_conf.c
> @@ -45,11 +45,6 @@
>  
>  #define VIR_FROM_THIS VIR_FROM_STORAGE
>  
> -/* Work around broken limits.h on debian etch */
> -#if defined __GNUC__ && defined _GCC_LIMITS_H_ && ! defined ULLONG_MAX
> -# define ULLONG_MAX   ULONG_LONG_MAX
> -#endif
> -
>  #define virStorageError(conn, code, fmt...)                             \
>              virReportErrorHelper(conn, VIR_FROM_STORAGE, code, __FILE__,\
>                                    __FUNCTION__, __LINE__, fmt)

> --
> Libvir-list mailing list
> Libvir-list redhat com
> https://www.redhat.com/mailman/listinfo/libvir-list


-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]