Skip to content

Commit

Permalink
Fix getline function definition for FreeBSD
Browse files Browse the repository at this point in the history
Check man 3 getline for details on a FreeBSD machine:
http://www.unix.com/man-page/freebsd/3/getline/
  • Loading branch information
vigsterkr committed Jul 8, 2012
1 parent 97763bb commit 69d4274
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/shogun/io/AsciiFile.cpp
Expand Up @@ -17,6 +17,9 @@
#include <shogun/io/AsciiFile.h>
#include <shogun/mathematics/Math.h>
#include <ctype.h>
#if FREEBSD
#define _WITH_GETLINE
#endif
#include <stdio.h>

using namespace shogun;
Expand Down Expand Up @@ -1082,7 +1085,11 @@ ssize_t CAsciiFile::getdelim(char **lineptr, size_t *n, char delimiter, FILE *st

ssize_t CAsciiFile::getline(char **lineptr, size_t *n, FILE *stream)
{
#if FREEBSD
return getline(lineptr, n, stream);
#else
return ::getline(lineptr, n, stream);
#endif
}
#endif

Expand Down

0 comments on commit 69d4274

Please sign in to comment.