You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/10/19 04:30:06 UTC

[GitHub] [incubator-nuttx] yamt edited a comment on pull request #4693: time:follow POSIX use int64_t to define time_t

yamt edited a comment on pull request #4693:
URL: https://github.com/apache/incubator-nuttx/pull/4693#issuecomment-946357628


   > > as far as i know, unsigned time_t is allowed by posix.  this change requires more explanation than "follow posix".
   > 
   > ISO-C allow signed or unsigned time_t, but POSIX require the signed integer: https://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/types.h.html
   
   the page says:
   
   > time_t and clock_t shall be integer or real-floating types.
   
   iirc the more recent versions of posix require it to be an integer.
   but i'm not aware of a version which requires signed.
   
   > From this thread: https://stackoverflow.com/questions/471248/what-is-time-t-ultimately-a-typedef-to Most Unix variant OS use signed integer represent time_t, so it's better to follow the common practice to improve the compability.
   
   i tend to agree, while i have a vague concern about using 64-bit types for small devices.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org