#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
int main(void) {
FILE *fileDescr;
int n;
size_t *bufferSize = malloc(0);
char **bufferPointer = (char **)malloc(sizeof(char*));
*bufferPointer = NULL;
if ( (fileDescr = fopen("someFile","r")) == NULL) {
exit(1);
}
while( (n = getline(bufferPointer, bufferSize, fileDescr)) > 0)
fputs(*bufferPointer,stdout);
return 0;
}