diff options
author | Steve Bennett <steveb@workware.net.au> | 2023-06-17 00:52:12 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2023-06-20 12:46:21 +1000 |
commit | 9e78cc8a97b7ecf6afbbe9a35305daf3459cead6 (patch) | |
tree | 64af616586f7ab30e7652fad72a846392220eede /auto.def | |
parent | 5246daeb5d517ef4d68834537862e928961f6a41 (diff) | |
download | jimtcl-9e78cc8a97b7ecf6afbbe9a35305daf3459cead6.zip jimtcl-9e78cc8a97b7ecf6afbbe9a35305daf3459cead6.tar.gz jimtcl-9e78cc8a97b7ecf6afbbe9a35305daf3459cead6.tar.bz2 |
file: use 64 bit stat functions if necessary
Some 32 bit systems may require explicit use of stat64, etc.
Fixes #263
Diffstat (limited to 'auto.def')
-rw-r--r-- | auto.def | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -257,7 +257,7 @@ if {[cc-check-function-in-lib socket socket]} { define-append LDLIBS [get-define lib_socket] } -cc-check-functions ualarm lstat fork system select execvpe +cc-check-functions ualarm fork system select execvpe cc-check-functions geteuid mkstemp isatty cc-check-functions regcomp waitpid sigaction sys_signame sys_siglist isascii cc-check-functions syslog opendir readlink sleep usleep pipe getaddrinfo utimes @@ -301,6 +301,14 @@ cc-with {-includes fcntl.h} { } cc-check-lfs + +if {[get-define _FILE_OFFSET_BITS] != 64 || ![cc-check-functions stat64]} { + # Modern systems and really old systems have plain stat, fstat, lstat + cc-check-functions fstat lstat +} else { + # But perhaps some 32 bit systems still require explicit use of the 64 bit versions + cc-check-functions fstat64 lstat64 +} cc-check-functions fseeko ftello define TCL_LIBRARY [get-define libdir]/jim |