summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/ofilenotify.cpp8
-rw-r--r--libopie2/opiecore/ofilenotify.h3
2 files changed, 4 insertions, 7 deletions
diff --git a/libopie2/opiecore/ofilenotify.cpp b/libopie2/opiecore/ofilenotify.cpp
index 5e9f97b..bcfb1aa 100644
--- a/libopie2/opiecore/ofilenotify.cpp
+++ b/libopie2/opiecore/ofilenotify.cpp
@@ -19,55 +19,49 @@ _;:,     .>    :=|. This program is free software; you can
++=   -.     .`     .: details.
:     =  ...= . :.=-
-.   .:....=;==+<; You should have received a copy of the GNU
-_. . .   )=.  = Library General Public License along with
  --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "ofilenotify.h"
using namespace Opie::Core;
/* OPIE */
/* QT */
#include <qobject.h>
#include <qsignal.h>
#include <qintdict.h>
#include <qdir.h>
/* STD */
#include <sys/types.h>
#include <sys/stat.h>
-#ifndef _GNU_SOURCE
- #define _GNU_SOURCE
- #include <fcntl.h>
- #undef _GNU_SOURCE
-#else
- #include <fcntl.h>
-#endif
+#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
static QIntDict<OFileNotification> notification_list;
namespace Opie {
namespace Core {
OFileNotification::OFileNotification( QObject* parent, const char* name )
:QObject( parent, name ), _active( false )
{
qDebug( "OFileNotification::OFileNotification()" );
}
OFileNotification::~OFileNotification()
{
qDebug( "OFileNotification::~OFileNotification()" );
}
bool OFileNotification::isActive() const
{
diff --git a/libopie2/opiecore/ofilenotify.h b/libopie2/opiecore/ofilenotify.h
index a14842a..3bc141d 100644
--- a/libopie2/opiecore/ofilenotify.h
+++ b/libopie2/opiecore/ofilenotify.h
@@ -7,48 +7,51 @@ _;:,     .>    :=|. This program is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
.="- .-=="i,     .._ License as published by the Free Software
- .   .-<_>     .<> Foundation; either version 2 of the License,
   ._= =}       : or (at your option) any later version.
  .%`+i>       _;_.
  .i_,=:_.      -<s. This program is distributed in the hope that
   +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
  : ..    .:,     . . . without even the implied warranty of
  =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
_.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.=       =       ; Library General Public License for more
++=   -.     .`     .: details.
:     =  ...= . :.=-
-.   .:....=;==+<; You should have received a copy of the GNU
-_. . .   )=.  = Library General Public License along with
  --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef OFILENOTIFY_H
#define OFILENOTIFY_H
+#if defined (__GNUC__) && (__GNUC__ < 3)
+#define _GNU_SOURCE
+#endif
/* QT */
#include <qobject.h>
#include <qsignal.h>
#include <qstring.h>
/* STD */
#include <signal.h>
#include <fcntl.h>
namespace Opie {
namespace Core {
enum OFileNotificationType { Single = 0x0000000,
Multi = DN_MULTISHOT,
Access = DN_ACCESS,
Modify = DN_MODIFY,
Create = DN_CREATE,
Delete = DN_DELETE,
Rename = DN_RENAME,
Attrib = DN_ATTRIB };
class OFileNotification : public QObject
{