From 0236b16114dda5faf3dccabee147dfdd55c256ce Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Wed, 16 Nov 2016 01:50:48 +0800 Subject: 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 --- utils/segment/mergeseq.cpp | 4 ++++ utils/segment/ngseg.cpp | 4 ++++ utils/segment/spseg.cpp | 4 ++++ 3 files changed, 12 insertions(+) (limited to 'utils/segment') diff --git a/utils/segment/mergeseq.cpp b/utils/segment/mergeseq.cpp index 8adabb0..dc9dafc 100644 --- a/utils/segment/mergeseq.cpp +++ b/utils/segment/mergeseq.cpp @@ -18,6 +18,10 @@ * along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/utils/segment/ngseg.cpp b/utils/segment/ngseg.cpp index 6ca122d..dcc3c05 100644 --- a/utils/segment/ngseg.cpp +++ b/utils/segment/ngseg.cpp @@ -18,6 +18,10 @@ * along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/utils/segment/spseg.cpp b/utils/segment/spseg.cpp index 55176d9..42352a7 100644 --- a/utils/segment/spseg.cpp +++ b/utils/segment/spseg.cpp @@ -18,6 +18,10 @@ * along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include -- cgit v1.2.1