mirror of
https://github.com/apache/nuttx.git
synced 2026-05-25 18:27:56 +08:00
sys/time.h: Fix timersub macro; time_t is unsigned
This commit is contained in:
@@ -11263,3 +11263,4 @@
|
||||
struct sigevent. This initial implementation will only work in the
|
||||
FLAT build. See the top-level TODO file for additional details
|
||||
(2015-12-30).
|
||||
|
||||
|
||||
+3
-3
@@ -50,7 +50,7 @@
|
||||
#include <stdbool.h> /* C99 boolean types */
|
||||
#include <unistd.h> /* For getpid */
|
||||
#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 */
|
||||
|
||||
/********************************************************************************
|
||||
@@ -441,8 +441,8 @@ int pthread_sigmask(int how, FAR const sigset_t *set, FAR sigset_t *oset);
|
||||
#include <sys/types.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
/* Avoid a circular dependencies by assuring that simple type definitions
|
||||
* are avaiable in any inclusion ordering.
|
||||
/* Avoid circular dependencies by assuring that simple type definitions are
|
||||
* available in any inclusion ordering.
|
||||
*/
|
||||
|
||||
#ifndef __PTHREAD_KEY_T_DEFINED
|
||||
|
||||
+4
-3
@@ -45,8 +45,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef CONFIG_SIG_EVTHREAD
|
||||
# include <pthread.h> /* Needed for pthread_attr_t */
|
||||
# include <pthread.h> /* Needed for pthread_attr_t, includes this file */
|
||||
#endif
|
||||
|
||||
/********************************************************************************
|
||||
@@ -320,8 +321,8 @@ int sigqueue(int pid, int signo, FAR void *sival_ptr);
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* Avoid a circular dependencies by assuring that simple type definitions
|
||||
* are avaiable in any inclusion ordering.
|
||||
/* Avoid circular dependencies by assuring that simple type definitions are
|
||||
* available in any inclusion ordering.
|
||||
*/
|
||||
|
||||
#ifndef __SIGSET_T_DEFINED
|
||||
|
||||
+3
-3
@@ -78,12 +78,12 @@
|
||||
do \
|
||||
{ \
|
||||
(vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
|
||||
(vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
|
||||
if ((vvp)->tv_usec < 0) \
|
||||
if ((uvp)->tv_usec > (tvp)->tv_usec) \
|
||||
{ \
|
||||
(vvp)->tv_sec--; \
|
||||
(vvp)->tv_usec += 1000000; \
|
||||
(tvp)->tv_usec += 1000000; \
|
||||
} \
|
||||
(vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user