Re: The loadables are built during install
On 9/7/18 4:39 PM, Christian Weisgerber wrote: > There is an issue in the build framework of bash 4.4.23 (and 5.0-alpha): > "make all" does not build examples/loadables. True. Not that many people want them if they're just building the shell. You can get them if you run `make everything'. > "make install" however recurses into examples/loadables and, since > the loadable modules aren't there, proceeds to build them before > installation. Yes, if you're going to install -- not everyone does that, either -- they are part of the installation set (the result of requests for an `SDK'). So `make install' ensures they're built. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/
Re: examples/loadables/finfo.c type problems
On 9/7/18 5:28 PM, Christian Weisgerber wrote: > Compiling examples/loadables/finfo.c (bash 4.4.23, 5.0-alpha) on > OpenBSD produces various warnings about ill-matched types: Yeah, it looks like OpenBSD has some unique type sizes here. Unfortunately, there aren't portable printf format specifiers for `standard' Unix types. The easiest fix is to add a bunch of sizeof() checks, or, equivalently, add those checks to configure and end up with more SIZEOF_xxx defines, but I haven't done that just for examples. > > I was thinking about how to fix those, but then I noticed existing bad > casts in the code, e.g., > > printf("%ld\n", (long) st->st_size); > > which potentially truncate values. Pretty much all the systems bash runs on these days have 64-bit longs. How big a file do you have? But the fix is the same as above. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/
Re: examples/loadables/finfo.c type problems
Chet Ramey: > > printf("%ld\n", (long) st->st_size); > > > > which potentially truncate values. > > Pretty much all the systems bash runs on these days have 64-bit longs. > How big a file do you have? But the fix is the same as above. 32-bit platforms (IA-32, ARMv7) are still around. And BSD has had 64-bit off_t on 32-bit architectures for about a quarter century. -- Christian "naddy" Weisgerber na...@mips.inka.de