aboutsummaryrefslogtreecommitdiffstats
path: root/indep.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@vega.ocn.ne.jp>2011-05-04 07:23:02 +0000
committerTatsuya Kinoshita <tats@vega.ocn.ne.jp>2011-05-04 07:23:02 +0000
commit6db339b3d7a391f196e7c4b725a4ed0bd00f31cf (patch)
tree7d6fed976b72694d61fc595a745d394e1cd6e1a5 /indep.c
parentAdding upstream version 0.5.1 (diff)
downloadw3m-6db339b3d7a391f196e7c4b725a4ed0bd00f31cf.tar.gz
w3m-6db339b3d7a391f196e7c4b725a4ed0bd00f31cf.zip
Adding upstream version 0.5.2upstream/0.5.2
Diffstat (limited to '')
-rw-r--r--indep.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/indep.c b/indep.c
index 6478271..65b04aa 100644
--- a/indep.c
+++ b/indep.c
@@ -1,7 +1,9 @@
-/* $Id: indep.c,v 1.35 2004/04/09 17:18:49 ukai 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