]> sjero.net Git - wget/blobdiff - src/init.c
Remove redundant guard.
[wget] / src / init.c
index ffdaa6d6a93c65fc1f7af6beb05b81287ab940fd..5bc555d757152d74043955f214c1450e10ab6884 100644 (file)
@@ -33,9 +33,7 @@ as that of the covered work.  */
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdbool.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 #include <string.h>
 #include <errno.h>
 #include <limits.h>
@@ -588,6 +586,15 @@ initialize (void)
   else if (file_exists_p (SYSTEM_WGETRC))
     ok &= run_wgetrc (SYSTEM_WGETRC);
 #endif
+  /* If there are any problems parsing the system wgetrc file, tell
+     the user and exit */
+  if (! ok)
+    {
+      fprintf (stderr, _("\
+Parsing system wgetrc file failed, please check '%s'.           \
+Or specify a different file using --config\n"), SYSTEM_WGETRC);
+      exit (2);
+    }
   /* Override it with your own, if one exists.  */
   file = wgetrc_file_name ();
   if (!file)