Commit 525a4c43 authored by Matthias Andree's avatar Matthias Andree

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().
parent 876ed4bb
......@@ -242,10 +242,8 @@ nottyDetach:
/* move to root directory, so we don't prevent filesystem unmounts */
/* set our umask to something reasonable (we hope) */
#if defined(DEF_UMASK)
......@@ -217,13 +217,11 @@ int main(int argc, char **argv)
/* save the current directory */
if (getcwd (currentwd, sizeof (currentwd)) == NULL) {
report(stderr, GT_("could not get current working directory\n"));
currentwd[0] = 0;
int i;
......@@ -701,11 +699,9 @@ int main(int argc, char **argv)
report(stdout, GT_("restarting fetchmail (%s changed)\n"), rcfile);
/* 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"));
* Matthias Andree: Isn't this prone to introduction of
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment