Mercurial > hg > xemacs-beta
diff src/fileio.c @ 294:4b85ae5eabfb r21-0b45
Import from CVS: tag r21-0b45
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:38:01 +0200 |
parents | c9fe270a4101 |
children | 70ad99077275 |
line wrap: on
line diff
--- a/src/fileio.c Mon Aug 13 10:37:16 2007 +0200 +++ b/src/fileio.c Mon Aug 13 10:38:01 2007 +0200 @@ -789,6 +789,9 @@ #endif /* WINDOWSNT */ int length; Lisp_Object handler; +#ifdef __CYGWIN32__ + char *user; +#endif CHECK_STRING (name); @@ -1019,6 +1022,19 @@ dostounix_filename (newdir); nm += strlen(o) + 1; #else /* not WINDOWSNT */ +#ifdef __CYGWIN32__ + if ((user = user_login_name (NULL)) != NULL) + { + /* Does the user login name match the ~name? */ + if (strcmp(user,((char *) o + 1)) == 0) + { + newdir = (Bufbyte *) get_home_directory(); + nm = p; + } + } + if (! newdir) + { +#endif /* __CYGWIN32__ */ /* Jamie reports that getpwnam() can get wedged by SIGIO/SIGALARM occurring in it. (It can call select()). */ slow_down_interrupts (); @@ -1029,6 +1045,9 @@ newdir = (Bufbyte *) pw -> pw_dir; nm = p; } +#ifdef __CYGWIN32__ + } +#endif #endif /* not WINDOWSNT */ /* If we don't find a user of that name, leave the name