Re: Fix module loading for OpenBSD

2022-12-09 Thread Chet Ramey

On 12/8/22 2:10 PM, Christian Weisgerber wrote:

Dynamic loading of modules is broken on OpenBSD:

bash-5.2$ enable finfo
bash:/usr/local/lib/bash/finfo: undefined symbol 'sh_optind'
bash:/usr/local/lib/bash/finfo: undefined symbol 'sh_optarg'
bash: enable: finfo: not a shell builtin

This is trivially fixed, configure simply needs to add -rdynamic to
the build flags.


Thanks for the report. I don't use OpenBSD (or FreeBSD for that matter),
so I rely on users to update stuff like this.

--
``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: loadables/finfo: fix time_t printing

2022-12-09 Thread Chet Ramey

On 12/8/22 2:19 PM, Christian Weisgerber wrote:

loadables/finfo.c uses the %ld format string to print time_t values.
This is wrong on OpenBSD, where time_t is long long on all platforms.

I suggest %lld and a cast to long long.
Alternatively, %jd and intmax_t could be used.


Thanks for the report. I chose the second option.

--
``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/