Fix getdelim and getline having the wrong external linkage.

This commit is contained in:
Jonas 'Sortie' Termansen 2013-09-24 17:09:35 +02:00
parent 8a7a0db8c7
commit 8d2c585479
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
ssize_t getdelim(char** lineptr, size_t* n, int delim, FILE* fp)
extern "C" ssize_t getdelim(char** lineptr, size_t* n, int delim, FILE* fp)
{
if ( !lineptr || (*lineptr && !n) || !fp ) { errno = EINVAL; return -1; }
const size_t DEFAULT_BUFSIZE = 32UL;

View File

@ -24,7 +24,7 @@
#include <stdio.h>
ssize_t getline(char** lineptr, size_t* n, FILE* fp)
extern "C" ssize_t getline(char** lineptr, size_t* n, FILE* fp)
{
return getdelim(lineptr, n, '\n', fp);
}