1
0
Fork 0
forked from nuttx/nuttx-update

Make 64-bit time_t unsigned

* 32-bit time_t should be unsigned because otherwise it wraps too
  soon. (in 2038)

* 64-bit time_t should be unsigned because it should be consistent
  within NuttX.

* While signed time_t seems more popular among other OSes, the
  consisitency within NuttX outweighs, IMO.
This commit is contained in:
YAMAMOTO Takashi 2023-01-20 18:42:31 +09:00 committed by Xiang Xiao
parent 8a389a06e1
commit 892ecb4e40

View file

@ -109,7 +109,7 @@
/* Scalar types */
#ifdef CONFIG_SYSTEM_TIME64
typedef int64_t time_t; /* Holds time in seconds */
typedef uint64_t time_t; /* Holds time in seconds */
#else
typedef uint32_t time_t; /* Holds time in seconds */
#endif