Large file support in NDK

636 views
Skip to first unread message

jeffq

unread,
Aug 30, 2010, 5:38:23 PM8/30/10
to android-platform
I'm having trouble getting large file support when compiling some
native code in NDK. Specifically, it looks like fseeko64 and ftello64
are missing. Is there something I'm missing about getting the LFS
extensions for Posix libc in NDK, or I would I have to use specific
Linux calls to do this?

Chris Stratton

unread,
Aug 30, 2010, 10:34:17 PM8/30/10
to android-platform
Personally I would try a grep on the sources for applicable function
names. You can even do it via the web interfaces on
android.git.kernel.org.

Dwi Sasongko Supriyadi

unread,
Aug 30, 2010, 9:35:46 PM8/30/10
to android-...@googlegroups.com
From my understanding (it's quite common in embedded system), LFS is
disabled. I didn't check whether this is correct for Android NDK or
not.

BTW, why do you need LFS in Android? Will your NDK application access
any file up to 2GB?

Best regards,
DWI

> --
> You received this message because you are subscribed to the Google Groups "android-platform" group.
> To post to this group, send email to android-...@googlegroups.com.
> To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.
>
>

--
"A mathematician is a device for turning coffee into theorems." - Paul Erdos

Contacts:
    +62 857 8038 8298
    +62 813 9876 6576

Skype: dwi.sasongko
GTalk: ruckuus

Chris Stratton

unread,
Aug 31, 2010, 1:43:37 PM8/31/10
to android-platform
There is an lseek64 wrapping the kernels _llseek.

It appears to work in that calling it with SEEK_END on a device file
finds the end of a 4gb sd card where lseek() fails. I can't think
how to test it for larger values (especially that wont fit in unsigned
32 bits) without a larger card.

Setting up stream wrappers may be a pain.
Reply all
Reply to author
Forward
0 new messages