[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeextragear-3
From:       Adriaan de Groot <groot () kde ! org>
Date:       2005-01-31 20:09:35
Message-ID: 20050131200935.D9D641D215 () office ! kde ! org
[Download RAW message or body]

CVS commit by adridg: 

Check for linux-specific headers, link to the libtool not the fake static, and don't \
use mntent when not available (aka 'build, dammit')


  M +1 -0      configure.in.in   1.9
  M +1 -1      filelight/src/part/Makefile.am   1.6
  M +18 -1     filelight/src/part/localLister.cpp   1.2


--- kdeextragear-3/configure.in.in  #1.8:1.9
@@ -2,3 +2,4 @@
 
 KDE_INIT_DOXYGEN([The API Reference], [Version $VERSION])
+KDE_CHECK_HEADERS(mntent.h)
 

--- kdeextragear-3/filelight/src/part/Makefile.am  #1.5:1.6
@@ -5,5 +5,5 @@
 #Part
 kde_module_LTLIBRARIES  = libfilelight.la
-libfilelight_la_LIBADD  = ./radialMap/libradialmap.a $(LIB_KFILE) $(LIB_KPARTS) \
$(LIB_KDEUI) $(LIB_QT) +libfilelight_la_LIBADD  = ./radialMap/libradialmap.la \
$(LIB_KFILE) $(LIB_KPARTS) $(LIB_KDEUI) $(LIB_QT)  libfilelight_la_LDFLAGS = \
$(all_libraries) $(KDE_PLUGIN)  libfilelight_la_SOURCES = \

--- kdeextragear-3/filelight/src/part/localLister.cpp  #1.1:1.2
@@ -8,5 +8,7 @@
 #include <fstab.h>
 #include "localLister.h"
+#ifdef HAVE_MNTENT_H
 #include <mntent.h>
+#endif
 #include <qapplication.h> //postEvent()
 #include <qfile.h>
@@ -231,9 +233,16 @@ namespace Filelight
 
       struct fstab *fstab_ent;
+#ifdef HAVE_MNTENT_H
       struct mntent *mnt_ent;
+#endif
       FILE *fp;
       QString str;
 
+
+#ifdef HAVE_MNTENT_H
       if( setfsent() == 0 || !( fp = setmntent( INFO_MOUNTED_PARTITIONS, "r" ) ) )
+#else
+      if( setfsent() == 0 )
+#endif
          return false;
 
@@ -244,5 +253,11 @@ namespace Filelight
 
       QStringList remoteFsTypes;
-      remoteFsTypes << "smbfs" << MNTTYPE_NFS;
+      remoteFsTypes << "smbfs" ;
+#ifdef MNTTYPE_NFS
+      remoteFsTypes << MNTTYPE_NFS;
+#else
+      remoteFsTypes << "nfs";
+#endif
+      // What about afs?
 
       while( (fstab_ent = getfsent()) != NULL )
@@ -275,4 +290,5 @@ namespace Filelight
       //scan mtab, **** mtab should take priority, but currently it isn't
 
+#ifdef HAVE_MNTENT_H
       while( ( mnt_ent = getmntent( fp ) ) != NULL )
       {
@@ -294,4 +310,5 @@ namespace Filelight
 
       endmntent( fp ); /* close mtab.. */
+#endif
 
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic