| www.delorie.com/djgpp/bugs/show.cgi | search |
GDB uses the GNU `readline' library which has its own init file. On MS-DOS this file is "/inputrc". However, the code that reads it requires that the value returned by `read' is exactly the size of the file as reported by `stat'. This means that if you edit the file with a DOS editor, the contents of file will be ignored as if it cannot be read.
The following patch solves the problem.
*** readline/readline.c~1 Fri Jan 12 18:24:20 1996
--- readline/readline.c Sun May 5 18:09:28 1996
*************** rl_read_init_file (filename)
*** 5765,5772 ****
--- 5765,5778 ----
i = read (file, buffer, finfo.st_size);
close (file);
+ #ifdef __MSDOS__
+ if (i < 0)
+ return (errno);
+ finfo.st_size = i;
+ #else
if (i != finfo.st_size)
return (errno);
+ #endif
/* Loop over the lines in the file. Lines that start with `#' are
comments; all other lines are commands for readline initialization. *This bug is fixed in the rdln22[bs].zip distribution.
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2010 by DJ Delorie | Updated Jul 2010 |