Only in libgnomevfs: .deps Only in libgnomevfs: .libs Only in libgnomevfs: GNOME_VFS_Daemon-common.lo Only in libgnomevfs: GNOME_VFS_Daemon-skels.lo Only in libgnomevfs: GNOME_VFS_Daemon-stubs.lo Only in libgnomevfs: Makefile Only in libgnomevfs: gnome-vfs-address.lo Only in libgnomevfs: gnome-vfs-application-registry.lo Only in libgnomevfs: gnome-vfs-async-job-map.lo Only in libgnomevfs: gnome-vfs-async-ops.lo Only in libgnomevfs: gnome-vfs-cancellable-ops.lo Only in libgnomevfs: gnome-vfs-cancellation.lo Only in libgnomevfs: gnome-vfs-client-call.lo Only in libgnomevfs: gnome-vfs-client.lo Only in libgnomevfs: gnome-vfs-configuration.lo Only in libgnomevfs: gnome-vfs-context.lo Only in libgnomevfs: gnome-vfs-daemon-method.lo Only in libgnomevfs: gnome-vfs-directory.lo Only in libgnomevfs: gnome-vfs-dllmain.lo Only in libgnomevfs: gnome-vfs-drive.lo Only in libgnomevfs: gnome-vfs-enum-types.lo Only in libgnomevfs: gnome-vfs-file-info.lo Only in libgnomevfs: gnome-vfs-filesystem-type.lo Only in libgnomevfs: gnome-vfs-find-directory.lo Only in libgnomevfs: gnome-vfs-handle.lo Only in libgnomevfs: gnome-vfs-inet-connection.lo Only in libgnomevfs: gnome-vfs-init.lo Only in libgnomevfs: gnome-vfs-job-queue.lo Only in libgnomevfs: gnome-vfs-job-slave.lo Only in libgnomevfs: gnome-vfs-job.lo Only in libgnomevfs: gnome-vfs-method.lo Only in libgnomevfs: gnome-vfs-mime-handlers.lo Only in libgnomevfs: gnome-vfs-mime-info-cache.lo Only in libgnomevfs: gnome-vfs-mime-info.lo Only in libgnomevfs: gnome-vfs-mime-magic.lo Only in libgnomevfs: gnome-vfs-mime-monitor.lo Only in libgnomevfs: gnome-vfs-mime-sniff-buffer.lo Only in libgnomevfs: gnome-vfs-mime.lo Only in libgnomevfs: gnome-vfs-module-callback-marshall.lo Only in libgnomevfs: gnome-vfs-module-callback-module-api.lo Only in libgnomevfs: gnome-vfs-module-callback-private.lo Only in libgnomevfs: gnome-vfs-module-callback.lo Only in libgnomevfs: gnome-vfs-module-shared.lo Only in libgnomevfs: gnome-vfs-module.lo Only in libgnomevfs: gnome-vfs-monitor.lo Only in libgnomevfs: gnome-vfs-open-fd.lo Only in libgnomevfs: gnome-vfs-ops.lo Only in libgnomevfs: gnome-vfs-private-utils.lo Only in libgnomevfs: gnome-vfs-private.lo Only in libgnomevfs: gnome-vfs-resolve.lo Only in libgnomevfs: gnome-vfs-result.lo Only in libgnomevfs: gnome-vfs-socket-buffer.lo Only in libgnomevfs: gnome-vfs-socket.lo Only in libgnomevfs: gnome-vfs-ssl.lo Only in libgnomevfs: gnome-vfs-thread-pool.lo Only in libgnomevfs: gnome-vfs-transform.lo Only in libgnomevfs: gnome-vfs-uri.lo Only in libgnomevfs: gnome-vfs-utils.lo Only in libgnomevfs: gnome-vfs-volume-monitor-client.lo Only in libgnomevfs: gnome-vfs-volume-monitor.lo Only in libgnomevfs: gnome-vfs-volume-ops.lo Only in libgnomevfs: gnome-vfs-volume.lo Only in libgnomevfs: gnome-vfs-xfer.lo Only in libgnomevfs: libgnomevfs-2.la Only in libgnomevfs: s-enum-types-c Only in libgnomevfs: s-enum-types-h diff -pu2 /tmp/gnome-vfs-2.11.92/libgnomevfs/xdgmime.c libgnomevfs/xdgmime.c --- /tmp/gnome-vfs-2.11.92/libgnomevfs/xdgmime.c Fri Jun 10 19:42:06 2005 +++ libgnomevfs/xdgmime.c Mon Aug 29 02:34:17 2005 @@ -129,5 +129,5 @@ xdg_mime_init_from_directory (const char file_name = malloc (strlen (directory) + strlen ("/mime/mime.cache") + 1); strcpy (file_name, directory); strcat (file_name, "/mime/mime.cache"); - if (stat (file_name, &st) == 0) + if (XDG_STAT (file_name, &st) == 0) { XdgMimeCache *cache = _xdg_mime_cache_new_from_file (file_name); @@ -152,5 +152,5 @@ xdg_mime_init_from_directory (const char file_name = malloc (strlen (directory) + strlen ("/mime/globs") + 1); strcpy (file_name, directory); strcat (file_name, "/mime/globs"); - if (stat (file_name, &st) == 0) + if (XDG_STAT (file_name, &st) == 0) { _xdg_mime_glob_read_from_file (global_hash, file_name); @@ -169,5 +169,5 @@ xdg_mime_init_from_directory (const char file_name = malloc (strlen (directory) + strlen ("/mime/magic") + 1); strcpy (file_name, directory); strcat (file_name, "/mime/magic"); - if (stat (file_name, &st) == 0) + if (XDG_STAT (file_name, &st) == 0) { _xdg_mime_magic_read_from_file (global_magic, file_name); @@ -206,5 +206,5 @@ xdg_run_command_on_dirs (XdgDirectoryFun const char *ptr; - xdg_data_home = getenv ("XDG_DATA_HOME"); + xdg_data_home = XDG_GETENV ("XDG_DATA_HOME"); if (xdg_data_home) { @@ -216,5 +216,5 @@ xdg_run_command_on_dirs (XdgDirectoryFun const char *home; - home = getenv ("HOME"); + home = XDG_GET_HOME (); if (home != NULL) { @@ -233,7 +233,7 @@ xdg_run_command_on_dirs (XdgDirectoryFun } - xdg_data_dirs = getenv ("XDG_DATA_DIRS"); + xdg_data_dirs = XDG_GETENV ("XDG_DATA_DIRS"); if (xdg_data_dirs == NULL) - xdg_data_dirs = "/usr/local/share/:/usr/share/"; + xdg_data_dirs = XDG_DEFAULT_DATA_DIRS; ptr = xdg_data_dirs; @@ -247,5 +247,5 @@ xdg_run_command_on_dirs (XdgDirectoryFun end_ptr = ptr; - while (*end_ptr != ':' && *end_ptr != '\000') + while (*end_ptr != XDG_SEARCHPATH_SEPARATOR && *end_ptr != '\000') end_ptr ++; @@ -256,5 +256,5 @@ xdg_run_command_on_dirs (XdgDirectoryFun } - if (*end_ptr == ':') + if (*end_ptr == XDG_SEARCHPATH_SEPARATOR) len = end_ptr - ptr; else @@ -285,5 +285,5 @@ xdg_check_file (const char *file_path) /* If the file exists */ - if (stat (file_path, &st) == 0) + if (XDG_STAT (file_path, &st) == 0) { XdgDirTimeList *list; @@ -386,10 +386,8 @@ static int xdg_check_time_and_dirs (void) { - struct timeval tv; time_t current_time; int retval = FALSE; - gettimeofday (&tv, NULL); - current_time = tv.tv_sec; + time (¤t_time); if (current_time >= last_stat_time + 5) @@ -472,5 +470,5 @@ xdg_mime_get_mime_type_for_file (const c return mime_type; - if (stat (file_name, &statbuf) != 0) + if (XDG_STAT (file_name, &statbuf) != 0) return XDG_MIME_TYPE_UNKNOWN; @@ -486,5 +484,5 @@ xdg_mime_get_mime_type_for_file (const c return XDG_MIME_TYPE_UNKNOWN; - file = fopen (file_name, "r"); + file = XDG_FOPEN (file_name, "r"); if (file == NULL) { Only in libgnomevfs: xdgmime.lo diff -pu2 /tmp/gnome-vfs-2.11.92/libgnomevfs/xdgmimealias.c libgnomevfs/xdgmimealias.c --- /tmp/gnome-vfs-2.11.92/libgnomevfs/xdgmimealias.c Sun Apr 17 13:37:34 2005 +++ libgnomevfs/xdgmimealias.c Mon Aug 29 02:34:17 2005 @@ -36,13 +36,4 @@ #include #include -#include - -#ifndef FALSE -#define FALSE (0) -#endif - -#ifndef TRUE -#define TRUE (!FALSE) -#endif typedef struct XdgAlias XdgAlias; @@ -125,5 +116,5 @@ _xdg_mime_alias_read_from_file (XdgAlias int alloc; - file = fopen (file_name, "r"); + file = XDG_FOPEN (file_name, "r"); if (file == NULL) Only in libgnomevfs: xdgmimealias.lo diff -pu2 /tmp/gnome-vfs-2.11.92/libgnomevfs/xdgmimecache.c libgnomevfs/xdgmimecache.c --- /tmp/gnome-vfs-2.11.92/libgnomevfs/xdgmimecache.c Sun Apr 17 13:37:34 2005 +++ libgnomevfs/xdgmimecache.c Mon Aug 29 02:34:17 2005 @@ -38,5 +38,9 @@ #include +#ifdef _WIN32 +#include /* for ntohl/ntohs */ +#else #include /* for ntohl/ntohs */ +#endif #ifdef HAVE_MMAP @@ -619,5 +623,5 @@ _xdg_mime_cache_get_mime_type_for_file ( return mime_type; - if (stat (file_name, &statbuf) != 0) + if (XDG_STAT (file_name, &statbuf) != 0) return XDG_MIME_TYPE_UNKNOWN; @@ -633,5 +637,5 @@ _xdg_mime_cache_get_mime_type_for_file ( return XDG_MIME_TYPE_UNKNOWN; - file = fopen (file_name, "r"); + file = XDG_FOPEN (file_name, "r"); if (file == NULL) { Only in libgnomevfs: xdgmimecache.lo diff -pu2 /tmp/gnome-vfs-2.11.92/libgnomevfs/xdgmimeglob.c libgnomevfs/xdgmimeglob.c --- /tmp/gnome-vfs-2.11.92/libgnomevfs/xdgmimeglob.c Sun Apr 17 13:37:34 2005 +++ libgnomevfs/xdgmimeglob.c Mon Aug 29 02:34:17 2005 @@ -38,12 +38,4 @@ #include -#ifndef FALSE -#define FALSE (0) -#endif - -#ifndef TRUE -#define TRUE (!FALSE) -#endif - typedef struct XdgGlobHashNode XdgGlobHashNode; typedef struct XdgGlobList XdgGlobList; @@ -461,5 +453,5 @@ _xdg_mime_glob_read_from_file (XdgGlobHa char line[255]; - glob_file = fopen (file_name, "r"); + glob_file = XDG_FOPEN (file_name, "r"); if (glob_file == NULL) Only in libgnomevfs: xdgmimeglob.lo diff -pu2 /tmp/gnome-vfs-2.11.92/libgnomevfs/xdgmimeint.c libgnomevfs/xdgmimeint.c --- /tmp/gnome-vfs-2.11.92/libgnomevfs/xdgmimeint.c Sun Apr 17 13:37:34 2005 +++ libgnomevfs/xdgmimeint.c Mon Aug 29 02:34:17 2005 @@ -34,12 +34,4 @@ #include -#ifndef FALSE -#define FALSE (0) -#endif - -#ifndef TRUE -#define TRUE (!FALSE) -#endif - static const char _xdg_utf8_skip_data[256] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, @@ -153,2 +145,19 @@ _xdg_get_base_name (const char *file_nam return base_name + 1; } + +#ifdef USE_GLIB + +const char * +_xdg_get_default_data_dirs (void) +{ + GQuark quark; + const char * const *dirs = g_get_system_data_dirs (); + char *string = g_strjoinv (G_SEARCHPATH_SEPARATOR_S, (char **) dirs); + + quark = g_quark_from_string (string); + g_free (string); + + return g_quark_to_string (quark); +} + +#endif diff -pu2 /tmp/gnome-vfs-2.11.92/libgnomevfs/xdgmimeint.h libgnomevfs/xdgmimeint.h --- /tmp/gnome-vfs-2.11.92/libgnomevfs/xdgmimeint.h Sun Apr 17 13:37:34 2005 +++ libgnomevfs/xdgmimeint.h Mon Aug 29 02:34:17 2005 @@ -71,3 +71,26 @@ int _xdg_utf8_validate (const const char *_xdg_get_base_name (const char *file_name); +#if defined (GNOME_VFS_PREFIX) /* If building as part of gnome-vfs */ +#define USE_GLIB +#endif + +#ifdef USE_GLIB +#include +#include +#define XDG_GETENV g_getenv +#define XDG_STAT g_stat +#define XDG_FOPEN g_fopen +#define XDG_GET_HOME() g_get_home_dir () +const char *_xdg_get_default_data_dirs (void); +#define XDG_DEFAULT_DATA_DIRS _xdg_get_default_data_dirs () +#define XDG_SEARCHPATH_SEPARATOR G_SEARCHPATH_SEPARATOR +#else +#define XDG_GETENV getenv +#define XDG_STAT stat +#define XDG_FOPEN fopen +#define XDG_GET_HOME() getenv ("HOME") +#define XDG_DEFAULT_DATA_DIRS "/usr/local/share/:/usr/share/" +#define XDG_SEARCHPATH_SEPARATOR ':' +#endif + #endif /* __XDG_MIME_INT_H__ */ Only in libgnomevfs: xdgmimeint.lo diff -pu2 /tmp/gnome-vfs-2.11.92/libgnomevfs/xdgmimemagic.c libgnomevfs/xdgmimemagic.c --- /tmp/gnome-vfs-2.11.92/libgnomevfs/xdgmimemagic.c Sun Apr 17 13:37:34 2005 +++ libgnomevfs/xdgmimemagic.c Mon Aug 29 02:34:17 2005 @@ -40,13 +40,12 @@ #include -#ifndef FALSE -#define FALSE (0) -#endif - -#ifndef TRUE -#define TRUE (!FALSE) +#ifdef _WIN32 +#define getc_unlocked getc +#define LITTLE_ENDIAN 1 #endif +#ifndef _WIN32 extern int errno; +#endif typedef struct XdgMimeMagicMatch XdgMimeMagicMatch; @@ -475,5 +474,7 @@ _xdg_mime_magic_parse_magic_line (FILE if (matchlet->word_size > 1) { +#if LITTLE_ENDIAN int i; +#endif if (matchlet->value_length % matchlet->word_size != 0) { @@ -770,5 +771,5 @@ _xdg_mime_magic_read_from_file (XdgMimeM char header[12]; - magic_file = fopen (file_name, "r"); + magic_file = XDG_FOPEN (file_name, "r"); if (magic_file == NULL) Only in libgnomevfs: xdgmimemagic.lo diff -pu2 /tmp/gnome-vfs-2.11.92/libgnomevfs/xdgmimeparent.c libgnomevfs/xdgmimeparent.c --- /tmp/gnome-vfs-2.11.92/libgnomevfs/xdgmimeparent.c Thu Dec 9 17:43:48 2004 +++ libgnomevfs/xdgmimeparent.c Mon Aug 29 02:34:17 2005 @@ -38,12 +38,4 @@ #include -#ifndef FALSE -#define FALSE (0) -#endif - -#ifndef TRUE -#define TRUE (!FALSE) -#endif - typedef struct XdgMimeParents XdgMimeParents; @@ -131,5 +123,5 @@ _xdg_mime_parent_read_from_file (XdgPare XdgMimeParents *entry; - file = fopen (file_name, "r"); + file = XDG_FOPEN (file_name, "r"); if (file == NULL) Only in libgnomevfs: xdgmimeparent.lo