Re: [PATCH 06/10] build-sys: check for union semun instead of using _SEM_SEMUN_UNDEFINED

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

 



On Thu, Oct 08, 2009 at 01:40:11PM +0200, Guillem Jover wrote:
> Older versions of glibc used to declare ‘union semun’ in <sys/sem.h>,
> but POSIX.1-2001 requires the caller to declare it instead. Later
> versions of glibc started defining _SEM_SEMUN_UNDEFINED to note that
> the union was not being declared, but conforming systems are not
> required to define that macro (e.g. FreeBSD). As a side effect we get
> rid of some obsolete __GNU_LIBRARY__ macro usage.
> 
> Signed-off-by: Guillem Jover <guillem@xxxxxxxxxxx>

 Applied with small change:

> -#if defined (__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
> +#if defined (HAVE_UNION_SEMUN)
>  /* union semun is defined by including <sys/sem.h> */
>  #else
>  /* according to X/OPEN we have to define it ourselves */

 I think

 #ifndef HAVE_UNION_SEMUN
 union semum {
  ...
 }
 #endif

 looks more readable better.

 Thanks.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux