Rev 39 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 39 | Rev 103 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | /**
|
3 | /**
|
4 | * \file inotify-cxx.cpp
|
4 | * \file inotify-cxx.cpp
|
5 | *
|
5 | *
|
6 | * inotify C++ interface
|
6 | * inotify C++ interface
|
7 | *
|
7 | *
|
8 | * Copyright (C) 2006, 2007 Lukas Jelinek <lukas@aiken.cz>
|
8 | * Copyright (C) 2006, 2007, 2009 Lukas Jelinek <lukas@aiken.cz>
|
9 | *
|
9 | *
|
10 | * This program is free software; you can redistribute it and/or
|
10 | * This program is free software; you can redistribute it and/or
|
11 | * modify it under the terms of one of the following licenses:
|
11 | * modify it under the terms of one of the following licenses:
|
12 | *
|
12 | *
|
13 | * \li 1. X11-style license (see LICENSE-X11)
|
13 | * \li 1. X11-style license (see LICENSE-X11)
|
14 | * \li 2. GNU Lesser General Public License, version 2.1 (see LICENSE-LGPL)
|
14 | * \li 2. GNU Lesser General Public License, version 2.1 (see LICENSE-LGPL)
|
15 | * \li 3. GNU General Public License, version 2 (see LICENSE-GPL)
|
15 | * \li 3. GNU General Public License, version 2 (see LICENSE-GPL)
|
16 | *
|
16 | *
|
17 | * If you want to help with choosing the best license for you,
|
17 | * If you want to help with choosing the best license for you,
|
18 | * please visit http://www.gnu.org/licenses/license-list.html.
|
18 | * please visit http://www.gnu.org/licenses/license-list.html.
|
- | 19 | *
|
|
- | 20 | * Credits:
|
|
- | 21 | * Mike Frysinger (cleanup of includes)
|
|
19 | *
|
22 | *
|
20 | */
|
23 | */
|
21 | 24 | ||
22 | 25 | ||
23 | #include <errno.h>
|
26 | #include <errno.h>
|
24 | #include <unistd.h>
|
27 | #include <unistd.h>
|
25 | #include <fcntl.h>
|
28 | #include <fcntl.h>
|
- | 29 | #include <fstream>
|
|
- | 30 | ||
- | 31 | #include <sys/syscall.h>
|
|
- | 32 | ||
- | 33 | // Use this if syscalls not defined
|
|
- | 34 | #ifndef __NR_inotify_init
|
|
- | 35 | #include <sys/inotify-syscalls.h>
|
|
- | 36 | #endif // __NR_inotify_init
|
|
26 | 37 | ||
27 | #include "inotify-cxx.h"
|
38 | #include "inotify-cxx.h"
|
28 | 39 | ||
29 | /// procfs inotify base path
|
40 | /// procfs inotify base path
|
30 | #define PROCFS_INOTIFY_BASE "/proc/sys/fs/inotify/"
|
41 | #define PROCFS_INOTIFY_BASE "/proc/sys/fs/inotify/"
|