summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw44@gmail.com>2016-11-16 01:50:48 +0800
committerTing-Wei Lan <lantw44@gmail.com>2016-11-16 02:09:12 +0800
commit0236b16114dda5faf3dccabee147dfdd55c256ce (patch)
treeb0b06e950ee22e0b3f8fe65c8bb4c90875c8d118 /tests
parent3cb39b4f413cd8f456166f6b17ff5030828ecf54 (diff)
downloadlibpinyin-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')
-rw-r--r--tests/lookup/test_phrase_lookup.cpp4
-rw-r--r--tests/lookup/test_pinyin_lookup.cpp4
-rw-r--r--tests/storage/test_chewing_table.cpp4
-rw-r--r--tests/storage/test_matrix.cpp4
-rw-r--r--tests/storage/test_parser2.cpp4
-rw-r--r--tests/storage/test_phrase_table.cpp4
-rw-r--r--tests/test_chewing.cpp4
-rw-r--r--tests/test_phrase.cpp4
-rw-r--r--tests/test_pinyin.cpp4
9 files changed, 36 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"
diff --git a/tests/storage/test_chewing_table.cpp b/tests/storage/test_chewing_table.cpp
index 469819f..f417c65 100644
--- a/tests/storage/test_chewing_table.cpp
+++ b/tests/storage/test_chewing_table.cpp
@@ -18,6 +18,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "timer.h"
#include <string.h>
#include "pinyin_internal.h"
diff --git a/tests/storage/test_matrix.cpp b/tests/storage/test_matrix.cpp
index b6af231..a746927 100644
--- a/tests/storage/test_matrix.cpp
+++ b/tests/storage/test_matrix.cpp
@@ -18,6 +18,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "timer.h"
#include <stdlib.h>
#include "pinyin_internal.h"
diff --git a/tests/storage/test_parser2.cpp b/tests/storage/test_parser2.cpp
index 2752021..5c406ea 100644
--- a/tests/storage/test_parser2.cpp
+++ b/tests/storage/test_parser2.cpp
@@ -19,6 +19,10 @@
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "timer.h"
#include <errno.h>
#include <stdio.h>
diff --git a/tests/storage/test_phrase_table.cpp b/tests/storage/test_phrase_table.cpp
index 0aebdde..041588d 100644
--- a/tests/storage/test_phrase_table.cpp
+++ b/tests/storage/test_phrase_table.cpp
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "timer.h"
#include <string.h>
#include "pinyin_internal.h"
diff --git a/tests/test_chewing.cpp b/tests/test_chewing.cpp
index 7bc6422..d0f9c9b 100644
--- a/tests/test_chewing.cpp
+++ b/tests/test_chewing.cpp
@@ -19,6 +19,10 @@
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "pinyin.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/tests/test_phrase.cpp b/tests/test_phrase.cpp
index 57dd9fc..a983f40 100644
--- a/tests/test_phrase.cpp
+++ b/tests/test_phrase.cpp
@@ -19,6 +19,10 @@
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "pinyin.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/tests/test_pinyin.cpp b/tests/test_pinyin.cpp
index d0fb9f3..01e60c5 100644
--- a/tests/test_pinyin.cpp
+++ b/tests/test_pinyin.cpp
@@ -19,6 +19,10 @@
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "pinyin.h"
#include <stdio.h>
#include <stdlib.h>