|  | @@ -3972,16 +3972,16 @@ test_util_fgets_eagain(void *ptr)
 | 
	
		
			
				|  |  |    /* Send in a partial line */
 | 
	
		
			
				|  |  |    retlen = write(test_pipe[1], "A", 1);
 | 
	
		
			
				|  |  |    tt_int_op(retlen, OP_EQ, 1);
 | 
	
		
			
				|  |  | -  retptr = fgets(buf, sizeof(buf), test_stream);
 | 
	
		
			
				|  |  | +  retptr = tor_fgets(buf, sizeof(buf), test_stream);
 | 
	
		
			
				|  |  |    tt_int_op(errno, OP_EQ, EAGAIN);
 | 
	
		
			
				|  |  | -  tt_ptr_op(retptr, OP_EQ, buf);
 | 
	
		
			
				|  |  | +  tt_ptr_op(retptr, OP_EQ, NULL);
 | 
	
		
			
				|  |  |    tt_str_op(buf, OP_EQ, "A");
 | 
	
		
			
				|  |  |    errno = 0;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    /* Send in the rest */
 | 
	
		
			
				|  |  |    retlen = write(test_pipe[1], "B\n", 2);
 | 
	
		
			
				|  |  |    tt_int_op(retlen, OP_EQ, 2);
 | 
	
		
			
				|  |  | -  retptr = fgets(buf, sizeof(buf), test_stream);
 | 
	
		
			
				|  |  | +  retptr = tor_fgets(buf, sizeof(buf), test_stream);
 | 
	
		
			
				|  |  |    tt_int_op(errno, OP_EQ, 0);
 | 
	
		
			
				|  |  |    tt_ptr_op(retptr, OP_EQ, buf);
 | 
	
		
			
				|  |  |    tt_str_op(buf, OP_EQ, "B\n");
 | 
	
	
		
			
				|  | @@ -3990,7 +3990,7 @@ test_util_fgets_eagain(void *ptr)
 | 
	
		
			
				|  |  |    /* Send in a full line */
 | 
	
		
			
				|  |  |    retlen = write(test_pipe[1], "CD\n", 3);
 | 
	
		
			
				|  |  |    tt_int_op(retlen, OP_EQ, 3);
 | 
	
		
			
				|  |  | -  retptr = fgets(buf, sizeof(buf), test_stream);
 | 
	
		
			
				|  |  | +  retptr = tor_fgets(buf, sizeof(buf), test_stream);
 | 
	
		
			
				|  |  |    tt_int_op(errno, OP_EQ, 0);
 | 
	
		
			
				|  |  |    tt_ptr_op(retptr, OP_EQ, buf);
 | 
	
		
			
				|  |  |    tt_str_op(buf, OP_EQ, "CD\n");
 | 
	
	
		
			
				|  | @@ -3999,16 +3999,16 @@ test_util_fgets_eagain(void *ptr)
 | 
	
		
			
				|  |  |    /* Send in a partial line */
 | 
	
		
			
				|  |  |    retlen = write(test_pipe[1], "E", 1);
 | 
	
		
			
				|  |  |    tt_int_op(retlen, OP_EQ, 1);
 | 
	
		
			
				|  |  | -  retptr = fgets(buf, sizeof(buf), test_stream);
 | 
	
		
			
				|  |  | +  retptr = tor_fgets(buf, sizeof(buf), test_stream);
 | 
	
		
			
				|  |  |    tt_int_op(errno, OP_EQ, EAGAIN);
 | 
	
		
			
				|  |  | -  tt_ptr_op(retptr, OP_EQ, buf);
 | 
	
		
			
				|  |  | +  tt_ptr_op(retptr, OP_EQ, NULL);
 | 
	
		
			
				|  |  |    tt_str_op(buf, OP_EQ, "E");
 | 
	
		
			
				|  |  |    errno = 0;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    /* Send in the rest */
 | 
	
		
			
				|  |  |    retlen = write(test_pipe[1], "F\n", 2);
 | 
	
		
			
				|  |  |    tt_int_op(retlen, OP_EQ, 2);
 | 
	
		
			
				|  |  | -  retptr = fgets(buf, sizeof(buf), test_stream);
 | 
	
		
			
				|  |  | +  retptr = tor_fgets(buf, sizeof(buf), test_stream);
 | 
	
		
			
				|  |  |    tt_int_op(errno, OP_EQ, 0);
 | 
	
		
			
				|  |  |    tt_ptr_op(retptr, OP_EQ, buf);
 | 
	
		
			
				|  |  |    tt_str_op(buf, OP_EQ, "F\n");
 | 
	
	
		
			
				|  | @@ -4020,14 +4020,14 @@ test_util_fgets_eagain(void *ptr)
 | 
	
		
			
				|  |  |    retval = close(test_pipe[1]);
 | 
	
		
			
				|  |  |    tt_int_op(retval, OP_EQ, 0);
 | 
	
		
			
				|  |  |    test_pipe[1] = -1;
 | 
	
		
			
				|  |  | -  retptr = fgets(buf, sizeof(buf), test_stream);
 | 
	
		
			
				|  |  | +  retptr = tor_fgets(buf, sizeof(buf), test_stream);
 | 
	
		
			
				|  |  |    tt_int_op(errno, OP_EQ, 0);
 | 
	
		
			
				|  |  |    tt_ptr_op(retptr, OP_EQ, buf);
 | 
	
		
			
				|  |  |    tt_str_op(buf, OP_EQ, "GH");
 | 
	
		
			
				|  |  |    errno = 0;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    /* Check for EOF */
 | 
	
		
			
				|  |  | -  retptr = fgets(buf, sizeof(buf), test_stream);
 | 
	
		
			
				|  |  | +  retptr = tor_fgets(buf, sizeof(buf), test_stream);
 | 
	
		
			
				|  |  |    tt_int_op(errno, OP_EQ, 0);
 | 
	
		
			
				|  |  |    tt_ptr_op(retptr, OP_EQ, NULL);
 | 
	
		
			
				|  |  |    retval = feof(test_stream);
 |