-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move implementation of osx posix_fallocate to XrdSysFallocate.
- Loading branch information
Showing
5 changed files
with
46 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
//---------------------------------------------------------------------------------- | ||
// 1. The Original Code is Mozilla code. | ||
// The Initial Developer of the Original Code is Mozilla Foundation. | ||
// Portions created by the Initial Developer are Copyright (C) 2010 the Initial Developer. All Rights Reserved. | ||
// Contributor(s): Taras Glek <tglek@mozilla.com> | ||
// 2. Created from the OSX-specific code from Mozilla's mozilla::fallocation() function. | ||
// Adaptation (C) 2015,2016 R.J.V. Bertin for KDE, project. | ||
// | ||
// Original license allows modification / redistribution under LGPL 2.1 or higher. | ||
//---------------------------------------------------------------------------------- | ||
// XRootD is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Lesser General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// XRootD is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Lesser General Public License | ||
// along with XRootD. If not, see <http://www.gnu.org/licenses/>. | ||
//---------------------------------------------------------------------------------- | ||
|
||
// Implementation of posix_allocate for OSX. | ||
|
||
#ifdef __APPLE__ | ||
|
||
extern int posix_fallocate(int fd, off_t offset, off_t len); | ||
|
||
#else | ||
|
||
#include <fcntl.h> | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fbbae41
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost. I see that the obvioous place in the cmakle file is not so obvious. Normally, we list these in alphabetic order could you rearrange the "XrdSys/XrdSysFallocate.cc XrdSys/XrdSysFallocate.hh" to be in the right collating sequence?