doxygen/reproducible.patch
Petr Gajdos 05cf3895e7 - version update to 1.9.8
* https://www.doxygen.nl/manual/changelog.html#log_1_9_8

- doxygen-test multibuild target to break build cycle with latex
- modified sources
  % _multibuild

- rebase reproducible.patch to 1.9.7

- Add reproducible.patch to make doxytags output reproducible (boo#1201579)

- version update to 1.9.7
  * https://www.doxygen.nl/manual/changelog.html#log_1_9_7
- modified patches
  % doxygen-no-libclang-cpp.patch (refreshed)
  % doxygen-no-lowercase-man-names.patch (refreshed)
- deleted patches
  - Fix-boundingbox-parsing_part1.patch (upstreamed)
  - Fix-boundingbox-parsing_part2.patch (upstreamed)
  - Fix-boundingbox-parsing_part3.patch (upstreamed)
  - Fix-boundingbox-parsing_part4.patch (upstreamed)
- convert two specfiles into one
- deleted patches
  - doxygen-no-lowercase-man-names.patch (not needed)

OBS-URL: https://build.opensuse.org/package/show/devel:tools/doxygen?expand=0&rev=196
2023-09-05 10:25:27 +00:00

76 lines
2.6 KiB
Diff

Index: doxygen-1.9.7/deps/filesystem/filesystem.hpp
===================================================================
--- doxygen-1.9.7.orig/deps/filesystem/filesystem.hpp
+++ doxygen-1.9.7/deps/filesystem/filesystem.hpp
@@ -5700,12 +5700,13 @@ public:
impl(const path& path, directory_options options)
: _base(path)
, _options(options)
- , _dir(nullptr)
+ , _namelist(nullptr)
+ , _namelisti(-1)
, _entry(nullptr)
{
if (!path.empty()) {
- do { _dir = ::opendir(path.native().c_str()); } while(errno == EINTR);
- if (!_dir) {
+ _namelisti = _namelistn = ::scandir(path.native().c_str(), &_namelist, NULL, alphasort);
+ if (_namelistn == -1) {
auto error = errno;
_base = filesystem::path();
if ((error != EACCES && error != EPERM) || (options & directory_options::skip_permission_denied) == directory_options::none) {
@@ -5720,19 +5721,23 @@ public:
impl(const impl& other) = delete;
~impl()
{
- if (_dir) {
- ::closedir(_dir);
+ if (_namelist) {
+ for (int i=_namelistn-1; i>=0; i--) {
+ free(_namelist[i]);
+ }
+ free(_namelist);
+ _namelist = nullptr;
}
}
void increment(std::error_code& ec)
{
- if (_dir) {
+ if (_namelist) {
bool skip;
do {
skip = false;
errno = 0;
- do { _entry = ::readdir(_dir); } while(errno == EINTR);
- if (_entry) {
+ if (_namelisti > 0 ) {
+ _entry = _namelist[--_namelisti];
_dir_entry._path = _base;
_dir_entry._path.append_name(_entry->d_name);
copyToDirEntry();
@@ -5742,8 +5747,11 @@ public:
}
}
else {
- ::closedir(_dir);
- _dir = nullptr;
+ for (int i=_namelistn-1; i>=0; i--) {
+ free(_namelist[i]);
+ }
+ free(_namelist);
+ _namelist = nullptr;
_dir_entry._path.clear();
if (errno && errno != EINTR) {
ec = detail::make_system_error();
@@ -5772,7 +5780,9 @@ public:
}
path _base;
directory_options _options;
- DIR* _dir;
+ int _namelisti;
+ int _namelistn;
+ struct dirent **_namelist;
struct ::dirent* _entry;
directory_entry _dir_entry;
std::error_code _ec;