> On 28 May 2015, at 17:14, Ian Lance Taylor <i...@google.com> wrote: > > On Thu, May 28, 2015 at 5:01 AM, Tristan Gingold <ging...@adacore.com> wrote: >> >>> On 28 May 2015, at 02:26, Ian Lance Taylor <i...@google.com> wrote: >> >>> The #include <windows.h> will break cross-compilers. It's not OK for >>> trunk until that is fixed. >> >> I am confused by this comment, for two reasons: >> >> - I don’t see how that would break cross-compilers. Cross compilers >> hosted on windows are not impacted by this include when the library is >> used for the tools. When then backtrace library is used for the target, >> pecoff is not used unless the target is windows. >> So I don’t see a case where the include breaks cross-compilers. > > The way you have written the code, I'm fairly sure that it will be > compiled for an i386-coff target.
And the only coff target supported is djgpp, right ? >> - If the case exists, I don’t see how to implement backtrace within >> shared libraries: I need a windows specific function to get the list >> of DLL. > > I would be OK with a #include <windows.h> that is conditional on > something that indicates that the host (from the point of view of > libbacktrace) really is Windows. Is it ok to test if the _WIN32 macro is defined (like in libiberty) ? > The new version of the patch is OK. Thanks, now committed. Tristan.