This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [patch/rebase] Fix build problems in imagehelper
On Jun 20 13:14, Charles Wilson wrote:
> On 6/20/2011 12:22 PM, Corinna Vinschen wrote:
> > On Jun 20 11:52, Jason Tishler wrote:
> >> I would like to give Chuck a chance to apply the following patch that he
> >> had already submitted (so it applies cleanly):
> >>
> >> * autoconfify rebase and imagehelper
> >> * make peflagsall and rebaseall set PATH to
> >> (dir-of-$0):(configured $bindir):/bin
> >> for better relocate-ability.
> >> * fix a number of warnings related to deprecated cygwin functions;
> >> use cygwin_create_path rather than cygwin_conv_, if available. (1)
> >> * add some fixes/workarounds for MSYS
> >> * some accommodations to use explicitly 'dash' rather than 'ash',
> >> if desired.
> >> * Add explicit COPYING file for GPLv2.
>
> Perhaps we should consider using GPLv3+ at this point? Can we contact
> Ralf Habacker for permission, with regards to libimagehelp?
I agree, GPLv3+ would be preferrable.
> >> * Update build.sh to accommodate MinGW and MSYS, as well as Cygwin.
> >> * Add getopt_long implementation to workaround broken impl on MSYS
> >> (only built if $host=MSYS)
> >>
> >> Is that OK?
> >
> > No worries, I can wait.
> >
> > Chuck, I would rather use cygwin_conv_path together with a static buffer
> > instead of cygwin_create_path. Win32Path is called within the
> > CreateFile argument list. The memory allocated in Win32Path is never
> > free'd...
>
> You mean a single 32K (see below) buffer, on the stack? Yikes... We'd
> be better off with a global static variable, malloc'ed in main().
>
> > Also, it would be nice to call CreateFileW rather than CreateFile to
> > accommodate potential native characters in the pathname. I already have
> > a local patch which calls setlocale in rebase to support this.
>
> ...and this is why you'd need 32K instead of "merely" 4k, right?
PATH_MAX = 4K should be enough. I'm not even sure it's really
necessary. DLL paths referenced in the PEB can't be longer than
MAX_PATH, it seems. But a global static buffer is ok, too.
> I have no real issue with these changes -- other than concerns about how
> big our stack space is allowed to be in a single frame
The default application stack is 2 Megs and there's usually no problem
to have a frame of more than 32K.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat