On 06/11/2011 07:42 PM, James Youngman wrote:
> +++ b/find/find.c
> @@ -878,7 +878,7 @@ safely_chdir (const char *dest,
>     */
>    complete_pending_execdirs ();
>  
> -#if !defined(O_NOFOLLOW)
> +#if !defined O_NOFOLLOW
>    options.open_nofollow_available = false;
>  #endif

I prefer #ifndef over #if !defined, when there is only a single
condition in the #if.  Furthermore, gnulib's <fcntl.h> guarantees that
O_NOFOLLOW is always defined, but sometimes to 0.  So to be correct,
this would be better written as:

  options.open_nofollow_available = !!O_NOFOLLOW;

and lose the preprocessor probing altogether.

> +++ b/find/pred.c
> @@ -68,8 +68,8 @@
>  # define N_(String) String
>  #endif
>  
> -#if !defined(SIGCHLD) && defined(SIGCLD)
> -#define SIGCHLD SIGCLD
> +#if defined SIGCLD && !defined SIGCHLD
> +# define SIGCHLD SIGCLD
>  #endif

Gnulib should be taking care of that for you.  I know that mingw still
lacks SIGCHLD (of any spelling), but are there any modern systems that
lack SIGCHLD but have SIGCLD?

-- 
Eric Blake   [email protected]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to