sys/time.h: Fix timersub macro; time_t is unsigned
This commit is contained in:
parent
b73a7515b6
commit
b1938c065d
4 changed files with 11 additions and 9 deletions
|
@ -11263,3 +11263,4 @@
|
||||||
struct sigevent. This initial implementation will only work in the
|
struct sigevent. This initial implementation will only work in the
|
||||||
FLAT build. See the top-level TODO file for additional details
|
FLAT build. See the top-level TODO file for additional details
|
||||||
(2015-12-30).
|
(2015-12-30).
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
#include <stdbool.h> /* C99 boolean types */
|
#include <stdbool.h> /* C99 boolean types */
|
||||||
#include <unistd.h> /* For getpid */
|
#include <unistd.h> /* For getpid */
|
||||||
#include <semaphore.h> /* Needed for sem_t */
|
#include <semaphore.h> /* Needed for sem_t */
|
||||||
#include <signal.h> /* Needed for sigset_t */
|
#include <signal.h> /* Needed for sigset_t, includes this file */
|
||||||
#include <time.h> /* Needed for struct timespec */
|
#include <time.h> /* Needed for struct timespec */
|
||||||
|
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
|
@ -441,8 +441,8 @@ int pthread_sigmask(int how, FAR const sigset_t *set, FAR sigset_t *oset);
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
/* Avoid a circular dependencies by assuring that simple type definitions
|
/* Avoid circular dependencies by assuring that simple type definitions are
|
||||||
* are avaiable in any inclusion ordering.
|
* available in any inclusion ordering.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __PTHREAD_KEY_T_DEFINED
|
#ifndef __PTHREAD_KEY_T_DEFINED
|
||||||
|
|
|
@ -45,8 +45,9 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#ifdef CONFIG_SIG_EVTHREAD
|
#ifdef CONFIG_SIG_EVTHREAD
|
||||||
# include <pthread.h> /* Needed for pthread_attr_t */
|
# include <pthread.h> /* Needed for pthread_attr_t, includes this file */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
|
@ -320,8 +321,8 @@ int sigqueue(int pid, int signo, FAR void *sival_ptr);
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/* Avoid a circular dependencies by assuring that simple type definitions
|
/* Avoid circular dependencies by assuring that simple type definitions are
|
||||||
* are avaiable in any inclusion ordering.
|
* available in any inclusion ordering.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __SIGSET_T_DEFINED
|
#ifndef __SIGSET_T_DEFINED
|
||||||
|
|
|
@ -78,12 +78,12 @@
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
(vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
|
(vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
|
||||||
(vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
|
if ((uvp)->tv_usec > (tvp)->tv_usec) \
|
||||||
if ((vvp)->tv_usec < 0) \
|
|
||||||
{ \
|
{ \
|
||||||
(vvp)->tv_sec--; \
|
(vvp)->tv_sec--; \
|
||||||
(vvp)->tv_usec += 1000000; \
|
(tvp)->tv_usec += 1000000; \
|
||||||
} \
|
} \
|
||||||
|
(vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
|
||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue