bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-readline] Potential issue with readline fileman.c example


From: Adam Gashlin
Subject: [Bug-readline] Potential issue with readline fileman.c example
Date: Mon, 11 Aug 2008 18:31:39 -0500

I ran across a possible issue with the fileman.c example when using a
modified version that uses editline instead. The issue revolved around
ctime being improperly implicitly declared because time.h was not
included. readline's fileman.c doesn't include time.h either, but the
issue does not manifest itself as readline/history.h happens to
include time.h. This reliance is probably unintended, so I felt that I
should point it out.
I'm attaching the bug report I sent regarding editline in case you'd
like to know.

-Adam Gashlin

---------- Forwarded message ----------
From: Adam Gashlin <address@hidden>
Date: Mon, 11 Aug 2008 18:07:32 -0500
Subject: Issue with editline fileman.c example (w/ fix)
To: address@hidden

I encountered a minor issue with fileman.c on x86_64 with gcc 4.1.0.
Notably ints and pointers are different sizes (32 and 64 bits,
respectively). Thus the use of ctime in com_stat (line 365) implicitly
declares ctime as returning the wrong sized value. This can be
resolved simply by including time.h to provide a prototype with the
correct return type.
This issue appears to be in the original readline example as well,
though it does not manifest as time.h is included from
readline/history.h. Still, I'll let them know.

I'm glad there's only this minor issue to complain about, thanks!

-Adam Gashlin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]