Le Tue, 10 May 2011 02:42:42 +0200,
/dev/ammo42 <mickeytintincolle(a)yahoo.fr> a écrit :
Hi all,
In fact the file needing a patch to #include <cstddef> to compile with
the
fileS.
If there was only one file the issue would have already been solved ;)
gcc-4.6 are not difficult to find, a little grep
suffices ;)
===========
dd@darkstar:/tmp/qt-x11-free-3.3.8b$ find . -iname \*.h -exec grep -L
"#include <cstddef>" {} \; | xargs grep -l
<snip>
There is one caveat with this exact command: it shows also some C
headers
because they don't include <cstddef> but <stddef.h>.
Here is the new command (which continues to show false positives: do
NOT add #include <cstddef> to C headers, it will break them).
Also, according to the C++ standard, C standard but non-intrisic types defined
by including <c*> headers should be in the std namespace: one should
accordingly replace ptrdiff_t by std::ptrdiff_t and size_t by std::size_t
(this is done, for example, by the qt3 gcc46.patch).
AFAIK, no popular compiler enforces such restrictions on restricting <c*>
headers to std:: namespace.
The search results on unpatched qt3-3.3.8b :
===========
dd@darkstar:/tmp/qt-x11-free-3.3.8b$ find . -iname \*.h -exec grep -L "#include
<cstddef>" {} \; | xargs grep -L "#include <stddef.h>" | xargs
grep -l size_t
./src/sql/qsqlrecord.h
./src/tools/qvaluelist.h
./src/tools/qvaluevector.h
./src/tools/qmap.h
./src/kernel/qrichtext_p.h
./src/3rdparty/libjpeg/jpegint.h
./src/3rdparty/libjpeg/jpeglib.h
./src/3rdparty/libjpeg/jmemsys.h
./src/3rdparty/libjpeg/jdhuff.h
./src/3rdparty/libmng/libmng_memory.h
./src/3rdparty/libmng/libmng_types.h
./src/3rdparty/libpng/pngconf.h
./src/3rdparty/libpng/png.h
./src/3rdparty/opentype/ftglue.h
./tools/designer/designer/defs.h
./mkspecs/qnx-g++/qplatformdefs.h
./mkspecs/aix-g++-64/qplatformdefs.h
./mkspecs/tru64-g++/qplatformdefs.h
./mkspecs/tru64-cxx/qplatformdefs.h
./mkspecs/bsdi-g++/qplatformdefs.h
./mkspecs/irix-g++/qplatformdefs.h
./mkspecs/aix-xlc-64/qplatformdefs.h
./mkspecs/unixware-cc/qplatformdefs.h
./mkspecs/solaris-g++/qplatformdefs.h
./mkspecs/irix-cc-64/qplatformdefs.h
./mkspecs/sco-cc/qplatformdefs.h
./mkspecs/unixware-g++/qplatformdefs.h
./mkspecs/reliant-cds/qplatformdefs.h
./mkspecs/aix-g++/qplatformdefs.h
./mkspecs/aix-xlc/qplatformdefs.h
./mkspecs/solaris-cc/qplatformdefs.h
./mkspecs/irix-cc/qplatformdefs.h
./examples/distributor/distributor.ui.h
./include/qmap.h
./include/qvaluevector.h
./include/qvaluelist.h
./include/qsqlrecord.h
./include/private/qrichtext_p.h
dd@darkstar:/tmp/qt-x11-free-3.3.8b$ find . -iname \*.h -exec grep -L "#include
<cstddef>" {} \; | xargs grep -L "#include <stddef.h>" | xargs
grep -l ptrdiff_t
./src/tools/qvaluelist.h
./src/tools/qvaluevector.h
./src/tools/qmap.h
./src/3rdparty/zlib/zutil.h
./include/qmap.h
./include/qvaluevector.h
./include/qvaluelist.h
===========
In my local copy of the SVN containing dependencies, kdebase and kdelibs:
===========
dd@darkstar:~/trinity$ find . -iname \*.h -exec grep -L "#include
<cstddef>" {} \; | xargs grep -L "#include <stddef.h>" | xargs
grep -l size_t
./kdebase/libkonq/konq_dirpart.h
./kdebase/kioslave/mac/kio_mac.h
./kdebase/kioslave/pop3/pop3.h
./kdebase/kioslave/media/kfile-plugin/kfilemediaplugin.h
./kdebase/kioslave/sftp/atomicio.h
./kdebase/kioslave/sftp/kio_sftp.h
./kdebase/kioslave/nntp/nntp.h
./kdebase/nsplugins/viewer/nsplugin.h
./kdebase/konsole/konsole/BlockArray.h
./kdebase/konsole/konsole/TEHistory.h
./kdebase/kdm/backend/dm.h
./kdebase/kdeprint/slave/kio_print.h
./kdebase/kfind/kquery.h
./kdelibs/kioslave/ftp/ftp.h
./kdelibs/kioslave/http/http.h
./kdelibs/kioslave/file/file.h
./kdelibs/kio/kfile/kdirsize.h
./kdelibs/kio/kfile/kfileview.h
./kdelibs/kio/kio/observer.h
./kdelibs/kio/kio/progressbase.h
./kdelibs/kio/kio/forwardingslavebase.h
./kdelibs/kio/kio/global.h
./kdelibs/kio/kio/defaultprogress.h
./kdelibs/kio/kio/jobclasses.h
./kdelibs/kio/kio/kdirlister.h
./kdelibs/kio/kio/slavebase.h
./kdelibs/kio/kio/kfileitem.h
./kdelibs/kio/kio/kshred.h
./kdelibs/kio/kio/slaveinterface.h
./kdelibs/kio/kio/tcpslavebase.h
./kdelibs/kio/kio/kdirlister_p.h
./kdelibs/kio/kio/dataslave.h
./kdelibs/kio/kio/renamedlg.h
./kdelibs/kio/kio/renamedlgplugin.h
./kdelibs/kio/kio/statusbarprogress.h
./kdelibs/kio/misc/uiserver.h
./kdelibs/kio/tests/kdirlistertest.h
./kdelibs/kio/kssl/kopenssl.h
./kdelibs/libltdl/ltdl.h
./kdelibs/arts/kde/kioinputstream_impl.h
./kdelibs/kjs/collector.h
./kdelibs/kjs/value.h
./kdelibs/khtml/khtml_caret_p.h
./kdelibs/khtml/rendering/render_object.h
./kdelibs/khtml/rendering/render_text.h
./kdelibs/khtml/rendering/render_layer.h
./kdelibs/khtml/rendering/render_arena.h
./kdelibs/khtml/rendering/render_line.h
./kdelibs/khtml/rendering/bidi.h
./kdelibs/kdecore/ksycoca.h
./kdelibs/kdecore/malloc/glibc.h
./kdelibs/kdecore/kallocator.h
./kdelibs/kdecore/kmountpoint.h
./kdelibs/kdecore/kcompletion_private.h
./kdelibs/kdecore/netsupp.h
./kdelibs/kdecore/network/kresolver_p.h
./kdelibs/kdecore/kvmallocator.h
./kdelibs/win/sys/mman.h
./kdelibs/win/sys/un.h
./kdelibs/win/sys/types.h
./kdelibs/win/string.h
./kdelibs/win/unistd.h
./kdelibs/win/pwd.h
./dependencies/tqtinterface/qtinterface/tqvaluelist.h
./dependencies/tqtinterface/qtinterface/tqmap.h
./dependencies/tqtinterface/qtinterface/tqt4/Qt/qbytearray.h
./dependencies/tqtinterface/qtinterface/tqt4/Qt/qlist.h
./dependencies/tqtinterface/qtinterface/tqt4/Qt/qvector.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qfunctions_vxworks.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qbytearray.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qset.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/q3valuevector.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qmap.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qlinkedlist.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/q3sqlrecordinfo.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qfunctions_wince.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qlist.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qvector.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qdebug.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/q3valuelist.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qcontiguouscache.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qhash.h
./dependencies/arts/libltdl/ltdl.h
./dependencies/arts/flow/gsl/gsldefs.h
dd@darkstar:~/trinity$ find . -iname \*.h -exec grep -L "#include
<cstddef>" {} \; | xargs grep -L "#include <stddef.h>" | xargs
grep -l ptrdiff_t
./kdebase/nsplugins/sdk/obsolete/protypes.h
./dependencies/tqtinterface/qtinterface/tqvaluelist.h
./dependencies/tqtinterface/qtinterface/tqmap.h
./dependencies/tqtinterface/qtinterface/tqt4/Qt/qlist.h
./dependencies/tqtinterface/qtinterface/tqt4/Qt/qvector.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qsharedpointer_impl.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qset.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qmap.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qlinkedlist.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qlist.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qfuture.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qvector.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/q3valuelist.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qcontiguouscache.h
./dependencies/tqtinterface/qtinterface/qt4/Qt/qhash.h
===========