This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: MinGW compilation errors due to strcasecmp
Hi Eli,
> > > windows-nat.c: In function 'so_list* windows_make_so(const char*, LPVOID)':
> > > windows-nat.c:608:35: error: 'strcasecmp' was not declared in this scope
> > > if (strcasecmp (buf, "ntdll.dll") == 0)
> > > ^
> > > windows-nat.c: In function 'int envvar_cmp(const void*, const void*)':
> > > windows-nat.c:2031:28: error: 'strcasecmp' was not declared in this scope
> > > return strcasecmp (*p, *q);
> > > ^
> > > Makefile:1134: recipe for target `windows-nat.o' failed
> > > make[2]: *** [windows-nat.o] Error 1
> > >
> > > A similar error happens in stap-probe.c.
> > >
> > > The reason for this is that MinGW runtime changed the place where the
> > > prototypes of strcasecmp and strncasecmp are declared: they are now in
> > > strings.h (which AFAIU is more compatible to other systems). But we
> > > don't include strings.h anywhere, although the configure script probes
> > > for it. I guess other platforms include that header indirectly
> > > somehow.
> > >
> > > My suggestion is to include it in common-defs.h, as shown below.
> > >
> > > Is it okay to push such a change to the repository (with a suitable
> > > ChangeLog entry, of course)?
> >
> > Sure.
>
> Pushed to master and cherry-picked to the 7.12 branch.
Was there a PR number of this issue? Once the first release is
out for a given branch, the protocol is to make sure that every
change that goes in is attached to a PR number, and that either:
- This PR number is listed as done in the Wiki page for that release; or
- The PR's milestone is set to the (minor) release the fix is in.
That way, it's easy for me to announce the fixes in a corrective
release. Otherwise, I have to go dig each commit (lost in the sea
of daily version number updates), and figure out what they fix.
Thanks,
--
Joel