This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Avoid collisions between parallel installations of Cygwin


On Tue, Oct 13, 2009 at 02:02:51PM -0400, Charles Wilson wrote:
>cgf wrote:
>> So, while it might be neat to put these in the resource section, isn't
>> that normally ASCII data?  Or is it binary too?  It's been too long
>> since I played with that.
>
>No, you can store binary data in a resource section using RCDATA. It's a
>bit tricky to store streams of bytes (other than strings), but it can be
>done. And WORDs or DWORDs are easy, although you have to worry about
>alignment when switching between data types (the entire RCDATA resource
>will be DWORD aligned to start with).
>
>windres -o foo_res.o -i foo_res.rc
>gcc -o foo.o -c foo.c
>gcc -o foo.exe foo.o foo_res.o
>./foo.exe
>
>If we add the discussed functionality and make it an option, it makes
>sense to me to do it using resources ('course we'd need to provide a
>(native win32) user tool to manipulate it). That way, it can be
>interpreted by cygwin exactly once on load with no additional disk
>access, and there's no question about changing (say /bin/.cygwinrc)
>while the DLL is loaded and wondering why it hasn't taken effect -- in
>this case, while the DLL is loaded you can't modify it.
>
>And...by changing the DLL, you change its checksum so we could easily
>distinguish a modified DLL from the real distributed ones, even without
>the manipulation tool. Just compare md5sums.
>
>It seems to me that this sort of thing is very different from the type
>of stuff we use the CYGWIN variable for...

Yes, ditto.  I don't think it makes sense to make this an environment
variable.  I think that's too broad of a brush for this problem.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]