Hash :
3e53db21
Author :
Date :
2010-08-28T16:12:37
read-file: Avoid memory reallocations with regular files. * lib/read-file.c: Include <sys/stat.h>, <stdio.h>, <stdint.h>. (fread_file): With regular files, use the remaining length as the initial buffer size. Check against overflow. * modules/read-file (Depends-on): Add ftello, malloc-posix, stdint, sys_stat.
Description:
read_file() function: read the contents of a file into a string
Files:
lib/read-file.h
lib/read-file.c
m4/read-file.m4
Depends-on:
ftello
malloc-posix
realloc-posix
stdint
sys_stat
configure.ac:
gl_FUNC_READ_FILE
Makefile.am:
Include:
"read-file.h"
License:
LGPLv2+
Maintainer:
Simon Josefsson