00001 //---------------------------------------------------------------------------------- 00002 // 1. The Original Code is Mozilla code. 00003 // The Initial Developer of the Original Code is Mozilla Foundation. 00004 // Portions created by the Initial Developer are Copyright (C) 2010 the Initial Developer. All Rights Reserved. 00005 // Contributor(s): Taras Glek <tglek@mozilla.com> 00006 // 2. Created from the OSX-specific code from Mozilla's mozilla::fallocation() function. 00007 // Adaptation (C) 2015,2016 R.J.V. Bertin for KDE, project. 00008 // 00009 // Original license allows modification / redistribution under LGPL 2.1 or higher. 00010 //---------------------------------------------------------------------------------- 00011 // XRootD is free software: you can redistribute it and/or modify 00012 // it under the terms of the GNU Lesser General Public License as published by 00013 // the Free Software Foundation, either version 3 of the License, or 00014 // (at your option) any later version. 00015 // 00016 // XRootD is distributed in the hope that it will be useful, 00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 // GNU General Public License for more details. 00020 // 00021 // You should have received a copy of the GNU Lesser General Public License 00022 // along with XRootD. If not, see <http://www.gnu.org/licenses/>. 00023 //---------------------------------------------------------------------------------- 00024 00025 // Implementation of posix_allocate for OSX. 00026 00027 #ifdef __APPLE__ 00028 00029 extern int posix_fallocate(int fd, off_t offset, off_t len); 00030 00031 #else 00032 00033 #include <fcntl.h> 00034 00035 #endif