build: fix unsigned time_t detection for cmake, MS-DOS, AmigaOS

- cmake: add auto-detection. Sync this with autotools.
- enable for MS-DOS and AmigaOS builds.
  (auto-detection doesn't work for cross-builds.)
- tidy up detection snippet.
- fix comment.

Closes #15868
This commit is contained in:
Viktor Szakats 2024-12-30 20:57:41 +01:00
parent f60f872bcd
commit 10fe952da0
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
4 changed files with 41 additions and 18 deletions

View file

@ -170,6 +170,7 @@ set(HAVE_POSIX_STRERROR_R 0)
set(HAVE_MSG_NOSIGNAL 0)
set(HAVE_STRUCT_TIMEVAL 1)
set(HAVE_STRUCT_SOCKADDR_STORAGE 1)
set(HAVE_TIME_T_UNSIGNED 0)
set(HAVE_GETHOSTBYNAME_R_3 0)
set(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0)