Re: [PATCH] Portability of dash to legacy systems, such as AT&T Unix PC : 02-stat64
Herbert Xu <[email protected]> Sun, 9 Mar 2025 15:54:22 +0800
| Newsgroups | org.kernel.vger.dash |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Nov 12, 2024 at 11:32:47PM +0100, Alain Knaff wrote: . > Checking for declarations rather than functions would miss a > hypothetical situation where a library function stat64 would exists > which lacks a prototype declaration. However, this is very unlikely to > happen in practice, because general availability of prototypes of > system function predates availability of 64 bit file offset by years. Apparently this is what prompted the change in the first place: commit 6f6d1f2da03468c0e131fdcbdcfa9771ffca2614 Author: Herbert Xu <[email protected]> Date: Wed May 26 13:49:39 2021 +0800 shell: Call CHECK_DECL on stat64 On macOS it is possible to find stat64 at link-time but not at compile-time. To make the build process more robust we should check for the header file as well as the library. Reported-by: Saagar Jha <[email protected]> Signed-off-by: Herbert Xu <[email protected]> > 3. and finally, is the whole shebang actually needed if we use > AC_SYS_LARGEFILE? This autoconf directive adds an appropriate > #define before inclusion of system files to instruct them to make > the relevant system calls "64-bit clean". That way we wouldn't need > to mess around with redefining stat64 our-self. Yes I think this is the way to go. Thanks, -- Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt