Apply #ifdefs around functionality not available on win32

And also the reverse: around some win32 specific functionality
This commit is contained in:
Maarten Bosmans 2011-01-06 00:51:33 +01:00
parent 0ac0479534
commit bb12ff8356
20 changed files with 120 additions and 13 deletions

View file

@ -180,6 +180,7 @@ static void update_rule(struct rule *r) {
DIR *desktopfiles_dir;
struct dirent *dir;
#ifdef DT_DIR
/* Let's try a more aggressive search, but only one level */
if ((desktopfiles_dir = opendir(DESKTOPFILEDIR))) {
while ((dir = readdir(desktopfiles_dir))) {
@ -200,6 +201,7 @@ static void update_rule(struct rule *r) {
}
closedir(desktopfiles_dir);
}
#endif
}
if (!found) {
r->good = FALSE;