Skip to content

Commit

Permalink
Merge pull request #179 from lantw44/master
Browse files Browse the repository at this point in the history
Fix inconsistent CHEWING_DATADIR definition
  • Loading branch information
czchen committed Feb 28, 2015
2 parents a67557a + 18afc93 commit 64d7821
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/include/internal \
-I$(top_srcdir)/src/porting_layer/include \
-DCHEWING_DATADIR=\"$(datadir)/chewing\" \
-DCHEWING_DATADIR=\"$(datadir)/libchewing\" \
$(USERPHRASE_CPPFLAGS) \
$(DEFAULT_CPPFLAGS) \
$(NULL)
Expand Down
2 changes: 1 addition & 1 deletion src/porting_layer/src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MAINTAINERCLEANFILES = Makefile.in

AM_CPPFLAGS = \
-DCHEWING_DATADIR=\"@datadir@\" \
-DCHEWING_DATADIR=\"$(datadir)/libchewing\" \
-I$(top_srcdir)/include \
-I$(top_srcdir)/include/internal \
-I$(top_srcdir)/src/porting_layer/include \
Expand Down
4 changes: 2 additions & 2 deletions src/porting_layer/src/plat_path.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ int get_search_path(char *path, size_t path_len)
} else {
home = getenv("HOME");
if (home) {
snprintf(path, path_len, "%s/.chewing" SEARCH_PATH_SEP CHEWING_DATADIR "/libchewing", home);
snprintf(path, path_len, "%s/.chewing" SEARCH_PATH_SEP CHEWING_DATADIR, home);
} else {
// No HOME ?
strncpy(path, SEARCH_PATH_SEP CHEWING_DATADIR "/libchewing", path_len);
strncpy(path, SEARCH_PATH_SEP CHEWING_DATADIR, path_len);
}
}

Expand Down

0 comments on commit 64d7821

Please sign in to comment.