The MinGW.OSDN Windows System Libraries. Formerly designated as "MinGW.org Windows System Libraries", this encapsulates the "mingwrt" C runtime library extensions, and the "w32api" 32-bit MS-Windows API libraries.
Please note that this project no longer owns the "MinGW.org" domain name; any software which may be distributed from that domain is NOT supported by this project.
リビジョン | d7a8655ff94cf06f4558a4a7d2b57c30ba2b5f47 (tree) |
---|---|
日時 | 2018-09-03 04:28:38 |
作者 | Keith Marshall <keith@user...> |
コミッター | Keith Marshall |
Make clockapi symbolic constants #ifdef detectable.
@@ -1,3 +1,11 @@ | ||
1 | +2018-09-02 Keith Marshall <keith@users.osdn.me> | |
2 | + | |
3 | + Make clockapi symbolic constants #ifdef detectable. | |
4 | + | |
5 | + * mingwex/clockapi.c (CLOCK_REALTIME, CLOCK_MONOTONIC): Add "const". | |
6 | + * include/time.h (CLOCK_REALTIME, CLOCK_MONOTONIC): Likewise; also | |
7 | + define both as self-referencing macros. | |
8 | + | |
1 | 9 | 2018-08-26 Keith Marshall <keith@users.osdn.me> |
2 | 10 | |
3 | 11 | Circumvent <process.h> testsuite failure with GCC-7+. |
@@ -6,7 +6,7 @@ | ||
6 | 6 | * $Id$ |
7 | 7 | * |
8 | 8 | * Written by Colin Peters <colin@bird.fu.is.saga-u.ac.jp> |
9 | - * Copyright (C) 1997-2007, 2011, 2015, 2016, MinGW.org Project. | |
9 | + * Copyright (C) 1997-2007, 2011, 2015-2018, MinGW.org Project. | |
10 | 10 | * |
11 | 11 | * |
12 | 12 | * Permission is hereby granted, free of charge, to any person obtaining a |
@@ -440,8 +440,14 @@ typedef struct __clockid__ *clockid_t; | ||
440 | 440 | |
441 | 441 | /* The standard clockid_t entities which we choose to support. |
442 | 442 | */ |
443 | -extern clockid_t CLOCK_REALTIME; | |
444 | -extern clockid_t CLOCK_MONOTONIC; | |
443 | +extern clockid_t const CLOCK_REALTIME; | |
444 | +extern clockid_t const CLOCK_MONOTONIC; | |
445 | + | |
446 | +/* Ensure that these clock implementations are detectable via | |
447 | + * preprocessor #ifdef names. | |
448 | + */ | |
449 | +#define CLOCK_REALTIME CLOCK_REALTIME | |
450 | +#define CLOCK_MONOTONIC CLOCK_MONOTONIC | |
445 | 451 | |
446 | 452 | /* Prototypes for the standard POSIX functions which provide the |
447 | 453 | * API to these standard clockid_t entities. |
@@ -50,8 +50,8 @@ static struct __clockid__ clock_api[] = | ||
50 | 50 | |
51 | 51 | /* Publicly visible references to the preceding (opaque) clock definitions. |
52 | 52 | */ |
53 | -clockid_t CLOCK_REALTIME = &clock_api[CLOCK_TYPE_REALTIME]; | |
54 | -clockid_t CLOCK_MONOTONIC = &clock_api[CLOCK_TYPE_MONOTONIC]; | |
53 | +clockid_t const CLOCK_REALTIME = &clock_api[CLOCK_TYPE_REALTIME]; | |
54 | +clockid_t const CLOCK_MONOTONIC = &clock_api[CLOCK_TYPE_MONOTONIC]; | |
55 | 55 | |
56 | 56 | CLOCK_INLINE |
57 | 57 | int64_t clock_api_getres_interval( clockid_t clock_api ) |