X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=cut-n-paste%2Frecent-files%2Fegg-recent-util.c;h=bc15a06e76f92a15f2f82ae9937f528b41259d31;hb=ae0d3afcc39b13f01e0fbac74cf583f67a229382;hp=6780cd1ee02dcfd1deeacd16baa4720fd2f7c714;hpb=2845fb905cccd6655c294247722648d3bce97a27;p=evince.git diff --git a/cut-n-paste/recent-files/egg-recent-util.c b/cut-n-paste/recent-files/egg-recent-util.c index 6780cd1e..bc15a06e 100644 --- a/cut-n-paste/recent-files/egg-recent-util.c +++ b/cut-n-paste/recent-files/egg-recent-util.c @@ -12,6 +12,10 @@ #include #include "egg-recent-util.h" +#ifdef G_OS_WIN32 +#include +#endif + #define EGG_RECENT_UTIL_HOSTNAME_SIZE 512 /* ripped out of gedit2 */ @@ -128,7 +132,14 @@ egg_recent_util_get_unique_id (void) guint32 rand; int pid; +#ifndef G_OS_WIN32 gethostname (hostname, EGG_RECENT_UTIL_HOSTNAME_SIZE); +#else + { + DWORD size = EGG_RECENT_UTIL_HOSTNAME_SIZE; + GetComputerName (hostname, &size); + } +#endif time (&the_time); rand = g_random_int ();