* strsignal() declaration in lin-lwp.c?
@ 2002-12-05 13:43 Kevin Buettner
2002-12-05 13:57 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2002-12-05 13:43 UTC (permalink / raw)
To: gdb
I've just run into a problem in which the definition of strsignal() in
lin-lwp.c conflicts with the definition in <string.h>. Here's the
declaration in lin-lwp.c:
extern const char *strsignal (int sig);
And here's what it looks like in <string.h>:
extern char *strsignal (int __sig) __THROW;
The fact that the lin-lwp.c version has a ``const'' is the problem.
Could we remove the ``const'' from the lin-lwp.c declaration?
It seems that we can't remove the declaration entirely because
the declaration that I'm seeing in the header file won't be used
if __USE_GNU is undefined.
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: strsignal() declaration in lin-lwp.c?
2002-12-05 13:43 strsignal() declaration in lin-lwp.c? Kevin Buettner
@ 2002-12-05 13:57 ` Daniel Jacobowitz
2002-12-07 3:53 ` Mark Kettenis
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2002-12-05 13:57 UTC (permalink / raw)
To: gdb
On Thu, Dec 05, 2002 at 02:43:32PM -0700, Kevin Buettner wrote:
> I've just run into a problem in which the definition of strsignal() in
> lin-lwp.c conflicts with the definition in <string.h>. Here's the
> declaration in lin-lwp.c:
>
> extern const char *strsignal (int sig);
>
> And here's what it looks like in <string.h>:
>
> extern char *strsignal (int __sig) __THROW;
>
> The fact that the lin-lwp.c version has a ``const'' is the problem.
>
> Could we remove the ``const'' from the lin-lwp.c declaration?
>
> It seems that we can't remove the declaration entirely because
> the declaration that I'm seeing in the header file won't be used
> if __USE_GNU is undefined.
I'd say we could remove the const - or just use -D_GNU_SOURCE...
Glibc 2.3.1 has it without const, and so does 2.2.5.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: strsignal() declaration in lin-lwp.c?
2002-12-05 13:57 ` Daniel Jacobowitz
@ 2002-12-07 3:53 ` Mark Kettenis
0 siblings, 0 replies; 3+ messages in thread
From: Mark Kettenis @ 2002-12-07 3:53 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
Daniel Jacobowitz <drow@mvista.com> writes:
> On Thu, Dec 05, 2002 at 02:43:32PM -0700, Kevin Buettner wrote:
> > I've just run into a problem in which the definition of strsignal() in
> > lin-lwp.c conflicts with the definition in <string.h>. Here's the
> > declaration in lin-lwp.c:
> >
> > extern const char *strsignal (int sig);
> >
> > And here's what it looks like in <string.h>:
> >
> > extern char *strsignal (int __sig) __THROW;
> >
> > The fact that the lin-lwp.c version has a ``const'' is the problem.
> >
> > Could we remove the ``const'' from the lin-lwp.c declaration?
I think so.
> > It seems that we can't remove the declaration entirely because
> > the declaration that I'm seeing in the header file won't be used
> > if __USE_GNU is undefined.
>
> I'd say we could remove the const - or just use -D_GNU_SOURCE...
> Glibc 2.3.1 has it without const, and so does 2.2.5.
Let's remove the const first. We probably should consider
-D_GNU_SOURCE but that requires some serious testing.
Kevin, consider your patch approved.
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-12-07 11:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-05 13:43 strsignal() declaration in lin-lwp.c? Kevin Buettner
2002-12-05 13:57 ` Daniel Jacobowitz
2002-12-07 3:53 ` Mark Kettenis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox