|
From: | Pedro Giffuni |
Subject: | [Bug-readline] Wrong use of fputs() in examples/rlcat.c |
Date: | Wed, 3 May 2017 13:30:34 -0500 |
User-agent: | Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 |
Hello;
In FreeBSD we are still using libreadline-5.2 and we noticed you are expecting fputs() to return zero. According to POSIX: "Upon successful completion, fputs() shall return a non-negative number." Apple's libc and recent FreeBSD return the last character written so this code will not work as expected. A possible fix: --- examples/rlcat.c (revision 317755) ___
Pedro. |
[Prev in Thread] | Current Thread | [Next in Thread] |