mirror of https://github.com/xzeldon/htop.git
Quote SYSCONFDIR definition
As SYSCONFDIR is a compile time string literal, use compile time string concatenation instead of a runtime one. Also drop related TODO, cause we indeed using the correct way of getting $sysconfdir from autoconf
This commit is contained in:
parent
06b1674aa6
commit
8bd543562b
|
@ -18,7 +18,7 @@ pixmap_DATA = htop.png
|
||||||
appicondir = $(datadir)/icons/hicolor/scalable/apps
|
appicondir = $(datadir)/icons/hicolor/scalable/apps
|
||||||
appicon_DATA = htop.svg
|
appicon_DATA = htop.svg
|
||||||
|
|
||||||
AM_CFLAGS += -pedantic -std=c99 -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"$(sysconfdir)\" -I"$(top_srcdir)/$(my_htop_platform)"
|
AM_CFLAGS += -pedantic -std=c99 -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR="\"$(sysconfdir)\"" -I"$(top_srcdir)/$(my_htop_platform)"
|
||||||
AM_LDFLAGS =
|
AM_LDFLAGS =
|
||||||
|
|
||||||
myhtopsources = \
|
myhtopsources = \
|
||||||
|
|
|
@ -424,10 +424,7 @@ Settings* Settings_new(int initialCpuCount) {
|
||||||
}
|
}
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
this->changed = true;
|
this->changed = true;
|
||||||
// TODO: how to get SYSCONFDIR correctly through Autoconf?
|
ok = Settings_read(this, SYSCONFDIR "/htoprc", initialCpuCount);
|
||||||
char* systemSettings = String_cat(SYSCONFDIR, "/htoprc");
|
|
||||||
ok = Settings_read(this, systemSettings, initialCpuCount);
|
|
||||||
free(systemSettings);
|
|
||||||
}
|
}
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
Settings_defaultMeters(this, initialCpuCount);
|
Settings_defaultMeters(this, initialCpuCount);
|
||||||
|
|
Loading…
Reference in New Issue