Comparison

util-src/pposix.c @ 5928:1f6923702fc3

Merge 0.9->0.10
author Kim Alvefur <zash@zash.se>
date Thu, 28 Nov 2013 16:17:21 +0100
parent 5814:5cf1c08805fb
parent 5927:49e3c49eb0d8
child 6156:6b1aee6536e8
comparison
equal deleted inserted replaced
5925:826c522f303a 5928:1f6923702fc3
674 #if _XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L || defined(_GNU_SOURCE) 674 #if _XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L || defined(_GNU_SOURCE)
675 int lc_fallocate(lua_State* L) 675 int lc_fallocate(lua_State* L)
676 { 676 {
677 off_t offset, len; 677 off_t offset, len;
678 FILE *f = *(FILE**) luaL_checkudata(L, 1, LUA_FILEHANDLE); 678 FILE *f = *(FILE**) luaL_checkudata(L, 1, LUA_FILEHANDLE);
679 if (f == NULL)
680 luaL_error(L, "attempt to use a closed file");
679 681
680 offset = luaL_checkinteger(L, 2); 682 offset = luaL_checkinteger(L, 2);
681 len = luaL_checkinteger(L, 3); 683 len = luaL_checkinteger(L, 3);
682 684
683 #if defined(__linux__) && defined(_GNU_SOURCE) 685 #if defined(__linux__) && defined(_GNU_SOURCE)