summaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>2000-03-17 21:46:59 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:53 +0000
commitbb70624e964126b7ac4ff085ba163a9c35ffa18f (patch)
treeba2dd4add13ada94b1899c6d4aca80195b80b74b /input.c
parentb72432fdcc59300c6fe7c9d6c8a31ad3447933f5 (diff)
downloadbash-bb70624e964126b7ac4ff085ba163a9c35ffa18f.tar.gz
Imported from ../bash-2.04.tar.gz.
Diffstat (limited to 'input.c')
-rw-r--r--input.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/input.c b/input.c
index 6ca49a80..c352d2ff 100644
--- a/input.c
+++ b/input.c
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License along
with Bash; see the file COPYING. If not, write to the Free Software
- Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+ Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#include "config.h"
@@ -47,7 +47,6 @@ extern int errno;
/* Functions to handle reading input on systems that don't restart read(2)
if a signal is received. */
-#if !defined (HAVE_RESTARTABLE_SYSCALLS)
static unsigned char localbuf[128];
static int local_index, local_bufused;
@@ -86,13 +85,16 @@ ungetc_with_restart (c, stream)
return EOF;
return (localbuf[--local_index] = c);
}
-#endif /* !HAVE_RESTARTABLE_SYSCALLS */
#if defined (BUFFERED_INPUT)
/* A facility similar to stdio, but input-only. */
-#define MAX_INPUT_BUFFER_SIZE 8192
+#if defined (USING_BASH_MALLOC)
+# define MAX_INPUT_BUFFER_SIZE 8176
+#else
+# define MAX_INPUT_BUFFER_SIZE 8192
+#endif
#if !defined (SEEK_CUR)
# define SEEK_CUR 1
@@ -378,11 +380,7 @@ static int
b_fill_buffer (bp)
BUFFERED_STREAM *bp;
{
- do
- {
- bp->b_used = read (bp->b_fd, bp->b_buffer, bp->b_size);
- }
- while (bp->b_used < 0 && errno == EINTR);
+ bp->b_used = zread (bp->b_fd, bp->b_buffer, bp->b_size);
if (bp->b_used <= 0)
{
bp->b_buffer[0] = 0;