summaryrefslogtreecommitdiff
path: root/utils/segment
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 /utils/segment
parent3cb39b4f413cd8f456166f6b17ff5030828ecf54 (diff)
downloadlibpinyin-0236b16114dda5faf3dccabee147dfdd55c256ce.tar.gz
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 'utils/segment')
-rw-r--r--utils/segment/mergeseq.cpp4
-rw-r--r--utils/segment/ngseg.cpp4
-rw-r--r--utils/segment/spseg.cpp4
3 files changed, 12 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <locale.h>
#include <string.h>
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 <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
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 <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <string.h>
#include <locale.h>