mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 11:00:11 +01:00
configure.ac: Add AC_SYS_LARGEFILE
Making sure large file support is enabled across the tree even on 32-bit systems. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
parent
b4539274b6
commit
76b906c9f6
4 changed files with 12 additions and 6 deletions
|
|
@ -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])
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
* of the Software.
|
||||
*/
|
||||
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
#include "radeon_drm_cs.h"
|
||||
|
||||
#include "util/u_hash_table.h"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue