… | |
… | |
43 | # include EV_CONFIG_H |
43 | # include EV_CONFIG_H |
44 | # else |
44 | # else |
45 | # include "config.h" |
45 | # include "config.h" |
46 | # endif |
46 | # endif |
47 | |
47 | |
48 | #if HAVE_FLOOR |
48 | # if HAVE_FLOOR |
49 | # ifndef EV_USE_FLOOR |
49 | # ifndef EV_USE_FLOOR |
50 | # define EV_USE_FLOOR 1 |
50 | # define EV_USE_FLOOR 1 |
|
|
51 | # endif |
51 | # endif |
52 | # endif |
52 | #endif |
|
|
53 | |
53 | |
54 | # if HAVE_CLOCK_SYSCALL |
54 | # if HAVE_CLOCK_SYSCALL |
55 | # ifndef EV_USE_CLOCK_SYSCALL |
55 | # ifndef EV_USE_CLOCK_SYSCALL |
56 | # define EV_USE_CLOCK_SYSCALL 1 |
56 | # define EV_USE_CLOCK_SYSCALL 1 |
57 | # ifndef EV_USE_REALTIME |
57 | # ifndef EV_USE_REALTIME |
… | |
… | |
256 | # else |
256 | # else |
257 | # define EV_USE_CLOCK_SYSCALL 0 |
257 | # define EV_USE_CLOCK_SYSCALL 0 |
258 | # endif |
258 | # endif |
259 | #endif |
259 | #endif |
260 | |
260 | |
|
|
261 | #if !(_POSIX_TIMERS > 0) |
|
|
262 | # ifndef EV_USE_MONOTONIC |
|
|
263 | # define EV_USE_MONOTONIC 0 |
|
|
264 | # endif |
|
|
265 | # ifndef EV_USE_REALTIME |
|
|
266 | # define EV_USE_REALTIME 0 |
|
|
267 | # endif |
|
|
268 | #endif |
|
|
269 | |
261 | #ifndef EV_USE_MONOTONIC |
270 | #ifndef EV_USE_MONOTONIC |
262 | # if defined _POSIX_MONOTONIC_CLOCK && _POSIX_MONOTONIC_CLOCK >= 0 |
271 | # if defined _POSIX_MONOTONIC_CLOCK && _POSIX_MONOTONIC_CLOCK >= 0 |
263 | # define EV_USE_MONOTONIC EV_FEATURE_OS |
272 | # define EV_USE_MONOTONIC EV_FEATURE_OS |
264 | # else |
273 | # else |
265 | # define EV_USE_MONOTONIC 0 |
274 | # define EV_USE_MONOTONIC 0 |
… | |
… | |
506 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
515 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
507 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
516 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
508 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- |
517 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- |
509 | * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
518 | * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
510 | * OF THE POSSIBILITY OF SUCH DAMAGE. |
519 | * OF THE POSSIBILITY OF SUCH DAMAGE. |
|
|
520 | * |
|
|
521 | * Alternatively, the contents of this file may be used under the terms of |
|
|
522 | * the GNU General Public License ("GPL") version 2 or any later version, |
|
|
523 | * in which case the provisions of the GPL are applicable instead of |
|
|
524 | * the above. If you wish to allow the use of your version of this file |
|
|
525 | * only under the terms of the GPL and not to allow others to use your |
|
|
526 | * version of this file under the BSD license, indicate your decision |
|
|
527 | * by deleting the provisions above and replace them with the notice |
|
|
528 | * and other provisions required by the GPL. If you do not delete the |
|
|
529 | * provisions above, a recipient may use your version of this file under |
|
|
530 | * either the BSD or the GPL. |
511 | */ |
531 | */ |
512 | |
532 | |
513 | #ifndef ECB_H |
533 | #ifndef ECB_H |
514 | #define ECB_H |
534 | #define ECB_H |
515 | |
535 | |
… | |
… | |
794 | #define ecb_decltype(x) __decltype(x) |
814 | #define ecb_decltype(x) __decltype(x) |
795 | #elif ECB_GCC_VERSION(3,0) |
815 | #elif ECB_GCC_VERSION(3,0) |
796 | #define ecb_decltype(x) __typeof(x) |
816 | #define ecb_decltype(x) __typeof(x) |
797 | #endif |
817 | #endif |
798 | |
818 | |
|
|
819 | #if _MSC_VER >= 1300 |
|
|
820 | #define ecb_deprecated __declspec(deprecated) |
|
|
821 | #else |
|
|
822 | #define ecb_deprecated ecb_attribute ((__deprecated__)) |
|
|
823 | #endif |
|
|
824 | |
799 | #define ecb_noinline ecb_attribute ((__noinline__)) |
825 | #define ecb_noinline ecb_attribute ((__noinline__)) |
800 | #define ecb_unused ecb_attribute ((__unused__)) |
826 | #define ecb_unused ecb_attribute ((__unused__)) |
801 | #define ecb_const ecb_attribute ((__const__)) |
827 | #define ecb_const ecb_attribute ((__const__)) |
802 | #define ecb_pure ecb_attribute ((__pure__)) |
828 | #define ecb_pure ecb_attribute ((__pure__)) |
803 | |
829 | |
|
|
830 | /* http://msdn.microsoft.com/en-us/library/k6ktzx3s.aspx __declspec(noreturn) */ |
804 | #if ECB_C11 |
831 | #if ECB_C11 |
805 | #define ecb_noreturn _Noreturn |
832 | #define ecb_noreturn _Noreturn |
806 | #else |
833 | #else |
807 | #define ecb_noreturn ecb_attribute ((__noreturn__)) |
834 | #define ecb_noreturn ecb_attribute ((__noreturn__)) |
808 | #endif |
835 | #endif |