l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2004 Sep 30 12:03

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] compiler error causing me great sadness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] compiler error causing me great sadness

On Wed, 29 Sep 2004, Peter Jay Salzman wrote:

> The definition for siginfo_t isn't being pulled in, even though it SHOULD be
> in signal.h.   But why is gcc telling me:
>    warning: function declaration isn't a prototype
> What's that supposed to mean?  Why isn't the declaration a prototype?  That's
> just bizarre!  It sure looks like a prototype!  My implicit assumption is
> that the warning is related to the error.  Maybe they're unrelated.  I dunno.

Not exactly sure without looking at the source, but my guess is that it's
because the compiler doesn't understand what "siginfo_t" is.  If it's a
struct, then the function declaration makes sense.  But if it's a variable
name then the declaration doesn't make sense.  The compiler hasn't seen
the definition of siginfo_t, so it's warning you that it what you got
there is possibly not a function.

> OK, I figured this out with a cockamamy fix.  Now I want to know how I'm
> _really_ supposed to make this compile.

What Ken said is probably right.

> How am I supposed to figure out how to get a definition for siginfo_t?  Am I
> really supposed to grub around in the libc header files???

Grep (quick and dirty):

   $ find /usr/include -type f -exec grep -H siginfo_t \{\} \;

Or use ctags (more elegant):

   $ ctags `find /usr/include -type f`
   $ vi
     :tag siginfo_t
     :tn or :tN to browse through the different definitions of siginfo_t

But either way, it doesn't tell you the *right* way to include what
you're looking for, and if there are multiple definitions it won't tell
you which definition is used in your code.  But at least you don't have
to grunge around the headers for definitions...


Mark K. Kim
AIM: markus kimius
Homepage: http://www.cbreak.org/
Xanga: http://www.xanga.com/vindaci
Friendster: http://www.friendster.com/user.php?uid=13046
PGP key fingerprint: 7324 BACA 53AD E504 A76E  5167 6822 94F0 F298 5DCE
PGP key available on the homepage
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.