Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
True fix for getline under FreeBSD
  • Loading branch information
vigsterkr committed Jul 8, 2012
1 parent 69d4274 commit 643ee74
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/shogun/io/AsciiFile.cpp
Expand Up @@ -17,9 +17,6 @@
#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 @@ -1016,7 +1013,7 @@ template <class T> void CAsciiFile::append_item(
items->append_element(item);
}

#ifdef __MACH__
#if defined(__MACH__) || defined(FREEBSD)
ssize_t CAsciiFile::getdelim(char **lineptr, size_t *n, char delimiter, FILE *stream)
{
int32_t total_bytes_read=0;
Expand Down Expand Up @@ -1085,11 +1082,7 @@ 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 643ee74

Please sign in to comment.