[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[dsdp-tcf-dev] [Bug 311952] New: Build fix for MinGW build of TCF agent
|
https://bugs.eclipse.org/bugs/show_bug.cgi?id=311952
Product/Component: Target Management / TCF
Summary: Build fix for MinGW build of TCF agent
Classification: DSDP
Product: Target Management
Version: 3.2
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P3
Component: TCF
AssignedTo: dsdp.tm.tcf-inbox@xxxxxxxxxxx
ReportedBy: ed.swartz@xxxxxxxxx
QAContact: martin.oberhuber@xxxxxxxxxxxxx
We build the Windows TCF agent using Mingw 3.4.5. We include some C++ sources
in our side, and when using these, the compiler issues errors due to this line
in mdep.h:
(line 131)
#define snprintf _snprintf
with such reports as, e.g.:
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/cstdio:167:
error: `::snprintf' has not been declared
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/cstdio:177:
error: `__gnu_cxx::snprintf' has not been declared
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/mingw32/bits/c++locale.h:72:
error: `snprintf' is not a member of `std'
This kind of #define pattern seems like an MSVC-ism (to access extension
functions which aren't in standard C). This pattern seems to be unnecessary in
GCC-derived builds.
Is it safe to just guard these as:
(mdep.h line 128)
#ifdef _MSC_VER
#define utimbuf _utimbuf
#define utime _utime
#define futime _futime
#define snprintf _snprintf
#endif
I did this and the build succeeded under MinGW, so it seems safe...
--
Configure bugmail: https://bugs.eclipse.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.