On Fri, 2007-03-09 at 18:41 +0100, Anders Rune Jensen wrote:
> 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.

windows wont be suported as such

but if the changes code form a minimal footprint I might allow it

> 
> 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

use G_DIR_SEPARATOR_S instead of '/'


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


wont S_ISLNK always return FALSE on windows?


> 
> 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

eek - we have lots of these.

however we should be using tracker_spawn so maybe you can confine change
to that?


> 
> 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.

we probably no longer need to call g_main_context_iteration

> 
> 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 :)

ok will look at it soon - sorry for the delay but in a rush to get bugs
sorted for next release...

jamie.


_______________________________________________
tracker-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/tracker-list

Reply via email to