[PD] Large File Support on Linux
Charles Goyard
cg at fsck.fr
Mon Mar 18 11:18:02 CET 2013
Hi,
thanks for taking that up.
On my machine (archlinux, Linux 3.7.10-1-ARCH i686 GNU/Linux, glibc
2.17), changing the LARGEFILE define to __linux__ (or __gnu_linux__
yields:
git pull
./autogen.sh
./configure --prefix=/opt/pd-vanilla/git --enable-jack
make prefix=/opt/pd-vanilla-git
[...]
gcc -DPACKAGE_NAME=\"pd\" -DPACKAGE_TARNAME=\"pd\"
-DPACKAGE_VERSION=\"0.44.0\" -DPACKAGE_STRING=\"pd\ 0.44.0\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pd\"
-DVERSION=\"0.44.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-DLT_OBJDIR=\".libs/\" -DHAVE_LIBDL=1 -DSTDC_HEADERS=1 -DHAVE_ALLOCA_H=1
-DHAVE_ALLOCA=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_MALLOC_H=1
-DHAVE_NETDB_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_STDDEF_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_IOCTL_H=1
-DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_SYS_SOUNDCARD_H=1
-DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMEB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FORK=1
-DHAVE_VFORK=1 -DHAVE_WORKING_VFORK=1 -DHAVE_WORKING_FORK=1
-DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1
-DRETSIGTYPE=void -DHAVE_DUP2=1 -DHAVE_GETCWD=1 -DHAVE_GETHOSTBYNAME=1
-DHAVE_GETTIMEOFDAY=1 -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_REGCOMP=1
-DHAVE_SELECT=1 -DHAVE_SOCKET=1 -DHAVE_STRCHR=1 -DHAVE_STRERROR=1
-DHAVE_STRRCHR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -I. -DPD
-DINSTALL_PREFIX=\"/opt/pd-vanilla-git\" -DUSEAPI_ALSA -DUSEAPI_JACK
-DJACK_XRUN -DUSEAPI_OSS -DUSEAPI_PORTAUDIO -I../portaudio/include
-O6 -funroll-loops -fomit-frame-pointer -MT pd-s_path.o -MD -MP -MF
.deps/pd-s_path.Tpo -c -o pd-s_path.o `test -f 's_path.c' || echo
'./'`s_path.c
s_path.c: In function ‘sys_trytoopenone’:
s_path.c:290:21: error: storage size of ‘statbuf’ isn’t known
[...]
And that can make sense since stat is now stat64, the structure name:
struct stat statbuf
is
struct stat64 statbuf;
So I tried with these defines instead :
#ifdef __gnu_linux__
# define open(x, ...) open64(x ,__VA_ARGS__)
# define lseek(x, ...) lseek64(x ,__VA_ARGS__)
# define fstat(x, ...) fstat64(x ,__VA_ARGS__)
# define stat(x, ...) stat64(x ,__VA_ARGS__)
#endif
but opening a large file still fails.
Miller Puckette wrote:
> So a quick (and perhaps stupid) question - can I just use
> #idfef __linux__ to alias open to open64, etc? It works on my
> x86_64 machine and on my Raspberry Pi so I'm guessing all modern
> linuxes define an open64(). My main fear is that android might define
> __linux__ but not open64() - anyone know about that?
More information about the Pd-list
mailing list