Re: texinfo-7.2.90 on mingw [glob function missing]

[email protected]
Newsgroups gmane.comp.tex.texinfo.bugs
Message-ID <[email protected]>
On Sun, Jan 25, 2026 at 05:13:09PM +0000, Gavin Smith wrote:
> On Sat, Jan 17, 2026 at 05:50:44PM +0100, [email protected] wrote:
> > On Sat, Jan 17, 2026 at 01:43:52PM +0200, Eli Zaretskii wrote:
> > > What is 'glob' used for?
> > 
> >   xasprintf (&glob_format, "%s/*.cnf", cnf_dir);
> > 
> >   glob_status = glob (glob_format, 0, 0, &possible_files);
> > 
> > >  Perhaps it would be possible to write native
> > > Windows code to achieve the same, since Windows APIs for finding files
> > > by their wildcards do exist.  As long as the code doesn't need any
> > > 'glob'-specific features and doesn't use Unix-style wildcards like
> > > "*.[ch]", replacing it with Windows native code shouldn't be
> > > difficult.
> > 
> > Given that the use is basic, it should be possible.  But I think that
> > using the Gnulib version is the least demanding in term of code, need
> > for specific testing, which is why it has my favor.
> 
> Here's a patch to use opendir/readdir instead.  I don't think it is
> much harder to understand than the code using glob.  (I have tested it,
> although there is always a chance there is a bug in my code.)

Looks good to me.  I agree that it is quite straightforward.

-- 
Pat
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.