xdgmime (CVS, portability)

Klemens Friedl frik85 at gmail.com
Fri Sep 21 08:40:19 PDT 2007


2007/9/21, Klemens Friedl <frik85 at gmail.com>:
> http://cvs.freedesktop.org/mime/xdgmime/ ... seems to be down at the
> moment (at least not available for me).
>
> Can someone point me to the CVS settings so that I can check-out
> (download) that directory to my local system using a CVS client?

With the help of "ajax" from #freedesktop.org (freenode.net) irc
channel, I have checked-out the CVS dir.

... and the webserver seemed to have network issues, therefor the
webcvs interface was not available.

> Does it depends on anything but c-runtime-lib?
> "It has no dependencies and is written in straight C."
> -- http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec

It seems that the following sentense is not true:
"It has no dependencies and is written in straight C."

It seems to rely on unix only things posix fnmatch. That's neither
straight C (which would be the ANSI/ISO C, implemented in
C-runtime-lib) nor is the following true "depends on anything" as it
depends on posix :S

I would like to build xdgmime on ros32/win32 platform using mingw (ros32/win32).
mingw (gnu gcc/g++ and make) doesn't provide the missing fnmatch.h
probably cygwin came with it, but it's not an option.

xdgmimealias.c
xdgmimecache.c
xdgmimeglob.c
xdgmimeparent.c

Is fnmatch really required and if so, for which reason do you use it?

Maybe someone can help me? I am searching for an (L)GPL library to
read the first few bytes of files and get the mime-type of them.
An alternative would be unix "file" / libmagic, although this one
relies on posix only stuff too.
I though xdgmime would fit perfectly as I have heard it has a better
mime-type identification that libmagic and is written in plain C, so
using it in ros32/win32 wouldn't be an issue.

Best regards,

Klemens Friedl


More information about the xdg mailing list