This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project. See the Cygwin home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

Re: glob_t, glob(), glob.h or similar : where in B20.1 ?



Sebastien Barre <Sebastien.Barre@utc.fr> writes:
> I was wondering : where is glob.h ? 
> 
> I guess it's not "mandatory" or "standard", but I'm using the glob.h
> functions (glob()) and structures (glob_t & so on) in my sources, and was
> wondering :
> 
> 	- where are the similar functions in B20.1 ?
> 	- how can I emulate this in C in an efficient way ? 
> 
> I'm a bit surprised : these "globbing" features are quite common (and
> therefore API), how where they ported to cygwin32 ?

The glob functions are not part of POSIX.1, but I believe proposed for 
POSIX.2 (is it approved yet?). Cygwin winsup sources do have it, but
these are not exported.

I'll send a patch to cygwin folks. It's of course up to the Cygwin team 
to decide whether to export it or not.

Your best bet for now is to just take the glob.c and glob.h from winsup
sources (or some other GNU package the contain it, eg., make) and use 
that. If you don't have the Cygwin sources, you can get just the 
directory from Cygnus ftp server:
  ftp://sourceware.cygnus.com/pub/cygwin/latest/src-by-top-dir/

get the winsup.tar.bz2.
  
  $ bunzip2 -c winsup.tar.bz2 | \
    tar xvf - src/winsup/glob.h src/winsup/glob.c

will extract the two files. 

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com