Mario Charest
|
RE: Including sys/neutrino.h not possible when enabling gcc for
upcoming C++ standard
|
Mario Charest
04/08/2010 12:50 PM
post51341
|
RE: Including sys/neutrino.h not possible when enabling gcc for
upcoming C++ standard
I get no error when using 6.5 M8
> -----Original Message-----
> From: Christian Leutloff [mailto:community-noreply@qnx.com]
> Sent: Thursday, April 08, 2010 12:30 PM
> To: general-toolchain
> Subject: Including sys/neutrino.h not possible when enabling gcc for
> upcoming C++ standard
>
> Hi,
>
> I want to use some features of the upcoming C++ standard that are
> already available with the gcc 4.3.3. This is the compiler delivered
> with QNX SDP 6.4.1.
>
> When I added the required option to the command line using -Wc,-
> std=c++0x, even the following simple program fails to compile:
>
> #include <sys/neutrino.h>
> int main(int argc, char *argv[]) {
> return 0;
> }
>
> These is the output from the compiler:
>
> C:/QNX641/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-
> Wno-parentheses -Wc,-std=c++0x -IC:/QNX641/target/qnx6/usr/include
> -g -DVARIANT_g -DBUILDENV_qss tst.cc
> In file included from tst.cc:1:
> C:/QNX641/target/qnx6/usr/include/sys/neutrino.h:169: error: field
> 'itime' has incomplete type
> C:/QNX641/target/qnx6/usr/include/sys/neutrino.h:169: error: field
> 'otime' has incomplete type
>
> I have already tried to include sys/types.h in front of sys/neutrino.h
> but it does not help.
>
> itime and otime are both defined as struct _itimer. This in turn is
> defined in sys/types.h as
> struct _itimer __ITIMER;
>
> Any ideas how to fix this issue or how to work around it?
>
> TiA
> Christian
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post51340
>
|
|
|
Ryan Mansfield(deleted)
|
Re: Including sys/neutrino.h not possible when enabling gcc for upcoming
C++ standard
|
Ryan Mansfield(deleted)
04/08/2010 1:07 PM
post51343
|
Re: Including sys/neutrino.h not possible when enabling gcc for upcoming
C++ standard
Christian Leutloff wrote:
> Hi,
>
> I want to use some features of the upcoming C++ standard that are already available with the gcc 4.3.3. This is the
compiler delivered with QNX SDP 6.4.1.
>
> When I added the required option to the command line using -Wc,-std=c++0x, even the following simple program fails to
compile:
>
> #include <sys/neutrino.h>
> int main(int argc, char *argv[]) {
> return 0;
> }
>
> These is the output from the compiler:
>
> C:/QNX641/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -Wc,-std=c++0x -IC:/QNX641/
target/qnx6/usr/include -g -DVARIANT_g -DBUILDENV_qss tst.cc
> In file included from tst.cc:1:
> C:/QNX641/target/qnx6/usr/include/sys/neutrino.h:169: error: field 'itime' has incomplete type
> C:/QNX641/target/qnx6/usr/include/sys/neutrino.h:169: error: field 'otime' has incomplete type
>
> I have already tried to include sys/types.h in front of sys/neutrino.h but it does not help.
>
> itime and otime are both defined as struct _itimer. This in turn is defined in sys/types.h as
> struct _itimer __ITIMER;
>
> Any ideas how to fix this issue or how to work around it?
This was fixed under PR73060, rev249147. Here's the diff.
--- trunk/services/system/public/sys/neutrino.h 2009/09/28 16:22:25 231242
+++ trunk/services/system/public/sys/neutrino.h 2010/01/07 15:48:18 249147
@@ -165,6 +169,16 @@
#define _NTO_TIMER_SEARCH 0x00000001
#define _NTO_TIMER_RESET_OVERRUNS 0x00000002
+#if defined(__CLOCKADJUST)
+struct _clockadjust __CLOCKADJUST;
+#undef __CLOCKADJUST
+#endif
+
+#if defined(__ITIMER)
+struct _itimer __ITIMER;
+#undef __ITIMER
+#endif
+
#ifdef __TIMER_INFO
struct _timer_info __TIMER_INFO;
#undef __TIMER_INFO
Regards,
Ryan Mansfield
|
|
|