mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-12 08:41:16 +01:00
unposted: define mailstat as a macro if MAILDIR_SUPPORT is undefined
This commit is contained in:
parent
04bf2c822f
commit
2d9e68f3cb
3 changed files with 7 additions and 4 deletions
|
@ -1,5 +1,8 @@
|
|||
2000-09-17 Clint Adams <schizo@debian.org>
|
||||
|
||||
* unposted: Src/system.h, Src/utils.c: define mailstat()
|
||||
as a macro if MAILDIR_SUPPORT is undefined.
|
||||
|
||||
* 12823: Src/builtin.c, Src/utils.c: use zsh heap instead of
|
||||
permanent heap.
|
||||
|
||||
|
|
|
@ -673,3 +673,7 @@ extern short ospeed;
|
|||
#if defined(CONFIG_LOCALE) && defined(HAVE_SETLOCALE) && defined(LC_ALL)
|
||||
# define USE_LOCALE 1
|
||||
#endif /* CONFIG_LOCALE && HAVE_SETLOCALE && LC_ALL */
|
||||
|
||||
#ifndef MAILDIR_SUPPORT
|
||||
#define mailstat(X,Y) stat(X,Y)
|
||||
#endif
|
||||
|
|
|
@ -725,11 +725,7 @@ checkmailpath(char **s)
|
|||
if (**s == 0) {
|
||||
*v = c;
|
||||
zerr("empty MAILPATH component: %s", *s, 0);
|
||||
#ifndef MAILDIR_SUPPORT
|
||||
} else if (stat(unmeta(*s), &st) == -1) {
|
||||
#else
|
||||
} else if (mailstat(unmeta(*s), &st) == -1) {
|
||||
#endif
|
||||
if (errno != ENOENT)
|
||||
zerr("%e: %s", *s, errno);
|
||||
} else if (S_ISDIR(st.st_mode)) {
|
||||
|
|
Loading…
Reference in a new issue