diff options
author | Dai Sato <satodai@w3m.jp> | 2007-05-23 15:06:05 +0000 |
---|---|---|
committer | Dai Sato <satodai@w3m.jp> | 2007-05-23 15:06:05 +0000 |
commit | 3c7e9b27c1db068e9b29e5ffa3a74dea449a0c9a (patch) | |
tree | 3aa5dcb2c9d7db6bc81a56a82c160e5a93173071 /indep.c | |
parent | fix comments. (diff) | |
download | w3m-3c7e9b27c1db068e9b29e5ffa3a74dea449a0c9a.tar.gz w3m-3c7e9b27c1db068e9b29e5ffa3a74dea449a0c9a.zip |
[w3m-dev 04155] fix for minpw.
Diffstat (limited to '')
-rw-r--r-- | indep.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1,7 +1,9 @@ -/* $Id: indep.c,v 1.37 2006/04/07 13:21:11 inu Exp $ */ +/* $Id: indep.c,v 1.38 2007/05/23 15:06:05 inu Exp $ */ #include "fm.h" #include <stdio.h> +#ifndef __MINGW32_VERSION #include <pwd.h> +#endif /* __MINGW32_VERSION */ #include <sys/param.h> #include <sys/types.h> #include <stdlib.h> @@ -225,6 +227,7 @@ expandPath(char *name) p = name; if (*p == '~') { p++; +#ifndef __MINGW32_VERSION if (IS_ALPHA(*p)) { char *q = strchr(p, '/'); if (q) { /* ~user/dir... */ @@ -238,8 +241,9 @@ expandPath(char *name) if (!passent) goto rest; extpath = Strnew_charp(passent->pw_dir); - } - else if (*p == '/' || *p == '\0') { /* ~/dir... or ~ */ + } else +#endif /* __MINGW32_VERSION */ + if (*p == '/' || *p == '\0') { /* ~/dir... or ~ */ extpath = Strnew_charp(getenv("HOME")); } else |