diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2019-08-25 13:54:01 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2019-08-25 14:04:21 +0200 |
commit | 525a4c43284dbb325e6c628ba26065f6ca23e312 (patch) | |
tree | 10584f4d5eaad60b1ba17ce6eff3b917ab000e3f | |
parent | 876ed4bb9ed07bf7e2196589c742b65e0d33ce2d (diff) | |
download | fetchmail-525a4c43284dbb325e6c628ba26065f6ca23e312.tar.gz fetchmail-525a4c43284dbb325e6c628ba26065f6ca23e312.tar.bz2 fetchmail-525a4c43284dbb325e6c628ba26065f6ca23e312.zip |
Drop #ifdef HAVE_GETCWD, there never was a formal configure check.
Assume that getcwd() is present, it is required by the
Single Unix Specivication V2 (1997).
Previously, fetchmail implicitly relied on AM_HAVE_GETTEXT() to
check for getcwd().
-rw-r--r-- | daemon.c | 2 | ||||
-rw-r--r-- | fetchmail.c | 4 |
2 files changed, 0 insertions, 6 deletions
@@ -242,10 +242,8 @@ nottyDetach: return(PS_IOERR); } -#ifdef HAVE_GETCWD /* move to root directory, so we don't prevent filesystem unmounts */ chdir("/"); -#endif /* set our umask to something reasonable (we hope) */ #if defined(DEF_UMASK) diff --git a/fetchmail.c b/fetchmail.c index 54526821..80993ccb 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -217,13 +217,11 @@ int main(int argc, char **argv) */ fm_lock_dispose(); -#ifdef HAVE_GETCWD /* save the current directory */ if (getcwd (currentwd, sizeof (currentwd)) == NULL) { report(stderr, GT_("could not get current working directory\n")); currentwd[0] = 0; } -#endif { int i; @@ -701,11 +699,9 @@ int main(int argc, char **argv) { report(stdout, GT_("restarting fetchmail (%s changed)\n"), rcfile); -#ifdef HAVE_GETCWD /* restore the startup directory */ if (!currentwd[0] || chdir (currentwd) == -1) report(stderr, GT_("attempt to re-exec may fail as directory has not been restored\n")); -#endif /* * Matthias Andree: Isn't this prone to introduction of |