Commit Graph

34 Commits

Author SHA1 Message Date
Ryan Lortie
346aa683de Fix visibility for glib/ and gio/ submodules
We have various sub directories in glib/ and gio/ (eg: inotify, gnulib,
pcre, xdgmime, etc.) that build convenience libraries that are then
included into libglib and libgio.  The files in these directories need
to be built with the same visibility policy as the files in the first
level directories, so add CFLAGS for them all.

This wasn't a problem when the visibility flags were set directly in
CFLAGS but then we had to deal with some modules that we built that we
explicitly wanted to export symbols from.

For now, we can keep things the way they are because it's less hacky and
although it's a theoretical hazard to forget these CFLAGS, we rarely add
new subdirectories to the build.
2013-01-18 13:23:40 -05:00
Dan Winship
d68609f9fd Revert "xdgmime: plug a small leak"
This reverts commit 4e7031f073.

The string actually does get freed somewhere else, at least in some
cases. Can be looked at again later if this reintroduces a leak.

https://bugzilla.gnome.org/show_bug.cgi?id=683270
2012-09-03 10:07:31 -04:00
Dan Winship
4e7031f073 xdgmime: plug a small leak
https://bugzilla.gnome.org/show_bug.cgi?id=682560
2012-09-03 08:36:10 -04:00
Colin Walters
2542b6f604 xdgmime: Handle EINTR in open()
https://bugzilla.gnome.org/show_bug.cgi?id=682833
2012-08-28 13:56:58 -04:00
Dan Winship
749fa587bc fix a few warnings on non-Linux
mostly #ifdeffing functions that are only called by #ifdeffed code
2011-09-04 17:50:41 -04:00
Matthias Clasen
83d34f6309 Don't forget to free resources in an early return 2011-06-14 10:07:22 -04:00
Matthias Clasen
4c63303f9f Silence an uninitialize variable warning 2011-06-14 09:44:45 -04:00
Matthias Clasen
14e0ad7c53 Don't compile some unused functions in gio/xdgmime/ 2010-08-08 21:32:04 -04:00
Javier Jardón
c6243026ed Fix compilation warning: Remove unused function 2009-11-17 20:44:10 +01:00
Matthias Clasen
e63262d49d Don't give up too early when collecting mime types
Since returning exactly one match has special significance, don't
give up matching before we've found at least 2 types. Also, make
sure that we don't return the same mime type more than once.
Bug 541236.
2009-10-25 02:55:46 -04:00
Alexander Larsson
2a3710872f xdgmime: sort glob hits with larger weight first
Higher weight is more important, so return these first meaning
they will be used as the default.
2009-10-08 12:02:52 +02:00
Alexander Larsson
07ad638adf remove xdgmime test
This is getting diverged from the xdgmime copy and we don't need it here.
2009-10-02 12:55:54 +02:00
Alexander Larsson
c7c0bcef89 xdgmime - Correct the range checks for magic matching 2009-10-02 12:55:54 +02:00
Alexander Larsson
2624e7d6c6 Remove unnecessary includes 2009-10-02 12:55:54 +02:00
Alexander Larsson
e1643fd76d xdgmime - support the new case sensitive flag 2009-10-02 12:55:54 +02:00
Alexander Larsson
7c27df1fee xdgmime - support cache files with minor version 2 2009-10-02 12:55:54 +02:00
Alexander Larsson
ce239a010e Read the new glob2 format with case sensitive flags 2009-10-02 12:55:54 +02:00
Dan Winship
92ac8d165e Misc warning fixes
glib/pcre/pcre_ucp_search_funcs.c, glib/pcre/pcre_valid_utf8.c: add
back missing config.h includes, and this time add them to the copies
in glib/update-pcre/ too so they don't get lost again on the next PCRE
update.

glib/garray.c, glib/gbase64.c: fix signed/unsigned pointer casts

gio/xdgmime/xdgmimeglob.c: remove unused variable

gio/tests/live-g-file.c: fix printf args on x86_64

tests/Makefile.am, tests/regex-test.c: remove redundant -DENABLE_REGEX
2009-05-01 10:37:45 -04:00
Matthias Clasen
f8cfff0686 Don't assume filenames are UTF-8.
* xdgmime/xdgmimecache.c:
        * xdgmime/xdgmimeglob.c: Don't assume filenames are UTF-8.

svn path=/trunk/; revision=7784
2009-01-09 05:19:17 +00:00
Matthias Clasen
a6b965efa1 Make tests work with current shared-mime-info
svn path=/trunk/; revision=7783
2009-01-09 04:53:14 +00:00
Dan Winship
7943f976d4 cast a "char **" to "const char **" to avoid a warning.
* gdesktopappinfo.c (update_mimeapps_list): cast a "char **" to
	"const char **" to avoid a warning.

	* gemblem.c (g_emblem_from_tokens):
	* gemblemedicon.c (g_emblemed_icon_from_tokens):
	* xdgmime/xdgmime.c (xdg_mime_get_icon): remove unused
	variables

svn path=/trunk/; revision=7775
2009-01-05 16:57:55 +00:00
Matthias Clasen
a8c88cae76 Bug 555711 – Wrong fallback order of mimetype icons
* gcontenttype.c: Don't prefer generic icons over
        default mimetype icons.

        * xdgmime/xdgmimecache.c (xdg_mime_cache_get_icon):
        * xdgmime/xdgmime.c (xdg_mime_get_icon): Don't fall back
        to generic icons.
        Patch by Krysztof Kosiński


svn path=/trunk/; revision=7587
2008-10-10 05:07:56 +00:00
Matthias Clasen
80e11e1d4f Bug 551149 – xdgmime mem leak
2008-09-06  Matthias Clasen  <mclasen@redhat.com>

        Bug 551149 – xdgmime mem leak

        * xdgmime/xdgmime.c (xdg_mime_init_from_directory): Plug
        a memory leak. Patch by Christian Persch


svn path=/trunk/; revision=7441
2008-09-07 03:28:56 +00:00
Carlos Garcia Campos
f5edeb8c0f Bug 546079 – leak in xdgmime
2008-08-03  Carlos Garcia Campos  <carlosgc@gnome.org>

	Bug 546079 – leak in xdgmime
	
	* xdgmime/xdgmime.c (xdg_mime_shutdown): Fix memory leak.


svn path=/trunk/; revision=7292
2008-08-03 18:49:12 +00:00
Johan Dahlin
761424465a Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch


svn path=/trunk/; revision=7092
2008-06-22 15:10:51 +00:00
Matthias Clasen
9331b3f1ce Fix the build
svn path=/trunk/; revision=6977
2008-06-09 21:38:35 +00:00
Matthias Clasen
2bd31c9e6c Sync with upstream
svn path=/trunk/; revision=6975
2008-06-09 16:45:19 +00:00
Matthias Clasen
9fd295d285 Rework the timestamp checking code to protect against duplicate
2008-04-16  Matthias Clasen  <mclasen@redhat.com>

        * xdgmime/xdgmime.c: Rework the timestamp checking code
        to protect against duplicate directories in XDG_DATA_DIRS.
        Fixes fd.o bug 12513, reported by Joe Shaw.



svn path=/trunk/; revision=6859
2008-04-16 21:55:32 +00:00
Matthias Clasen
07ad3555ed Partically revert the last commit after realizing that
2008-04-16  Matthias Clasen  <mclasen@redhat.com>

        Partically revert the last commit after realizing that
        xdg_mime_media_type_equal doesn't have to init at all.

        * xdgmime/xdgmime.h:
        * xdgmime/xdgmime.c: Get rid of _xdg_mime_media_type_equal

        * xdgmime/xdgmimecache.c: Use xdg_mime_media_type_equal

svn path=/trunk/; revision=6857
2008-04-16 17:13:19 +00:00
Matthias Clasen
101521f6e4 Avoid possible memory corruption in xdgmime, fd.o bug 12512, reported by
2008-04-16  Matthias Clasen  <mclasen@redhat.com>

        Avoid possible memory corruption in xdgmime, fd.o bug 12512,
        reported by Joe Shaw and Federico Mena Quintero.

        * xdgmime/xdgmime.c(_xdg_mime_media_type_equal): Implement.
        (xdg_mime_media_type_equal): Turn into a wrapper around the
        _-prefixed version.

        * xdgmime/xdgmimecache.c: Use the _-prefixed versions of comparison
        functions throughout.


svn path=/trunk/; revision=6854
2008-04-16 16:54:44 +00:00
Alexander Larsson
5241d96b21 Fix sparse warnings (#519489)
2008-03-06  Alexander Larsson  <alexl@redhat.com>

        * gdesktopappinfo.c:
        * gfilemonitor.c:
        * gthemedicon.c:
        * gunionvolumemonitor.c:
        * gunixmounts.c:
        * tests/g-file.c:
        * tests/live-g-file.c:
        * xdgmime/xdgmimecache.c:
	Fix sparse warnings (#519489)


svn path=/trunk/; revision=6632
2008-03-06 09:53:35 +00:00
Alexander Larsson
e064f28435 Use list_parents, not get_parents from xdgmime, because the later doesn't
2008-01-29  Alexander Larsson  <alexl@redhat.com>

        * gcontenttype.c:
        (_g_unix_content_type_get_parents):
	Use list_parents, not get_parents from xdgmime, because
	the later doesn't use the cache.
	
        * xdgmime/xdgmimecache.c:
        (_xdg_mime_cache_list_mime_parents):
	Don't list the same type as parent multiple times.


svn path=/trunk/; revision=6407
2008-01-29 10:20:49 +00:00
Alexander Larsson
7f3280230b Added. Added. Added. Added.
2007-11-28  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
        * abicheck.sh: Added.
        * makegioalias.pl: Added.
        * pltcheck.sh: Added.
        * gio.symbols: Added.
	* *.c:
        * inotify/*.c
	Initial work on adding symbol handling.

	* gvfs.h:
	Correct ifdef guard name

        * fam/Makefile.am:
        * inotify/Makefile.am:
        * xdgmime/Makefile.am:
	Include toplevel Makefile.decl


svn path=/trunk/; revision=5972
2007-11-28 12:39:07 +00:00
Alexander Larsson
3781343738 gio/ docs/reference/gio Merged gio-standalone into glib.
2007-11-26  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
        * configure.in:
        * gio-2.0-uninstalled.pc.in:
        * gio-2.0.pc.in: 
        * gio-unix-2.0-uninstalled.pc.in:
        * gio-unix-2.0.pc.in:
	* gio/
	* docs/reference/gio
	Merged gio-standalone into glib.
	
        * glib/glibintl.h:
        * glib/gutils.c:
	Export glib_gettext so that gio can use it
	Add P_ (using same domain for now)
	Add I_ as g_intern_static_string


svn path=/trunk/; revision=5941
2007-11-26 16:13:05 +00:00