commit a32dd716cb7444c6b743acc2975c37cf92d45bdc
parent dab1ff46da414544026bddfcadcae158db2b047f
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date: Tue, 22 Dec 2015 15:54:11 +0100
Renaming DBPATH to DATADIR
Diffstat:
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -4,7 +4,7 @@
# https://github.com/fcambus/logswan #
# #
# Created: 2015/05/31 #
-# Last Updated: 2015/11/12 #
+# Last Updated: 2015/12/22 #
# #
###############################################################################
@@ -27,12 +27,12 @@ if(NOT HAVE_STRTONUM)
set (SRC ${SRC} compat/strtonum.c)
endif()
-if(NOT DEFINED DBPATH)
- set(DBPATH ${CMAKE_INSTALL_PREFIX}/share/GeoIP)
+if(NOT DEFINED DATADIR)
+ set(DATADIR ${CMAKE_INSTALL_PREFIX}/share/GeoIP)
endif()
add_definitions(-Wall -Wextra -Werror -std=c99 -pedantic)
-add_definitions(-DDBPATH="${DBPATH}")
+add_definitions(-DDATADIR="${DATADIR}")
add_executable(logswan ${SRC} ${DEPS})
target_link_libraries(logswan ${LIB_GEOIP} ${LIB_JANSSON} m)
diff --git a/src/logswan.c b/src/logswan.c
@@ -4,7 +4,7 @@
/* https://github.com/fcambus/logswan */
/* */
/* Created: 2015/05/31 */
-/* Last Updated: 2015/12/19 */
+/* Last Updated: 2015/12/22 */
/* */
/* Logswan is released under the BSD 3-Clause license. */
/* See LICENSE file for details. */
@@ -102,8 +102,8 @@ int main (int argc, char *argv[]) {
begin = clock();
/* Initializing GeoIP */
- geoip = GeoIP_open(DBPATH "/GeoIP.dat", GEOIP_MEMORY_CACHE);
- geoipv6 = GeoIP_open(DBPATH "/GeoIPv6.dat", GEOIP_MEMORY_CACHE);
+ geoip = GeoIP_open(DATADIR "/GeoIP.dat", GEOIP_MEMORY_CACHE);
+ geoipv6 = GeoIP_open(DATADIR "/GeoIPv6.dat", GEOIP_MEMORY_CACHE);
/* Get log file size */
stat(intputFile, &logFileSize);