configure.ac: Enable AC_USE_SYSTEM_EXTENSIONS

AC_USE_SYSTEM_EXTENSIONS enables _XOPEN_SOURCE, _GNU_SOURCE and similar
macros to expose the largest extent of functionality supported by the
underlying system.  This is required since these macros are often
limiting rather than merely additive, e.g. _XOPEN_SOURCE will actually
on some systems hide declarations which are not part of the X/Open spec.

Since this goes into config.h rather than the command line, ensure all
source is consistently including config.h before anything else,
including system libraries.  This doesn't need to be guarded by a
HAVE_CONFIG_H ifdef, which was only ever a hangover from the X.Org
modular transition.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>

[pq: rebased and converted more files]
Daniel Stone 12 years ago committed by Kristian Høgsberg
parent 5238b683e2
commit c228e23b05
  1. 4
      clients/window.c
  2. 2
      configure.ac
  3. 2
      shared/cairo-util.c
  4. 3
      shared/config-parser.c
  5. 2
      shared/image-loader.c
  6. 2
      shared/matrix.c
  7. 2
      shared/option-parser.c
  8. 2
      shared/os-compatibility.c
  9. 2
      src/animation.c
  10. 2
      src/bindings.c
  11. 2
      src/clipboard.c
  12. 4
      src/cms-helper.c
  13. 5
      src/cms-static.c
  14. 6
      src/compositor-drm.c
  15. 2
      src/compositor-fbdev.c
  16. 4
      src/compositor-headless.c
  17. 4
      src/compositor-rdp.c
  18. 4
      src/compositor-rpi.c
  19. 5
      src/compositor-wayland.c
  20. 4
      src/compositor-x11.c
  21. 2
      src/compositor.c
  22. 2
      src/evdev-touchpad.c
  23. 2
      src/evdev.c
  24. 2
      src/filter.c
  25. 2
      src/gl-renderer.c
  26. 7
      src/gl-renderer.h
  27. 2
      src/launcher-util.c
  28. 2
      src/libbacklight.c
  29. 2
      src/log.c
  30. 2
      src/noop-renderer.c
  31. 2
      src/pixman-renderer.c
  32. 4
      src/rpi-renderer.c
  33. 2
      src/screenshooter.c
  34. 2
      src/shell.c
  35. 2
      src/tablet-shell.c
  36. 2
      src/text-backend.c
  37. 2
      src/tty.c
  38. 2
      src/udev-seat.c
  39. 2
      src/weston-launch.c
  40. 2
      src/xwayland/launcher.c
  41. 2
      src/xwayland/selection.c
  42. 2
      src/xwayland/window-manager.c
  43. 2
      src/zoom.c

@ -21,9 +21,7 @@
* OF THIS SOFTWARE.
*/
#define _GNU_SOURCE
#include "../config.h"
#include "config.h"
#include <stdint.h>
#include <stdio.h>

@ -18,6 +18,8 @@ AC_SUBST([WESTON_VERSION], [weston_version])
AC_CONFIG_HEADERS([config.h])
AC_USE_SYSTEM_EXTENSIONS
AM_INIT_AUTOMAKE([1.11 parallel-tests foreign no-dist-gzip dist-xz color-tests])
AM_SILENT_RULES([yes])

@ -21,7 +21,7 @@
* OF THIS SOFTWARE.
*/
#include "../config.h"
#include "config.h"
#include <stdint.h>
#include <stdlib.h>

@ -20,7 +20,8 @@
* OF THIS SOFTWARE.
*/
#define _GNU_SOURCE /* for stchrnul() */
#include "config.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

@ -21,7 +21,7 @@
* OF THIS SOFTWARE.
*/
#include "../config.h"
#include "config.h"
#include <stdlib.h>
#include <stdio.h>

@ -21,6 +21,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <float.h>
#include <string.h>
#include <stdlib.h>

@ -20,6 +20,8 @@
* OF THIS SOFTWARE.
*/
#include "config.h"
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>

@ -20,7 +20,7 @@
* OF THIS SOFTWARE.
*/
#define _GNU_SOURCE
#include "config.h"
#include <sys/types.h>
#include <sys/socket.h>

@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <stdlib.h>
#include "compositor.h"

@ -20,7 +20,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#define _GNU_SOURCE
#include "config.h"
#include <stdlib.h>
#include <string.h>

@ -20,9 +20,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "config.h"
#include <stdlib.h>
#include <string.h>

@ -20,11 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "config.h"
#define _GNU_SOURCE
#include <stdlib.h>
#include <string.h>

@ -21,11 +21,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#define _GNU_SOURCE
#include "config.h"
#include <errno.h>
#include <stdlib.h>

@ -23,7 +23,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#define _GNU_SOURCE
#include "config.h"
#include <errno.h>
#include <stdlib.h>

@ -21,9 +21,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "config.h"
#include <stdlib.h>
#include <string.h>

@ -20,9 +20,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "config.h"
#include <stdlib.h>
#include <string.h>

@ -22,7 +22,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#define _GNU_SOURCE
#include "config.h"
#include <errno.h>
#include <stdlib.h>
@ -35,8 +35,6 @@
#include <libudev.h>
#include "config.h"
#ifdef HAVE_BCM_HOST
# include <bcm_host.h>
#else

@ -20,12 +20,9 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "config.h"
#include <stddef.h>
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

@ -22,9 +22,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "config.h"
#include <assert.h>
#include <stddef.h>

@ -22,8 +22,6 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#define _GNU_SOURCE
#include "config.h"
#include <fcntl.h>

@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <stdlib.h>
#include <math.h>
#include <string.h>

@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <linux/input.h>

@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <stdlib.h>
#include <stdint.h>
#include <limits.h>

@ -20,7 +20,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#define _GNU_SOURCE
#include "config.h"
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>

@ -20,10 +20,9 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "compositor.h"
#include "config.h"
#include "compositor.h"
#ifdef ENABLE_EGL

@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

@ -29,7 +29,7 @@
* Tiago Vignatti <vignatti@freedesktop.org>
*/
#define _GNU_SOURCE
#include "config.h"
#include "libbacklight.h"
#include <stdio.h>

@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>

@ -20,7 +20,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#define _GNU_SOURCE
#include "config.h"
#include <stdlib.h>

@ -21,7 +21,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#define _GNU_SOURCE
#include "config.h"
#include <errno.h>
#include <stdlib.h>

@ -20,12 +20,12 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include "config.h"
#ifdef HAVE_BCM_HOST
# include <bcm_host.h>
#else

@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

@ -21,6 +21,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>

@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <sys/wait.h>
#include <unistd.h>
#include <stdlib.h>

@ -21,6 +21,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <termios.h>
#include <stdio.h>
#include <stdlib.h>

@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

@ -20,8 +20,6 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#define _GNU_SOURCE
#include "config.h"
#include <stdio.h>

@ -20,7 +20,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#define _GNU_SOURCE
#include "config.h"
#include <stdlib.h>
#include <stdio.h>

@ -20,7 +20,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#define _GNU_SOURCE
#include "config.h"
#include <stdlib.h>
#include <string.h>

@ -20,7 +20,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#define _GNU_SOURCE
#include "config.h"
#include <stdlib.h>
#include <stdio.h>

@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <stdlib.h>
#include "compositor.h"

Loading…
Cancel
Save