After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 99516 - glib-genmarshal script does not put the #include directive in the c source file
glib-genmarshal script does not put the #include directive in the c source file
Status: RESOLVED WONTFIX
Product: glib
Classification: Platform
Component: gobject
2.0.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2002-11-25 16:19 UTC by Emmanuel ALLAUD
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
Patch (3.52 KB, patch)
2003-07-23 19:28 UTC, Ettore Perazzoli
none Details | Review

Description Emmanuel ALLAUD 2002-11-25 16:19:24 UTC
When I created the header and c files for user marshallers using
glib-genmarshal, I had to add the following line to the c file :

#include "name_of_the_source.h"

else I had warnings saying that they were undeclared functions.
Comment 1 Owen Taylor 2002-11-25 17:25:36 UTC
How would you fix it? glib-genmarshal doesn't know the name
of the target file. You just have to 

 echo '#include "foo-marshal.h"' > foo-marshal.c
 glib-genmarshal [stuff] >> foo-marshal.c

if you are using -Wmissing-prototypes
Comment 2 Emmanuel ALLAUD 2002-11-25 17:30:55 UTC
Yes you're right so I guess I have to hack a bit more my Makefile (I
want that to be automatic, so that we do not have to replunge in this
whenever we need a new marshaller.
Sorry for this "bug", and thanks for the tips.
Comment 3 Ettore Perazzoli 2003-07-23 18:16:05 UTC
Owen, maybe the .c file could also include the declarations for the
functions it defines?

It's certainly not a big deal, but it prevents people from building
with -Werror, and that's a bit annoying.
Comment 4 Owen Taylor 2003-07-23 18:35:40 UTC
Well, it certainly doesn't people from building
with -Werror -Wmissing-protos, see above for one
solution.

I suppose we could emit duplicated prototypes
into the C file, though it's essentially silly:
just a trick to fool -Wmissing-protos.

(The whole point of requiring prototypes is to 
prevent mismatches)

If you want to attach a patch and reopen the 
bug...








Comment 5 Ettore Perazzoli 2003-07-23 19:28:59 UTC
Created attachment 18552 [details] [review]
Patch