Skip to content

Commit cfe027f

Browse files
author
Github Actions
committed
Merge 3.3.5-base_patch to 3.3.5-racial-trait
2 parents 6ab1603 + 037cb47 commit cfe027f

File tree

163 files changed

+6985
-6450
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+6985
-6450
lines changed

dep/PackageList.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ bzip2 (a freely available, patent free, high-quality data compressor)
1212
http://www.bzip.org/
1313
Version: 1.0.6
1414

15-
efws (Entropia File System Watcher - crossplatform file system watcher)
16-
https://bitbucket.org/SpartanJ/efsw
17-
Version: 1.0.0 e6afbec564e249771046c714b0c7f2154e4c7fef
15+
efsw (Entropia File System Watcher - crossplatform file system watcher)
16+
https://github.com/SpartanJ/efsw
17+
Version: 1.5.0+ f94a6616aba85fc9375fdff7ee69609d223a0672
1818

1919
fmt (a small, safe and fast formatting library)
2020
https://github.com/fmtlib/fmt
@@ -46,11 +46,11 @@ SFMT (SIMD-oriented Fast Mersenne Twister)
4646

4747
utf8-cpp (UTF-8 with C++ in a Portable Way)
4848
https://github.com/nemtrif/utfcpp
49-
Version: 3.2.3
49+
Version: 4.0.8
5050

5151
zlib (A Massively Spiffy Yet Delicately Unobtrusive Compression Library)
5252
http://www.zlib.net/
53-
Version: 1.3
53+
Version: 1.3.1
5454

5555
gSOAP (a portable development toolkit for C and C++ XML Web services and XML data bindings)
5656
http://gsoap2.sourceforge.net/

dep/efsw/.hg_archival.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

dep/efsw/CMakeLists.txt

Lines changed: 57 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,98 @@
1-
set(SRCS
1+
set(EFSW_CPP_SOURCE
2+
src/efsw/Atomic.hpp
3+
src/efsw/base.hpp
24
src/efsw/Debug.cpp
5+
src/efsw/Debug.hpp
36
src/efsw/DirectorySnapshot.cpp
7+
src/efsw/DirectorySnapshot.hpp
48
src/efsw/DirectorySnapshotDiff.cpp
9+
src/efsw/DirectorySnapshotDiff.hpp
510
src/efsw/DirWatcherGeneric.cpp
11+
src/efsw/DirWatcherGeneric.hpp
612
src/efsw/FileInfo.cpp
13+
src/efsw/FileInfo.hpp
714
src/efsw/FileSystem.cpp
15+
src/efsw/FileSystem.hpp
816
src/efsw/FileWatcher.cpp
917
src/efsw/FileWatcherCWrapper.cpp
1018
src/efsw/FileWatcherGeneric.cpp
19+
src/efsw/FileWatcherGeneric.hpp
1120
src/efsw/FileWatcherImpl.cpp
21+
src/efsw/FileWatcherImpl.hpp
22+
src/efsw/Lock.hpp
1223
src/efsw/Log.cpp
13-
src/efsw/Mutex.cpp
24+
src/efsw/Mutex.hpp
25+
src/efsw/sophist.h
1426
src/efsw/String.cpp
27+
src/efsw/String.hpp
1528
src/efsw/System.cpp
16-
src/efsw/Thread.cpp
29+
src/efsw/System.hpp
30+
src/efsw/Thread.hpp
31+
src/efsw/Utf.hpp
1732
src/efsw/Watcher.cpp
18-
src/efsw/WatcherGeneric.cpp)
33+
src/efsw/Watcher.hpp
34+
src/efsw/WatcherGeneric.cpp
35+
src/efsw/WatcherGeneric.hpp
36+
src/efsw/platform/platformimpl.hpp
37+
)
1938

2039
if (WIN32)
21-
list (APPEND SRCS
40+
list (APPEND EFSW_CPP_SOURCE
2241
src/efsw/platform/win/FileSystemImpl.cpp
23-
src/efsw/platform/win/MutexImpl.cpp
42+
src/efsw/platform/win/FileSystemImpl.hpp
2443
src/efsw/platform/win/SystemImpl.cpp
25-
src/efsw/platform/win/ThreadImpl.cpp)
44+
src/efsw/platform/win/SystemImpl.hpp)
2645
else ()
27-
list (APPEND SRCS
46+
list (APPEND EFSW_CPP_SOURCE
2847
src/efsw/platform/posix/FileSystemImpl.cpp
29-
src/efsw/platform/posix/MutexImpl.cpp
48+
src/efsw/platform/posix/FileSystemImpl.hpp
3049
src/efsw/platform/posix/SystemImpl.cpp
31-
src/efsw/platform/posix/ThreadImpl.cpp)
50+
src/efsw/platform/posix/SystemImpl.hpp)
3251
endif()
3352

3453
if (APPLE)
35-
list (APPEND SRCS
54+
list (APPEND EFSW_CPP_SOURCE
3655
src/efsw/FileWatcherFSEvents.cpp
56+
src/efsw/FileWatcherFSEvents.hpp
3757
src/efsw/FileWatcherKqueue.cpp
58+
src/efsw/FileWatcherKqueue.hpp
3859
src/efsw/WatcherFSEvents.cpp
39-
src/efsw/WatcherKqueue.cpp)
40-
41-
exec_program(uname ARGS -v OUTPUT_VARIABLE OSX_VERSION)
42-
string(REGEX MATCH "[0-9]+" OSX_VERSION ${OSX_VERSION})
43-
if (NOT OSX_VERSION GREATER 9)
44-
set(OPTIONAL_COMPILE_DEFINITIONS "-DEFSW_FSEVENTS_NOT_SUPPORTED")
45-
endif()
60+
src/efsw/WatcherFSEvents.hpp
61+
src/efsw/WatcherKqueue.cpp
62+
src/efsw/WatcherKqueue.hpp)
4663
set(OPTIONAL_LINK_LIBRARIES "-framework CoreFoundation" "-framework CoreServices")
4764
elseif (WIN32)
48-
list (APPEND SRCS
65+
list (APPEND EFSW_CPP_SOURCE
4966
src/efsw/FileWatcherWin32.cpp
50-
src/efsw/WatcherWin32.cpp)
67+
src/efsw/FileWatcherWin32.hpp
68+
src/efsw/WatcherWin32.cpp
69+
src/efsw/WatcherWin32.hpp)
5170
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
52-
list (APPEND SRCS
71+
list (APPEND EFSW_CPP_SOURCE
5372
src/efsw/FileWatcherInotify.cpp
54-
src/efsw/WatcherInotify.cpp)
55-
if (NOT EXISTS "/usr/include/sys/inotify.h" AND NOT EXISTS "/usr/local/include/sys/inotify.h")
73+
src/efsw/FileWatcherInotify.hpp
74+
src/efsw/WatcherInotify.cpp
75+
src/efsw/WatcherInotify.hpp)
76+
find_path(EFSW_INOTIFY_H
77+
NAMES
78+
sys/inotify.h
79+
NO_CACHE
80+
)
81+
if (EFSW_INOTIFY_H STREQUAL "EFSW_INOTIFY_H-NOTFOUND")
82+
list (APPEND EFSW_CPP_SOURCE
83+
src/efsw/inotify-nosys.h
84+
)
5685
set(OPTIONAL_COMPILE_DEFINITIONS "-DEFSW_INOTIFY_NOSYS")
5786
endif()
5887
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
59-
list (APPEND SRCS
88+
list (APPEND EFSW_CPP_SOURCE
6089
src/efsw/FileWatcherKqueue.cpp
61-
src/efsw/WatcherKqueue.cpp)
90+
src/efsw/FileWatcherKqueue.hpp
91+
src/efsw/WatcherKqueue.cpp
92+
src/efsw/WatcherKqueue.hpp)
6293
endif()
6394

64-
add_library(efsw STATIC ${SRCS})
95+
add_library(efsw STATIC ${EFSW_CPP_SOURCE})
6596

6697
target_include_directories(efsw
6798
PUBLIC

dep/efsw/LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2012 Martín Lucas Golini
1+
Copyright (c) 2020 Martín Lucas Golini
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal
@@ -19,4 +19,4 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919
THE SOFTWARE.
2020

2121
This software is a fork of the "simplefilewatcher" by James Wynn (james@jameswynn.com)
22-
http://code.google.com/p/simplefilewatcher/ also MIT licensed.
22+
http://code.google.com/p/simplefilewatcher/ also MIT licensed.

dep/efsw/README.md

Lines changed: 55 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
Entropia File System Watcher
1+
Entropia File System Watcher ![efsw](https://web.ensoft.dev/efsw/efsw-logo.svg)
22
============================
3+
4+
[![build status](https://img.shields.io/github/actions/workflow/status/SpartanJ/efsw/main.yml?branch=master)](https://github.com/SpartanJ/efsw/actions?query=workflow%3Abuild)
5+
36
**efsw** is a C++ cross-platform file system watcher and notifier.
47

58
**efsw** monitors the file system asynchronously for changes to files and directories by watching a list of specified paths, and raises events when a directory or file change.
@@ -19,8 +22,8 @@ Entropia File System Watcher
1922
* OS-independent generic watcher
2023
(polling the disk for directory snapshots and comparing them periodically)
2124

22-
If any of the backend fails to start by any reason, it will fallback to the OS-independent implementation.
23-
This should never happen, except for the Kqueue implementation, see `Platform limitations and clarifications`.
25+
If any of the backend fails to start for any reason, it will fallback to the OS-independent implementation.
26+
This should never happen, except for the Kqueue implementation; see `Platform limitations and clarifications`.
2427

2528
**Code License**
2629
--------------
@@ -31,39 +34,41 @@ This should never happen, except for the Kqueue implementation, see `Platform li
3134

3235
```c++
3336
// Inherits from the abstract listener class, and implements the the file action handler
34-
class UpdateListener : public efsw::FileWatchListener
35-
{
36-
public:
37-
UpdateListener() {}
38-
39-
void handleFileAction( efsw::WatchID watchid, const std::string& dir, const std::string& filename, efsw::Action action, std::string oldFilename = "" )
40-
{
41-
switch( action )
42-
{
43-
case efsw::Actions::Add:
44-
std::cout << "DIR (" << dir << ") FILE (" << filename << ") has event Added" << std::endl;
45-
break;
46-
case efsw::Actions::Delete:
47-
std::cout << "DIR (" << dir << ") FILE (" << filename << ") has event Delete" << std::endl;
48-
break;
49-
case efsw::Actions::Modified:
50-
std::cout << "DIR (" << dir << ") FILE (" << filename << ") has event Modified" << std::endl;
51-
break;
52-
case efsw::Actions::Moved:
53-
std::cout << "DIR (" << dir << ") FILE (" << filename << ") has event Moved from (" << oldFilename << ")" << std::endl;
54-
break;
55-
default:
56-
std::cout << "Should never happen!" << std::endl;
57-
}
58-
}
37+
class UpdateListener : public efsw::FileWatchListener {
38+
public:
39+
void handleFileAction( efsw::WatchID watchid, const std::string& dir,
40+
const std::string& filename, efsw::Action action,
41+
std::string oldFilename ) override {
42+
switch ( action ) {
43+
case efsw::Actions::Add:
44+
std::cout << "DIR (" << dir << ") FILE (" << filename << ") has event Added"
45+
<< std::endl;
46+
break;
47+
case efsw::Actions::Delete:
48+
std::cout << "DIR (" << dir << ") FILE (" << filename << ") has event Delete"
49+
<< std::endl;
50+
break;
51+
case efsw::Actions::Modified:
52+
std::cout << "DIR (" << dir << ") FILE (" << filename << ") has event Modified"
53+
<< std::endl;
54+
break;
55+
case efsw::Actions::Moved:
56+
std::cout << "DIR (" << dir << ") FILE (" << filename << ") has event Moved from ("
57+
<< oldFilename << ")" << std::endl;
58+
break;
59+
default:
60+
std::cout << "Should never happen!" << std::endl;
61+
}
62+
}
5963
};
6064

6165
// Create the file system watcher instance
62-
// efsw::FileWatcher allow a first boolean parameter that indicates if it should start with the generic file watcher instead of the platform specific backend
63-
efsw::FileWatcher * fileWatcher = new efsw::FileWatcher();
66+
// efsw::FileWatcher allow a first boolean parameter that indicates if it should start with the
67+
// generic file watcher instead of the platform specific backend
68+
efsw::FileWatcher* fileWatcher = new efsw::FileWatcher();
6469

6570
// Create the instance of your efsw::FileWatcherListener implementation
66-
UpdateListener * listener = new UpdateListener();
71+
UpdateListener* listener = new UpdateListener();
6772

6873
// Add a folder to watch, and get the efsw::WatchID
6974
// It will watch the /tmp folder recursively ( the third parameter indicates that is recursive )
@@ -73,11 +78,16 @@ efsw::WatchID watchID = fileWatcher->addWatch( "/tmp", listener, true );
7378
// Adds another directory to watch. This time as non-recursive.
7479
efsw::WatchID watchID2 = fileWatcher->addWatch( "/usr", listener, false );
7580

81+
// For Windows, adds another watch, specifying to use a bigger buffer, to not miss events
82+
// (do not use for network locations, see efsw.hpp for details).
83+
efsw::WatchID watchID3 = fileWatcher->addWatch( "c:\\temp", listener, true, { (BufferSize, 128*1024) } );
84+
7685
// Start watching asynchronously the directories
7786
fileWatcher->watch();
7887

7988
// Remove the second watcher added
80-
// You can also call removeWatch by passing the watch path ( it must end with an slash or backslash in windows, since that's how internally it's saved )
89+
// You can also call removeWatch by passing the watch path ( it must end with an slash or backslash
90+
// in windows, since that's how internally it's saved )
8191
fileWatcher->removeWatch( watchID2 );
8292
```
8393
@@ -87,21 +97,21 @@ None :)
8797
8898
**Compiling**
8999
------------
90-
To generate project files you will need to [download and install](http://industriousone.com/premake/download) [Premake](http://industriousone.com/what-premake)
100+
To generate project files you will need to [download and install](https://premake.github.io/download) [Premake](https://premake.github.io/docs/What-Is-Premake)
91101
92-
Then you can generate the project for your platform just going to the project directory where the premake4.lua file is located and then execute:
102+
Then you can generate the project for your platform by just going to the project directory where the premake4.lua file is located and executing:
93103
94-
`premake4 gmake` to generate project Makefiles, then `cd make/*YOURPLATFORM*/`, and finally `make` or `make config=release` ( it will generate the static lib, the shared lib and the test application ).
104+
`premake5 gmake2` to generate project Makefiles, then `cd make/*YOURPLATFORM*/`, and finally `make` or `make config=release_x86_64` ( it will generate the static lib, the shared lib and the test application ).
95105
96-
or
106+
or
97107
98-
`premake4 vs2010` to generate Visual Studio 2010 project.
108+
`premake5 vs2022` to generate Visual Studio 2022 project.
99109
100110
or
101111
102-
`premake4 xcode4` to generate Xcode 4 project.
112+
`premake5 xcode4` to generate Xcode 4 project.
103113
104-
There is also a cmake file that i don't oficially support but it works just fine, provided by [Mohammed Nafees](https://bitbucket.org/binaryking).
114+
There is also a cmake file that I don't officially support but it works just fine, provided by [Mohammed Nafees](https://github.com/mnafees) and improved by [Eugene Shalygin](https://github.com/zeule).
105115
106116
**Platform limitations and clarifications**
107117
-------------------------------------------
@@ -112,21 +122,21 @@ handleFileAction returns UTF-8 strings in all platforms.
112122
113123
Windows and FSEvents Mac OS X implementation can't follow symlinks ( it will ignore followSymlinks() and allowOutOfScopeLinks() ).
114124
115-
Kqueue implementation is limited by the maximun number of file descriptors allowed per process by the OS, in the case of reaching the file descriptors limit ( in BSD around 18000 and in OS X around 10240 ) it will fallback to the generic file watcher.
125+
Kqueue implementation is limited by the maximum number of file descriptors allowed per process by the OS. In the case of reaching the file descriptors limit ( in BSD around 18000 and in OS X around 10240 ), it will fallback to the generic file watcher.
116126
117-
OS X will only use Kqueue if OS X version is below to 10.5, and this implementation needs to be compiled separately from the OS X >= 10.5 implementation. Since there's no way to compile FSEvents backend in OS X below 10.5.
127+
OS X will use only Kqueue if the OS X version is below 10.5. This implementation needs to be compiled separately from the OS X >= 10.5 implementation, since there's no way to compile FSEvents backend in OS X below 10.5.
118128
119-
FSEvents for OS X Lion and beyond in some cases will generate more actions that in reality ocurred, since fine-grained implementation of FSEvents doesn't give the order of the actions retrieved, in some cases i need to guess/aproximate the order of them.
129+
FSEvents for OS X Lion and beyond in some cases will generate more actions than in reality ocurred, since fine-grained implementation of FSEvents doesn't give the order of the actions retrieved. In some cases I need to guess/approximate the order of them.
120130
121131
Generic watcher relies on the inode information to detect file and directories renames/move. Since Windows has no concept of inodes as Unix platforms do, there is no current reliable way of determining file/directory movement on Windows without help from the Windows API ( this is replaced with Add/Delete events ).
122132
123-
Linux versions below 2.6.13 are not supported, since inotify wasn't implemented yet. I'm not interested in support older kernels, since i don't see the point. If someone needs this open an issue in the issue tracker and i may consider implenent a dnotify backend.
133+
Linux versions below 2.6.13 are not supported, since inotify wasn't implemented yet. I'm not interested in supporting older kernels, since I don't see the point. If someone needs this, open an issue in the issue tracker and I may consider implementing a dnotify backend.
124134
125-
OS-independent watcher, Kqueue and FSEvents for OS X below 10.5 keep cache of the directories structures, to be able to detect changes in the directories. This means that there's a memory overhead for this backends.
135+
OS-independent watcher, Kqueue and FSEvents for OS X below 10.5 keep cache of the directories structures, to be able to detect changes in the directories. This means that there's a memory overhead for these backends.
126136
127137
**Useful information**
128138
--------------------
129-
The project also comes with a C API wrapper, contributed by [Sepul Sepehr Taghdisian](https://bitbucket.org/sepul).
139+
The project also comes with a C API wrapper, contributed by [Sepul Sepehr Taghdisian](https://github.com/septag).
130140
131141
There's a string manipulation class not exposed in the efsw header ( efsw::String ) that can be used to make string encoding conversion.
132142

0 commit comments

Comments
 (0)