Skip to contentSkip to conversation

scripts: kconfig: qconf.cc: fix a compiliation error when using make xconfig

PATCH In review Tiana Rakotovao Andriamahefa 2 participants 4 messages Jan 13, 2013 – Jan 15, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: kconfig: qconf.cc: fix a compiliation error when using make xconfig

When using make xconfig, the following compilation error appears :
/usr/include/qt3/qvaluelist.h:427:13: error: ‘ptrdiff_t’ does not name a type
Including stddef.h in scripts/kconfig/qconf.cc permits to avoid this error.

---
 scripts/kconfig/qconf.cc |    1 +
 1 file changed, 1 insertion(+)
scripts/kconfig/qconf.cc +1 -0
index df274fe..1500c38 100644
@@ -6,6 +6,7 @@
 #include <qglobal.h>
 
 #if QT_VERSION < 0x040000
+#include <stddef.h>
 #include <qmainwindow.h>
 #include <qvbox.h>
 #include <qvaluelist.h>
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 3 lines · Tiana Rakotovao Andriamahefa

When using make xconfig, the following compilation error appears :
/usr/include/qt3/qvaluelist.h:427:13: error: ‘ptrdiff_t’ does not name a type
Including stddef.h in scripts/kconfig/qconf.cc permits to avoid this error.

This is a bug in the Qt header. Is Qt3 still maintained?

Michal

#2 lore raw
Quoted 6 lines · Michal Marek
Quoted 3 lines · Tiana Rakotovao Andriamahefa

When using make xconfig, the following compilation error appears :
/usr/include/qt3/qvaluelist.h:427:13: error: ‘ptrdiff_t’ does not name a type
Including stddef.h in scripts/kconfig/qconf.cc permits to avoid this error.

This is a bug in the Qt header. Is Qt3 still maintained?

This seems to be a common c++ issue since the begining of 2011.

Some Qt3 headers use ptrdiff_t which is defined in stddef.h. They also use some c++ headers, and rely on them to include stddef.h. However, since GCC-4.6, those c++ headers do not include stddef.h anymore. So, include <stddef.h> fixes it.

This issue is reported here: http://gcc.gnu.org/gcc-4.6/porting_to.html?

Signature · 1 line
Tiana Rakotovao Andriamahefa
#3 lore raw
Quoted 6 lines · Tiana Rakotovao Andriamahefa
Quoted 5 lines · Michal Marek
Quoted 3 lines · Tiana Rakotovao Andriamahefa

When using make xconfig, the following compilation error appears :
/usr/include/qt3/qvaluelist.h:427:13: error: ‘ptrdiff_t’ does not name a type
Including stddef.h in scripts/kconfig/qconf.cc permits to avoid this error.

Quoted 8 lines
Quoted 1 line

This is a bug in the Qt header. Is Qt3 still maintained?

This seems to be a common c++ issue since the begining of 2011.

Some Qt3 headers use ptrdiff_t which is defined in stddef.h. They also use some c++ headers, and rely on them to include stddef.h. However, since GCC-4.6, those c++ headers do not include stddef.h anymore. So, include <stddef.h> fixes it.

Right. My question is - is Qt3 still maintained somehow, so the includes can be added where they belong, or do we need to workaround in in the applications?

Michal