From d9ff7bbcd2eef852f18ad65d79aa6b6f7c58535c Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 4 Jun 2007 10:37:00 -0400 Subject: Remove hardcoded defines from libalpm Remove any use of the former path variables defined by the Makefiles or config.h. These are now runtime configurable only with pacman.conf (or by using flags on the command line). Signed-off-by: Dan McGee --- lib/libalpm/Makefile.am | 6 +----- lib/libalpm/handle.c | 10 +++++----- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am index 285a9a83..e3d6a188 100644 --- a/lib/libalpm/Makefile.am +++ b/lib/libalpm/Makefile.am @@ -10,11 +10,7 @@ cachedir = ${localstatedir}/cache/pacman/pkg/ lib_LTLIBRARIES = libalpm.la include_HEADERS = alpm_list.h alpm.h -DEFS = -DLOCALEDIR=\"@localedir@\" \ - -DLOCKFILE=\"$(lockfile)\" \ - -DDBPATH=\"$(dbpath)\" \ - -DCACHEDIR=\"$(cachedir)\" \ - @DEFS@ +DEFS = -DLOCALEDIR=\"@localedir@\" @DEFS@ AM_CFLAGS = -fvisibility=hidden -pedantic -D_GNU_SOURCE diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 9aa7cce1..d2e3dd0d 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -78,12 +78,12 @@ pmhandle_t *_alpm_handle_new() //#else handle->access = PM_ACCESS_RW; #endif - - handle->root = strdup(ROOTDIR); - handle->dbpath = strdup(DBPATH); - handle->cachedir = strdup(CACHEDIR); - handle->lockfile = strdup(LOCKFILE); handle->logmask = PM_LOG_ERROR | PM_LOG_WARNING; + handle->root = NULL; + handle->dbpath = NULL; + handle->cachedir = NULL; + handle->lockfile = NULL; + handle->logfile = NULL; return(handle); } -- cgit v1.2.3-70-g09d2