doing the right thing.
Brian Havard implemented buffering for ap_fgets() on Win32 recently; OS/2 had
it already. This provides it for Unix.
changes to ap_read(), ap_getc(), ap_fgets() for Unix:
1) this fixes a problem in where ap_open() where a lock is created for
non-buffered files
2) this fixes problems setting rv correctly in the ap_read() buffered
path
3) since ap_read() works as expected, it is possible to make ap_getc()
and ap_fgets() even smaller
4) ap_fgets() no longer cares about '\r'
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85586
13f79535-47bb-0310-9956-
ffa450edef68
return APR_EACCES;
}
- status = ap_open(&file, name, APR_READ, APR_OS_DEFAULT, p);
+ status = ap_open(&file, name, APR_READ | APR_BUFFERED, APR_OS_DEFAULT, p);
#ifdef DEBUG
ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, NULL,
"Opening config file %s (%s)",