mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
generic: make some stat calls 64-bit aware
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
d147517cd5
commit
bd00cedf46
4 changed files with 11 additions and 11 deletions
|
@ -338,8 +338,8 @@ bool KTar::openArchive( QIODevice::OpenMode mode ) {
|
||||||
|
|
||||||
// We'll use the permission and user/group of d->rootDir
|
// We'll use the permission and user/group of d->rootDir
|
||||||
// for any directory we emulate (see findOrCreate)
|
// for any directory we emulate (see findOrCreate)
|
||||||
//struct stat buf;
|
//KDE_struct_stat buf;
|
||||||
//stat( fileName(), &buf );
|
//KDE_stat( fileName(), &buf );
|
||||||
|
|
||||||
d->dirList.clear();
|
d->dirList.clear();
|
||||||
QIODevice* dev = device();
|
QIODevice* dev = device();
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
#include "kexiv2_p.h"
|
#include "kexiv2_p.h"
|
||||||
|
|
||||||
// C ANSI includes
|
// C ANSI includes
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <utime.h>
|
#include <utime.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <kde_file.h>
|
||||||
|
|
||||||
namespace KExiv2Iface
|
namespace KExiv2Iface
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -281,9 +281,9 @@ bool KExiv2::Private::saveOperations(const QFileInfo& finfo, Exiv2::Image::AutoP
|
||||||
if (!updateFileTimeStamp)
|
if (!updateFileTimeStamp)
|
||||||
{
|
{
|
||||||
// Don't touch access and modification timestamp of file.
|
// Don't touch access and modification timestamp of file.
|
||||||
struct stat st;
|
KDE_struct_stat st;
|
||||||
struct utimbuf ut;
|
struct utimbuf ut;
|
||||||
int ret = ::stat(QFile::encodeName(filePath), &st);
|
int ret = KDE_stat(QFile::encodeName(filePath), &st);
|
||||||
|
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -451,8 +451,8 @@ void KPty::close()
|
||||||
// don't bother resetting unix98 pty, it will go away after closing master anyway.
|
// don't bother resetting unix98 pty, it will go away after closing master anyway.
|
||||||
if (memcmp(d->ttyName.data(), "/dev/pts/", 9)) {
|
if (memcmp(d->ttyName.data(), "/dev/pts/", 9)) {
|
||||||
if (!geteuid()) {
|
if (!geteuid()) {
|
||||||
struct stat st;
|
KDE_struct_stat st;
|
||||||
if (!stat(d->ttyName.data(), &st)) {
|
if (!KDE_stat(d->ttyName.data(), &st)) {
|
||||||
chown(d->ttyName.data(), 0, st.st_gid == getgid() ? 0 : -1);
|
chown(d->ttyName.data(), 0, st.st_gid == getgid() ? 0 : -1);
|
||||||
chmod(d->ttyName.data(), S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
|
chmod(d->ttyName.data(), S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
#include "udevqt.h"
|
#include "udevqt.h"
|
||||||
#include "udevqt_p.h"
|
#include "udevqt_p.h"
|
||||||
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <QtCore/QSocketNotifier>
|
#include <QtCore/QSocketNotifier>
|
||||||
|
#include <qplatformdefs.h>
|
||||||
|
|
||||||
namespace UdevQt {
|
namespace UdevQt {
|
||||||
|
|
||||||
|
@ -211,9 +211,9 @@ DeviceList Client::devicesBySubsystem(const QString &subsystem)
|
||||||
|
|
||||||
Device Client::deviceByDeviceFile(const QString &deviceFile)
|
Device Client::deviceByDeviceFile(const QString &deviceFile)
|
||||||
{
|
{
|
||||||
struct stat sb;
|
QT_STATBUF sb;
|
||||||
|
|
||||||
if (stat(deviceFile.toLatin1().constData(), &sb) != 0)
|
if (QT_STAT(deviceFile.toLatin1().constData(), &sb) != 0)
|
||||||
return Device();
|
return Device();
|
||||||
|
|
||||||
struct udev_device *ud = 0;
|
struct udev_device *ud = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue