BSD file flags support in Cygwin?
Corinna Vinschen
corinna-cygwin@cygwin.com
Wed Nov 15 07:59:00 GMT 2017
On Nov 14 19:17, Bill Zissimopoulos wrote:
> Corinna, thanks for your answer.
>> My question was largely to confirm my understanding as I probably do not
> have time to produce such a patch currently. For the benefit of the
> discussion and to assist any future attempts at doing this:
>> Chflags(2) and friends would be relatively easy to implement. OTOH the
> BSD’s and OSX use stat(2) to report file flags in st_flags. Since Cygwin
> lacks an st_flags field, we would have to somehow change struct stat to
> accommodate it. Do you have guidance on how to handle such a change? Would
> you even want such a change? [I suspect not.]
You're right. Struct stat is exposed to user space so changing this is
bound to break existing applications. We *might* get away lightly with
just adding a member to the end as in this case, but is the support for
DOS flags actually worth it? It's still a hassle to support new and old
apps in Cygwin in such cases.
> [I know some OS’es have had to deal with stat(2) changes over the years,
> but I am not as familiar with Cygwin history.]
An executable has the version info of the Cygwin version at the
time of building compiled in. This is used in Cygwin to check
what an executable expects.
See winsup/cygwin/include/cygwin/version.h and the usage of the
checks throughout the code.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20171115/20953eba/attachment.sig>
More information about the Cygwin
mailing list