[Tracker] [PATCH] mingw patches



Hi list

This mail contains patches to support mingw, furthermore it also
implements notifications on windows similar to inotify on linux.

It's currently a little rough as I'm not 100% sure how to cleanly
integrate it. Currently it's a lot of ifdef OS_WIN32 scattered around
the code which is not very nice. I would like to move a lot of the
unix specific code into a tracker-unix.c file and then create a
tracker-win.c file with the windows specific bits. I have currently
tried to keep as much of changes specific to mingw in mingw-compat.h
but I think more is needed. I would really like an opinion on how to
proceed to get these patches applied upstream.

the os specific bits would be:

uri checker:
      g_return_val_if_fail (uri, FALSE);
+#ifndef OS_WIN32
      g_return_val_if_fail (uri[0] != '/', FALSE);
+#endif

link specific code (windows doesn't support links):
+#ifdef OS_WIN32
+                       is_link = FALSE;
+#else
                      is_link = S_ISLNK (finfo.st_mode);
+#endif

external application startup:

would just take a argv[4] and do the right thing.

+#ifdef OS_WIN32
+               argv[0] = "cmd.exe";
+               argv[1] = "/c";
+               argv[2] = g_strdup (text_filter_file);
+               argv[3] = g_filename_from_utf8 (uri, -1, NULL, NULL, NULL);
+               argv[4] = g_strdup (temp_file_name);
+               argv[5] = NULL;
+#else
              argv[0] = g_strdup (text_filter_file);
              argv[1] = g_filename_from_utf8 (uri, -1, NULL, NULL, NULL);
              argv[2] = g_strdup (temp_file_name);
              argv[3] = NULL;
+#endif

signal and limit functionality:

currently I don't know how and if it's even possible on windows but at
least create a limit function which will wrap this.

For some reason g_main_context_iteration doesn't work on my mingw
setup. I need to investigate this some more. It's quite strange. It
will just hang there. Even calling a simple function as checking if
there are any other functions available hangs the program.

nfs: I'm not sure if nfs will run on windows so currently all the nfs
specifc code has been ifdef'ed.

The patch is against revno 540 and is tested on linux as well. I've
rediffed some of the patches in my last mail that are still needed:

rename shutdown to tracker_shutdown:

as explained in my last mail, shutdown clashes with system headers.

datadir -> trackerdatadir:

as explained in my last mail, datadir clashes with system headers.

why is datadir defined in Makefile.am inside libtracker? It doesn't
seem to be used.

ioprio.diff:

don't needlessly include headers we don't need

I have placed the mingw patch here because it was too big to include
inside this mail:

  http://people.iola.dk/anders/tracker-mingw.patch

There are still two trivial patches in my last mail (simplify-fam.diff
and spelling.diff):

http://mail.gnome.org/archives/tracker-list/2007-March/msg00083.html

That would be nice to have applied :)

Thanks!

--
Anders Rune Jensen

Attachment: datadir.patch
Description: Binary data

Attachment: shutdown.patch
Description: Binary data

Attachment: ioprio.patch
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]