Replaced USE_SOLARIS definition with __sun.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/4/head
Michele Calgaro 2 years ago
parent b0e1c02a68
commit 497297648c
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -37,9 +37,9 @@
#include <kdebug.h> #include <kdebug.h>
// system includes // system includes
#if !defined(__FreeBSD__) && !defined(__solaris__) && !defined(USE_SOLARIS) #if !defined(__FreeBSD__) && !defined(__sun)
#include <sys/statfs.h> #include <sys/statfs.h>
#elif defined(__solaris__) || defined(USE_SOLARIS) #elif defined(__sun)
#include <sys/statvfs.h> #include <sys/statvfs.h>
#elif defined(__FreeBSD__) #elif defined(__FreeBSD__)
#include <sys/param.h> #include <sys/param.h>
@ -1046,13 +1046,13 @@ void Smb4KMounter::processMount()
TQString name = TQString( "//%1/%2" ).arg( m_priv->host() ).arg( m_priv->share() ); TQString name = TQString( "//%1/%2" ).arg( m_priv->host() ).arg( m_priv->share() );
// Check file system // Check file system
#if !defined(__solaris__) #if !defined(__sun)
struct statfs filesystem; struct statfs filesystem;
#else #else
struct statvfs filesystem; struct statvfs filesystem;
#endif #endif
#if !defined(__solaris__) && !defined(__irix__) #if !defined(__sun) && !defined(__irix__)
if ( statfs( m_priv->path(), &filesystem ) == -1 ) if ( statfs( m_priv->path(), &filesystem ) == -1 )
#elif defined(__irix__) #elif defined(__irix__)
if ( statfs( m_priv->path(), &filesystem, sizeof( filesystem ), 0 ) == -1 ) if ( statfs( m_priv->path(), &filesystem, sizeof( filesystem ), 0 ) == -1 )
@ -1079,7 +1079,7 @@ void Smb4KMounter::processMount()
} }
else else
{ {
#if !defined(__FreeBSD__) && !defined(__solaris__) && !defined(__irix__) #if !defined(__FreeBSD__) && !defined(__sun) && !defined(__irix__)
if ( (uint)filesystem.f_type == 0xFF534D42 /* CIFS */) if ( (uint)filesystem.f_type == 0xFF534D42 /* CIFS */)
{ {
// The user name will be send if no login was specified. // The user name will be send if no login was specified.
@ -1095,7 +1095,7 @@ void Smb4KMounter::processMount()
share = new Smb4KShare( name, m_priv->path(), "smbfs", (int)getuid(), (int)getgid() ); share = new Smb4KShare( name, m_priv->path(), "smbfs", (int)getuid(), (int)getgid() );
m_mounted_shares.append( share ); m_mounted_shares.append( share );
} }
#elif defined(__solaris__) #elif defined(__sun)
if ( (uint)filesystem.f_basetype == 0xFF534D42 /* CIFS */) if ( (uint)filesystem.f_basetype == 0xFF534D42 /* CIFS */)
{ {
// The user name will be send if no login was specified. // The user name will be send if no login was specified.

@ -27,9 +27,9 @@
#include <config.h> #include <config.h>
#endif #endif
#if !defined(__FreeBSD__) && !defined(__solaris__) && !defined(USE_SOLARIS) #if !defined(__FreeBSD__) && !defined(__sun)
#include <sys/statfs.h> #include <sys/statfs.h>
#elif defined(__solaris__) || defined(USE_SOLARIS) #elif defined(__sun)
#include <sys/types.h> #include <sys/types.h>
#include <sys/statvfs.h> #include <sys/statvfs.h>
#elif defined(__FreeBSD__) #elif defined(__FreeBSD__)
@ -138,13 +138,13 @@ bool check_filesystem( const char *path, const char *fs )
{ {
bool ok = false; bool ok = false;
#if !defined(__solaris__) && !defined(USE_SOLARIS) #if !defined(__sun)
struct statfs filesystem; struct statfs filesystem;
#else #else
struct statvfs filesystem; struct statvfs filesystem;
#endif #endif
#if !defined(__solaris__) && !defined(USE_SOLARIS) && !defined(__irix__) #if !defined(__sun) && !defined(__irix__)
if ( statfs( path, &filesystem ) == -1 ) if ( statfs( path, &filesystem ) == -1 )
#elif defined(__irix__) #elif defined(__irix__)
if ( statfs( path, &filesystem, sizeof( filesystem ), 0 ) == -1 ) if ( statfs( path, &filesystem, sizeof( filesystem ), 0 ) == -1 )
@ -168,7 +168,7 @@ bool check_filesystem( const char *path, const char *fs )
return ok; return ok;
} }
#if !defined(__FreeBSD__) && !defined(__solaris__) && !defined(USE_SOLARIS) && !defined(__irix__) #if !defined(__FreeBSD__) && !defined(__sun) && !defined(__irix__)
// First entry is for CIFS, the second for SMBFS. // First entry is for CIFS, the second for SMBFS.
if ( (uint)filesystem.f_type == 0xFF534D42 && !strncmp( fs, "cifs", strlen( fs )+1 ) ) if ( (uint)filesystem.f_type == 0xFF534D42 && !strncmp( fs, "cifs", strlen( fs )+1 ) )
{ {
@ -183,7 +183,7 @@ bool check_filesystem( const char *path, const char *fs )
{ {
ok = true; ok = true;
} }
#elif defined(__solaris__) || defined(USE_SOLARIS) #elif defined(__sun)
if ( (uint)filesystem.f_basetype == 0xFF534D42 && !strncmp( fs, "cifs", strlen( fs )+1 ) ) if ( (uint)filesystem.f_basetype == 0xFF534D42 && !strncmp( fs, "cifs", strlen( fs )+1 ) )
{ {
ok = true; ok = true;

Loading…
Cancel
Save