OS X compatibility cleanups.
Reattach the licenses for the compat stuff to the source. Only build/link the compat stuff when it's needed. Rename compat/util.h so it's not confused with util.h. Move all the platform specific defines inside compat/compat.h.
This commit is contained in:
parent
ae126d1009
commit
1c80d1b784
12 changed files with 114 additions and 82 deletions
|
@ -2,7 +2,22 @@
|
|||
* clock_nanosleep.c - clock_nanosleep() replacement
|
||||
*/
|
||||
|
||||
#ifdef __APPLE__
|
||||
/***********************************************************************
|
||||
* Copyright © 2006 Rémi Denis-Courmont. *
|
||||
* This program is free software; you can redistribute and/or modify *
|
||||
* it under the terms of the GNU General Public License as published *
|
||||
* by the Free Software Foundation; version 2 of the license, or (at *
|
||||
* your option) any later version. *
|
||||
* *
|
||||
* This program 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 General Public License *
|
||||
* along with this program; if not, you can get it from: *
|
||||
* http://www.gnu.org/copyleft/gpl.html *
|
||||
***********************************************************************/
|
||||
|
||||
#include "clock_nanosleep.h"
|
||||
#include <errno.h> // for errno, EINVAL
|
||||
|
@ -45,5 +60,3 @@ int clock_nanosleep(clockid_t id, int flags, const struct timespec *ts,
|
|||
|
||||
return ret ? errno : 0;
|
||||
}
|
||||
|
||||
#endif // __APPLE__
|
|
@ -1,5 +1,3 @@
|
|||
#ifdef __APPLE__
|
||||
|
||||
#ifndef CLOCK_NANOSLEEP_H
|
||||
#define CLOCK_NANOSLEEP_H
|
||||
|
||||
|
@ -24,4 +22,3 @@ int clock_nanosleep (clockid_t id, int flags, const struct timespec *ts,
|
|||
struct timespec *ots);
|
||||
|
||||
#endif //CLOCK_NANOSLEEP_H
|
||||
#endif // __APPLE__
|
Loading…
Add table
Add a link
Reference in a new issue