diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2014-08-29 10:27:43 +0900 |
---|---|---|
committer | Sangwon Ha <sw815.ha@samsung.com> | 2015-04-06 21:31:34 +0900 |
commit | a85bfe8b641040944bb6f19dc3041d86ec2316bf (patch) | |
tree | 4663366bcc20d5446a445684deada3d7d7f542f9 | |
parent | f3880bb35eb8d0dbe4ba7d4a5744a135b340c821 (diff) | |
download | mesa-tizen_3.0.2015.q2_common.tar.gz mesa-tizen_3.0.2015.q2_common.tar.bz2 mesa-tizen_3.0.2015.q2_common.zip |
configure.ac: Add AC_SYS_LARGEFILEtizen_3.0.m2.a1_tv_releasetizen_3.0.m2.a1_mobile_releasetizen_3.0.m1_tv_releasetizen_3.0.m1_mobile_releasesubmit/tizen_common/20160223.170033submit/tizen_common/20151019.135620submit/tizen_common/20151015.190624submit/tizen/20150408.043231accepted/tizen/wearable/20150408.103951accepted/tizen/tv/20150408.103802accepted/tizen/mobile/20150408.104315accepted/tizen/common/20150408.102954tizen_3.0.m1_tvtizen_3.0.m1_mobiletizen_3.0.2015.q2_common
Making sure large file support is enabled across the tree even on 32-bit
systems.
Change-Id: I2f6e927bfc442cc39717fb7385fb8f3600106a67
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/os/os_mman.h | 13 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 1 | ||||
-rw-r--r-- | src/gallium/winsys/svga/drm/Makefile.am | 2 |
4 files changed, 12 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 43200455bdd..23d440ccf22 100644 --- a/configure.ac +++ b/configure.ac @@ -57,6 +57,8 @@ AC_CHECK_PROGS([PYTHON2], [python2 python]) AC_PROG_SED AC_PROG_MKDIR_P +AC_SYS_LARGEFILE + LT_PREREQ([2.2]) LT_INIT([disable-static]) diff --git a/src/gallium/auxiliary/os/os_mman.h b/src/gallium/auxiliary/os/os_mman.h index b48eb053023..19478d24e44 100644 --- a/src/gallium/auxiliary/os/os_mman.h +++ b/src/gallium/auxiliary/os/os_mman.h @@ -40,9 +40,6 @@ #include "pipe/p_compiler.h" #if defined(PIPE_OS_UNIX) -# ifndef _FILE_OFFSET_BITS -# error _FILE_OFFSET_BITS must be defined to 64 -# endif # include <sys/mman.h> #else # error Unsupported OS @@ -77,7 +74,15 @@ static INLINE void *os_mmap(void *addr, size_t length, int prot, int flags, int # define os_mmap(addr, length, prot, flags, fd, offset) mmap(addr, length, prot, flags, fd, offset) #endif -#define os_munmap(addr, length) munmap(addr, length) +static INLINE int os_munmap(void *addr, size_t length) +{ + /* Copied from configure code generated by AC_SYS_LARGEFILE */ +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + STATIC_ASSERT(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1); +#undef LARGE_OFF_T + + return munmap(addr, length); +} #ifdef __cplusplus diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 73f8d385d7b..fd9f1c86601 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -24,7 +24,6 @@ * of the Software. */ -#define _FILE_OFFSET_BITS 64 #include "radeon_drm_cs.h" #include "util/u_hash_table.h" diff --git a/src/gallium/winsys/svga/drm/Makefile.am b/src/gallium/winsys/svga/drm/Makefile.am index 69398b85759..8d562c9dbe0 100644 --- a/src/gallium/winsys/svga/drm/Makefile.am +++ b/src/gallium/winsys/svga/drm/Makefile.am @@ -31,7 +31,7 @@ AM_CFLAGS = \ $(LIBDRM_CFLAGS) #On some systems -std= must be added to CFLAGS to be the last -std= -CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 +CFLAGS += -std=gnu99 noinst_LTLIBRARIES = libsvgadrm.la |