GNOME Bugzilla – Bug 723065
[PATCH] Wrong main function declaration and missing includes
Last modified: 2014-02-05 13:20:19 UTC
Created attachment 267268 [details] [review] Add #include <libintl.h> and correct main function declaration The type of the second argument of main function should be char* [], not char*. This file use functions from gettext, so #include <libintl.h> is needed.
Review of attachment 267268 [details] [review]: ::: src/main.c @@ +24,3 @@ #include <girepository.h> #include <gjs/gjs.h> +#include <libintl.h> Why is this needed? When I do the following: $ export LANG=sv_SE.UTF-8; gnome-maps ... in a jhbuild shell with current master (without your patch) it seems to work fine. Just asking so that I understand what your patch does and why. :) @@ +30,2 @@ { const char *search_path[] = { "resource:///org/gnome/maps", NULL }; Sure!
35 bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); 36 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); 37 textdomain (GETTEXT_PACKAGE); These 3 lines use functions from libintl.h. Add #include <libintl.h> to prevent implicit declarations. Some compilers allow implicit declarations, but this may cause problem on some systems.
Review of attachment 267268 [details] [review]: ::: src/main.c @@ +24,3 @@ #include <girepository.h> #include <gjs/gjs.h> +#include <libintl.h> I don't think including a header has anything to do with l10n at runtime. Are you sure he is not fixing one of those compiler warnings you introduced. :)
Review of attachment 267268 [details] [review]: Please try to follow the guidelines for commit logs: https://wiki.gnome.org/Git/CommitMessages
Oh great, Ting-Wei didn't follow up on the patch and we forgot about this all together. Now our latest release is broken in fedora builds :( http://kojipkgs.fedoraproject.org//work/tasks/3849/6493849/build.log
And I only now realize that patch does not have a log at all cause it was generated as `git diff`. Please use `git format-patch` to create the patch or simply use git-bz for an easy way to submit patches.
Pushed modified versions of attached patch, mainly just divided it into seperate patches and fixed another issue.