libdrm/libdrm-implicit-defs.diff

564 lines
10 KiB
Diff
Raw Normal View History

From: Jan Engelhardt <jengelh@medozas.de>
Date: 2012-02-11 18:30:33.770195708 +0100
Resolve compiler warnings about use of implicit declared-functions.
radeon_ttm.c: In function 'radeon_open_fd':
radeon_ttm.c:58:5: warning: implicit declaration of function 'drmOpen' [-Wimplicit-function-declaration]
radeon_ttm.c: In function 'main':
radeon_ttm.c:73:5: warning: implicit declaration of function 'close' [-Wimplicit-function-declaration]
radeon_ttm.c: At top level:
---
tests/radeon/radeon_ttm.c | 2 ++
1 file changed, 2 insertions(+)
--- tests/radeon/radeon_ttm.c.orig
+++ tests/radeon/radeon_ttm.c
@@ -23,9 +23,15 @@
* Authors:
* Jerome Glisse <j.glisse@gmail.com>
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include "rbo.h"
+#include "xf86drm.h"
/* allocate as many single page bo to try to starve the kernel
* memory zone (below highmem)
--- configure.ac.orig
+++ configure.ac
@@ -36,7 +36,7 @@ AM_MAINTAINER_MODE([enable])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Check for programs
-AC_PROG_CC
+AC_PROG_CC_STDC
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
@@ -109,9 +109,7 @@ AC_DEFUN([LIBDRM_CC_TRY_FLAG], [
dnl We use clock_gettime to check for timeouts in drmWaitVBlank
-AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=],
- [AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt],
- [AC_MSG_ERROR([Couldn't find clock_gettime])])])
+AC_SEARCH_LIBS([clock_gettime], [rt])
AC_SUBST([CLOCK_LIB])
AC_CHECK_FUNCS([open_memstream], [HAVE_OPEN_MEMSTREAM=yes])
--- intel/intel_decode.c.orig
+++ intel/intel_decode.c
@@ -21,6 +21,10 @@
* IN THE SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
--- intel/mm.c.orig
+++ intel/mm.c
@@ -22,6 +22,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <assert.h>
--- libkms/dumb.c.orig
+++ libkms/dumb.c
@@ -26,8 +26,9 @@
**************************************************************************/
-#define HAVE_STDINT_H
-#define _FILE_OFFSET_BITS 64
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <errno.h>
#include <stdio.h>
--- libkms/intel.c.orig
+++ libkms/intel.c
@@ -26,8 +26,9 @@
**************************************************************************/
-#define HAVE_STDINT_H
-#define _FILE_OFFSET_BITS 64
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <errno.h>
#include <stdio.h>
--- libkms/nouveau.c.orig
+++ libkms/nouveau.c
@@ -29,6 +29,10 @@
#define HAVE_STDINT_H
#define _FILE_OFFSET_BITS 64
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
--- libkms/radeon.c.orig
+++ libkms/radeon.c
@@ -26,8 +26,9 @@
**************************************************************************/
-#define HAVE_STDINT_H
-#define _FILE_OFFSET_BITS 64
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <errno.h>
#include <stdio.h>
--- libkms/vmwgfx.c.orig
+++ libkms/vmwgfx.c
@@ -29,6 +29,10 @@
#define HAVE_STDINT_H
#define _FILE_OFFSET_BITS 64
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <errno.h>
#include <stdlib.h>
#include <string.h>
--- nouveau/abi16.c.orig
+++ nouveau/abi16.c
@@ -22,6 +22,10 @@
* Authors: Ben Skeggs
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <stdint.h>
--- radeon/bof.c.orig
+++ radeon/bof.c
@@ -23,6 +23,10 @@
* Authors:
* Jerome Glisse
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <errno.h>
#include <stdlib.h>
#include <string.h>
--- radeon/radeon_bo.c.orig
+++ radeon/radeon_bo.c
@@ -29,6 +29,10 @@
* Dave Airlie
* Jérôme Glisse <glisse@freedesktop.org>
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <radeon_bo.h>
#include <radeon_bo_int.h>
--- radeon/radeon_cs.c.orig
+++ radeon/radeon_cs.c
@@ -1,4 +1,8 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include "radeon_cs.h"
#include "radeon_cs_int.h"
--- radeon/radeon_cs_gem.c.orig
+++ radeon/radeon_cs_gem.c
@@ -29,6 +29,10 @@
* Nicolai Haehnle <prefect_@gmx.net>
* Jérôme Glisse <glisse@freedesktop.org>
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
--- radeon/radeon_cs_space.c.orig
+++ radeon/radeon_cs_space.c
@@ -25,6 +25,10 @@
*/
/*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
--- radeon/radeon_surface.c.orig
+++ radeon/radeon_surface.c
@@ -26,6 +26,10 @@
* Authors:
* Jérôme Glisse <jglisse@redhat.com>
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
--- tests/dristat.c.orig
+++ tests/dristat.c
@@ -27,9 +27,14 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <sys/ioctl.h>
#include "xf86drm.h"
#include "xf86drmRandom.c"
#include "xf86drmHash.c"
--- tests/drmtest.c.orig
+++ tests/drmtest.c
@@ -25,6 +25,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <string.h>
#include <fcntl.h>
#include <fnmatch.h>
--- tests/gem_basic.c.orig
+++ tests/gem_basic.c
@@ -25,6 +25,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -33,6 +37,7 @@
#include <inttypes.h>
#include <errno.h>
#include <sys/stat.h>
+#include <sys/ioctl.h>
#include "drm.h"
#include "i915_drm.h"
--- tests/gem_flink.c.orig
+++ tests/gem_flink.c
@@ -25,6 +25,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -33,6 +37,7 @@
#include <inttypes.h>
#include <errno.h>
#include <sys/stat.h>
+#include <sys/ioctl.h>
#include "drm.h"
#include "i915_drm.h"
--- tests/gem_mmap.c.orig
+++ tests/gem_mmap.c
@@ -25,6 +25,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -33,6 +37,7 @@
#include <inttypes.h>
#include <errno.h>
#include <sys/stat.h>
+#include <sys/ioctl.h>
#include "drm.h"
#include "i915_drm.h"
--- tests/gem_readwrite.c.orig
+++ tests/gem_readwrite.c
@@ -25,6 +25,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -33,6 +37,7 @@
#include <inttypes.h>
#include <errno.h>
#include <sys/stat.h>
+#include <sys/ioctl.h>
#include "drm.h"
#include "i915_drm.h"
--- tests/getclient.c.orig
+++ tests/getclient.c
@@ -25,7 +25,12 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <limits.h>
+#include <sys/ioctl.h>
#include "drmtest.h"
/**
--- tests/getstats.c.orig
+++ tests/getstats.c
@@ -25,7 +25,12 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <limits.h>
+#include <sys/ioctl.h>
#include "drmtest.h"
/**
--- tests/getversion.c.orig
+++ tests/getversion.c
@@ -25,6 +25,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "drmtest.h"
/**
--- tests/kmstest/main.c.orig
+++ tests/kmstest/main.c
@@ -26,6 +26,10 @@
**************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <string.h>
#include "xf86drm.h"
--- tests/modeprint/modeprint.c.orig
+++ tests/modeprint/modeprint.c
@@ -30,6 +30,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
--- tests/name_from_fd.c.orig
+++ tests/name_from_fd.c
@@ -25,6 +25,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <unistd.h>
#include <fcntl.h>
#include <limits.h>
--- tests/openclose.c.orig
+++ tests/openclose.c
@@ -25,6 +25,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "drmtest.h"
int main(int argc, char **argv)
--- tests/radeon/rbo.c.orig
+++ tests/radeon/rbo.c
@@ -24,6 +24,10 @@
* Jerome Glisse <j.glisse@gmail.com>
*/
#define _FILE_OFFSET_BITS 64
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
--- tests/setversion.c.orig
+++ tests/setversion.c
@@ -25,7 +25,12 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <limits.h>
+#include <sys/ioctl.h>
#include "drmtest.h"
/**
--- tests/updatedraw.c.orig
+++ tests/updatedraw.c
@@ -25,6 +25,11 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/ioctl.h>
#include "drmtest.h"
static void
--- xf86drmHash.c.orig
+++ xf86drmHash.c
@@ -68,6 +68,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
--- xf86drmMode.c.orig
+++ xf86drmMode.c
@@ -37,6 +37,10 @@
* TODO the types we are after are defined in diffrent headers on diffrent
* platforms find which headers to include to get uint32_t
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdint.h>
#include <sys/ioctl.h>
#include <stdio.h>
--- xf86drmRandom.c.orig
+++ xf86drmRandom.c
@@ -71,6 +71,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
--- xf86drmSL.c.orig
+++ xf86drmSL.c
@@ -38,6 +38,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
--- tests/modetest/modetest.c.orig
+++ tests/modetest/modetest.c
@@ -49,7 +49,7 @@
#include <errno.h>
#include <sys/poll.h>
#include <sys/time.h>
-
+#include <sys/ioctl.h>
#include "xf86drm.h"
#include "xf86drmMode.h"
#include "drm_fourcc.h"
--- intel/Makefile.am.orig
+++ intel/Makefile.am
@@ -49,7 +49,7 @@ libdrm_intel_la_SOURCES = \
mm.c \
mm.h
-intel_bufmgr_gem_o_CFLAGS = $(AM_CFLAGS) -c99
+intel_bufmgr_gem_o_CFLAGS = $(AM_CFLAGS)
libdrm_intelincludedir = ${includedir}/libdrm
libdrm_intelinclude_HEADERS = intel_bufmgr.h \