Handle platforms where off_t is not convertible to size_t
authorPeter Griess <pgriess@fb.com>
Fri, 24 Jan 2014 15:42:00 +0000 (07:42 -0800)
committerSara Golemon <sgolemon@fb.com>
Thu, 6 Feb 2014 19:50:13 +0000 (11:50 -0800)
commit8cb35a9efa534779a0c469f00ddb65961a657278
tree5243ec7384f3159982af288e715b0940e8ce1b0d
parent82275df6fc89e0c86556c73d49858b40a5691b78
Handle platforms where off_t is not convertible to size_t

Summary:
- On iOS, off_t is an int64_t, and as such std::min() doesn't compile
since the types don't match. Normalize to size_t and fail with an
error if this conversion can't be made

Test Plan:
- fbconfig -r folly && fbmake runtests
- Built on iOS

Reviewed By: tudorb@fb.com

FB internal diff: D1142795
folly/FileUtil.h