Make sure config.h is included before any system headers

There was an issue recently in screen-share.c where config.h was not
being included, resulting in the wrong definition for off_t being used on
32 bit systems. I checked and I don't think this problem is happening
elsewhere, but to help avoid this sort of problem in the future, I went
through and made sure that config.h is included first whenever system
headers are included.

The config.h header should be included before any system headers, failing
to do this can result in the wrong type sizes being defined on certain
systems, e.g. off_t from sys/types.h

Signed-off-by: Andrew Wedgbury <andrew.wedgbury@realvnc.com>
dev
Andrew Wedgbury 11 years ago committed by Kristian Høgsberg
parent ba83db216c
commit 9cd661e746
  1. 2
      clients/calibrator.c
  2. 2
      clients/clickdot.c
  3. 2
      clients/cliptest.c
  4. 2
      clients/dnd.c
  5. 2
      clients/eventdemo.c
  6. 2
      clients/flower.c
  7. 2
      clients/fullscreen.c
  8. 2
      clients/image.c
  9. 2
      clients/keyboard.c
  10. 2
      clients/nested-client.c
  11. 2
      clients/nested.c
  12. 2
      clients/resizor.c
  13. 2
      clients/scaler.c
  14. 2
      clients/simple-egl.c
  15. 2
      clients/smoke.c
  16. 2
      clients/subsurfaces.c
  17. 2
      clients/transformed.c
  18. 2
      clients/window.h
  19. 2
      clients/wscreensaver.h
  20. 4
      shared/os-compatibility.h
  21. 2
      src/vaapi-recorder.c
  22. 2
      tests/bad-buffer-test.c
  23. 2
      tests/buffer-count-test.c
  24. 2
      tests/button-test.c
  25. 2
      tests/config-parser-test.c
  26. 2
      tests/matrix-test.c
  27. 2
      tests/setbacklight.c
  28. 2
      tests/subsurface-test.c
  29. 2
      tests/surface-global-test.c
  30. 2
      tests/text-test.c
  31. 3
      tests/vertex-clip-test.c
  32. 2
      tests/weston-test-client-helper.h
  33. 2
      tests/weston-test-runner.h

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

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

@ -30,6 +30,8 @@
* surface transform disable key: r * surface transform disable key: r
*/ */
#include "config.h"
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

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

@ -30,6 +30,8 @@
* \author Tim Wiederhake * \author Tim Wiederhake
*/ */
#include "config.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

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

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

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

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

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

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

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

@ -21,6 +21,8 @@
* OF THIS SOFTWARE. * OF THIS SOFTWARE.
*/ */
#include "config.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>

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

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

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

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

@ -23,6 +23,8 @@
#ifndef _WINDOW_H_ #ifndef _WINDOW_H_
#define _WINDOW_H_ #define _WINDOW_H_
#include "config.h"
#include <xkbcommon/xkbcommon.h> #include <xkbcommon/xkbcommon.h>
#include <wayland-client.h> #include <wayland-client.h>
#include <cairo.h> #include <cairo.h>

@ -23,6 +23,8 @@
#ifndef WSCREENSAVER_H #ifndef WSCREENSAVER_H
#define WSCREENSAVER_H #define WSCREENSAVER_H
#include "config.h"
#define MESA_EGL_NO_X11_HEADERS #define MESA_EGL_NO_X11_HEADERS
#include <EGL/egl.h> #include <EGL/egl.h>

@ -23,10 +23,10 @@
#ifndef OS_COMPATIBILITY_H #ifndef OS_COMPATIBILITY_H
#define OS_COMPATIBILITY_H #define OS_COMPATIBILITY_H
#include <sys/types.h>
#include "config.h" #include "config.h"
#include <sys/types.h>
#ifdef HAVE_EXECINFO_H #ifdef HAVE_EXECINFO_H
#include <execinfo.h> #include <execinfo.h>
#else #else

@ -43,6 +43,8 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include "config.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>

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

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

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

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

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

@ -28,6 +28,8 @@
* program. * program.
*/ */
#include "config.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>

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

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

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

@ -19,6 +19,9 @@
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "config.h"
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

@ -23,6 +23,8 @@
#ifndef _WESTON_TEST_CLIENT_HELPER_H_ #ifndef _WESTON_TEST_CLIENT_HELPER_H_
#define _WESTON_TEST_CLIENT_HELPER_H_ #define _WESTON_TEST_CLIENT_HELPER_H_
#include "config.h"
#include <assert.h> #include <assert.h>
#include "weston-test-runner.h" #include "weston-test-runner.h"
#include "wayland-test-client-protocol.h" #include "wayland-test-client-protocol.h"

@ -24,6 +24,8 @@
#ifndef _WESTON_TEST_RUNNER_H_ #ifndef _WESTON_TEST_RUNNER_H_
#define _WESTON_TEST_RUNNER_H_ #define _WESTON_TEST_RUNNER_H_
#include "config.h"
#include <stdlib.h> #include <stdlib.h>
#ifdef NDEBUG #ifdef NDEBUG

Loading…
Cancel
Save