[haiku-commits] Re: haiku: hrev47683 - in src/bin/keymap: . src/bin

  • From: pulkomandy <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 14 Aug 2014 08:14:00 +0200

> diff --git a/src/bin/keymap/Keymap.h b/src/bin/keymap/Keymap.h
> index 218e327..dea03b4 100644
> --- a/src/bin/keymap/Keymap.h
> +++ b/src/bin/keymap/Keymap.h
> @@ -17,7 +17,9 @@
>  #endif
>  
>  #include <stdio.h>
> -#define __USE_GNU
> +#ifndef __USE_GNU
> +#    define __USE_GNU
> +#endif
>  #include <regex.h>

This is the wrong way to do things. Please use this instead:
#define _GNU_SOURCE

See http://man7.org/linux/man-pages/man7/feature_test_macros.7.html

In particular in the NOTES section:
These macros have names prefixed by two underscores (e.g., __USE_MISC). Programs
should never define these macros directly: instead, the appropriate feature test
macro(s) from the list above should be employed.

-- 
Adrien.

Other related posts: