diff options
author | João Abecasis <joao@trolltech.com> | 2010-01-21 18:48:33 (GMT) |
---|---|---|
committer | João Abecasis <joao@trolltech.com> | 2010-01-29 13:33:49 (GMT) |
commit | 1492a2edf269b368abd2af9f8ffb474489609b5d (patch) | |
tree | a009a5ff373b739b8f5d06814e49b9675d1b6788 /src/gui/embedded | |
parent | 6d8ea540bd123270f0010eb5fa5e68a510ca89e7 (diff) | |
download | Qt-1492a2edf269b368abd2af9f8ffb474489609b5d.zip Qt-1492a2edf269b368abd2af9f8ffb474489609b5d.tar.gz Qt-1492a2edf269b368abd2af9f8ffb474489609b5d.tar.bz2 |
Use X/Open LFS extensions for 64-bit support on directory iteration
This boils down to using readdir64(_r) and struct dirent64 where
available. I assumed these are available in the same platforms other
such extensions are already being used.
AIX uses the additional type DIR64 and opendir64/closedir64 to
manipulate it.
Task-number: QTBUG-2781
Reviewed-by: Thiago Macieira
Diffstat (limited to 'src/gui/embedded')
-rw-r--r-- | src/gui/embedded/qscreen_qws.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/gui/embedded/qscreen_qws.cpp b/src/gui/embedded/qscreen_qws.cpp index 8eb8123..65a3fb5 100644 --- a/src/gui/embedded/qscreen_qws.cpp +++ b/src/gui/embedded/qscreen_qws.cpp @@ -39,6 +39,7 @@ ** ****************************************************************************/ +#include "qplatformdefs.h" #include "qscreen_qws.h" #include "qcolormap.h" @@ -3223,13 +3224,13 @@ QScreen * qt_probe_bus() return qt_dodriver("unaccel.so",0,0); } - DIR * dirptr=opendir("/proc/bus/pci"); + QT_DIR *dirptr = QT_OPENDIR("/proc/bus/pci"); if(!dirptr) return qt_dodriver("unaccel.so",0,0); - DIR * dirptr2; - dirent * cards; + QT_DIR * dirptr2; + QT_DIRENT *cards; - dirent * busses=readdir(dirptr); + QT_DIRENT *busses = QT_READDIR(dirptr); while(busses) { if(busses->d_name[0]!='.') { @@ -3237,9 +3238,9 @@ QScreen * qt_probe_bus() strcpy(buf,"/proc/bus/pci/"); qstrcpy(buf+14,busses->d_name); int p=strlen(buf); - dirptr2=opendir(buf); + dirptr2 = QT_OPENDIR(buf); if(dirptr2) { - cards=readdir(dirptr2); + cards = QT_READDIR(dirptr2); while(cards) { if(cards->d_name[0]!='.') { buf[p]='/'; @@ -3248,14 +3249,14 @@ QScreen * qt_probe_bus() if(ret) return ret; } - cards=readdir(dirptr2); + cards = QT_READDIR(dirptr2); } - closedir(dirptr2); + QT_CLOSEDIR(dirptr2); } } - busses=readdir(dirptr); + busses = QT_READDIR(dirptr); } - closedir(dirptr); + QT_CLOSEDIR(dirptr); return qt_dodriver("unaccel.so",0,0); } |