diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2016-11-16 01:50:48 +0800 |
---|---|---|
committer | Ting-Wei Lan <lantw44@gmail.com> | 2016-11-16 02:09:12 +0800 |
commit | 0236b16114dda5faf3dccabee147dfdd55c256ce (patch) | |
tree | b0b06e950ee22e0b3f8fe65c8bb4c90875c8d118 /tests/lookup | |
parent | 3cb39b4f413cd8f456166f6b17ff5030828ecf54 (diff) | |
download | libpinyin-0236b16114dda5faf3dccabee147dfdd55c256ce.tar.gz libpinyin-0236b16114dda5faf3dccabee147dfdd55c256ce.tar.xz libpinyin-0236b16114dda5faf3dccabee147dfdd55c256ce.zip |
include config.h to allow using getline on freebsd
We need _GNU_SOURCE macro defined in config.h to enable the declaration
of getline in FreeBSD stdio.h.
https://github.com/libpinyin/libpinyin/issues/65
Diffstat (limited to 'tests/lookup')
-rw-r--r-- | tests/lookup/test_phrase_lookup.cpp | 4 | ||||
-rw-r--r-- | tests/lookup/test_pinyin_lookup.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/lookup/test_phrase_lookup.cpp b/tests/lookup/test_phrase_lookup.cpp index 4febcc7..3a475b9 100644 --- a/tests/lookup/test_phrase_lookup.cpp +++ b/tests/lookup/test_phrase_lookup.cpp @@ -19,6 +19,10 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdio.h> #include <locale.h> #include "pinyin_internal.h" diff --git a/tests/lookup/test_pinyin_lookup.cpp b/tests/lookup/test_pinyin_lookup.cpp index 26c2d73..b0af455 100644 --- a/tests/lookup/test_pinyin_lookup.cpp +++ b/tests/lookup/test_pinyin_lookup.cpp @@ -19,6 +19,10 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "timer.h" #include <string.h> #include "pinyin_internal.h" |