diff options
author | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2014-01-03 11:10:49 +0100 |
---|---|---|
committer | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2014-01-03 23:06:21 +0100 |
commit | d02442c0d7de4748403d8b4af764b36ac2e9e7a3 (patch) | |
tree | 5637478d2e93fc2a09059b33acc5397393d80f99 | |
parent | e0dcdd3634c63dd6bf4ade9f07ccef90193d17b8 (diff) | |
download | ratpoison-d02442c0d7de4748403d8b4af764b36ac2e9e7a3.zip |
Open $sysconfdir/ratpoisonrc, don't hardcode /etc.
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/main.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index b4ce142..35c2689 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,7 +24,7 @@ MAINTAINERCLEANFILES = Makefile.in config.h.in AM_LDFLAGS=${X_LDFLAGS} ratpoison_LDADD=${XFT_LIBS} ${X_LIBS} ${X_EXTRA_LIBS} ${HISTORY_LIBS} -AM_CPPFLAGS=${X_CFLAGS} ${XFT_CFLAGS} +AM_CPPFLAGS=-DSYSCONFDIR='"$(sysconfdir)"' ${X_CFLAGS} ${XFT_CFLAGS} ratpoison_SOURCES = actions.c \ actions.h \ @@ -420,7 +420,7 @@ read_startup_files (char *alt_rcfile) else { /* first check $HOME/.ratpoisonrc and if that does not exist then try - /etc/ratpoisonrc */ + $sysconfdir/ratpoisonrc */ homedir = getenv ("HOME"); if (!homedir) @@ -439,7 +439,7 @@ read_startup_files (char *alt_rcfile) filename, strerror (errno))); free (filename); - filename = xsprintf ("%s/ratpoisonrc", "/etc"); + filename = xsprintf ("%s/ratpoisonrc", SYSCONFDIR); if ((fileptr = fopen (filename, "r")) == NULL) if (errno != ENOENT) |