Correct data types in calls to std::accumulate(). The "bandwidth" deques
have type "long long", so the initial value of the accumulator (0) must
also be "long long" (i.e., "0ll") to prevent integer overflows. Also,
since since the bandwidth deques are (signed) "long long", the avg_speed
should presumably be a signed "long long" instead of an unsigned
"uint64_t". The previous behavior was for large bandwidth values to
overflow the accumulator, resulting in a negative total, which then was
cast to be a huge "uint64_t" value. As a consequence, the network graph
autoscaling was broken for large bandwidths.
Clang 16.0.0 or later can now be used to compile btop. Simply call
`CXX=clang++` make.
If the CXX variable contains an incompatible Clang version try to
fallback to GCC.
Returning from the thread this way prevents local variables to be
destructed correctly since pthread_exit is marked noreturn.
This fixes a segmentation fault with glibc and llvm-libunwind on exit.
check.
Clang cannot handle <semaphore> being included in a namespace, which is
also unadvised see:
https://softwareengineering.stackexchange.com/a/335261.
Using the fallback <semaphore.h> is only meant for GCC 10, but Clang
defines `__GNUC__ = 4` so exclude Clang.
Recently Everforest developers [updated](https://github.com/sainnhe/everforest/issues/110) the color scheme. This is an edit that changes the colors in accordance with the new Everforest colors and also changes the net graph colors to have a better-looking gradient.
In preparation for LLVM support use -ftree-vectorize as it is understood
by clang (unlike -ftree-loop-vectorize) and it is an umbrella for the
former and -ftree-slp-vectorize. See https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html.
Add the popular Adwaita theme for people who like a theme matching GTK applications.
Note: I used a 3 colors gradient while the start and mid-colors are the same, this is not a mistake, it's because using a two colors gradient it would create ugly mid-colors.
Since directory creation is a requirement for writing the built
artifacts, this commit introduces a dependency on the directories for
all build targets (compile and link), so parallel builds can't fail
because a build target is executed before the directories target.
Closes: https://github.com/aristocratos/btop/issues/479