On 5/26/17 1:18 PM, Roman Bogorodskiy wrote:

> In combination with -Werror it causes build failure. I've checked the
> 'devel' branch of readline and rltypedefs.h looks the same (at least
> relevant parts of it).
> 
> This works for me if I change it too:
> 
> typedef int Function (void) __attribute__ ((deprecated));
> 
> and other typedefs in a similar way.

But that's not how they're used, or the appropriate fix.  They're not used
by readline itself at all, only by applications that use it. The idea is
that these exist for long-ago backwards compatibility -- and there are
still existing applications that use them as typedefs for function-with-an-
unknown-number-of-arguments-with-a-particular-return-type. I discovered
this when I tried to remove the old typedefs in readline-6.3, back in 2013,
and I had to add them back in with readline-6.3 patch 5.

If you want to avoid this, you can add -D_FUNCTION_DEF to the CFLAGS you
use to build whatever application you want to link with readline.

(I know, I know, I announced they were deprecated almost 17 years ago:
https://lists.gnu.org/archive/html/bug-bash/2000-10/msg00078.html. But
applications are still catching up. Lots of apps changed in 2014 after I
removed them, but there were enough that did not, or would not, that I
added them back.)

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [email protected]    http://cnswww.cns.cwru.edu/~chet/

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Bug-readline mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-readline

Reply via email to