]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Use strerror unconditionally, delete configure logic to fall back to sys_errlist.
authorNiels Möller <nisse@lysator.liu.se>
Wed, 2 Aug 2023 07:07:06 +0000 (09:07 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 2 Aug 2023 07:13:03 +0000 (09:13 +0200)
ChangeLog
aclocal.m4
configure.ac
tools/nettle-hash.c
tools/nettle-pbkdf2.c

index 499bdf2762d2cf49a6f546522365f339dc9b4305..548af4e37b64c9b5c3895b7a2b8510df08d6ad2f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-08-02  Niels Möller  <nisse@lysator.liu.se>
+
+       * aclocal.m4 (LSH_FUNC_STRERROR): Delete macro.
+       * configure.ac: Delete usage.
+       * tools/nettle-hash.c (main): Use strerror unconditionally.
+       * tools/nettle-pbkdf2.c (main): Likewise.
+
 2023-08-01  Niels Möller  <nisse@lysator.liu.se>
 
        * configure.ac: Delete special handling of rntcl; it should be
index 119eab37ab1a716c9d6e206525286c0e2a453922..08292d9d8d6bb0d5f01d395a908734599a47c1f6 100644 (file)
@@ -215,16 +215,6 @@ char *alloca ();
 #endif
 ])])
 
-AC_DEFUN([LSH_FUNC_STRERROR],
-[AC_CHECK_FUNCS(strerror)
-AH_BOTTOM(
-[#if HAVE_STRERROR
-#define STRERROR strerror
-#else
-#define STRERROR(x) (sys_errlist[x])
-#endif
-])])
-
 AC_DEFUN([LSH_FUNC_STRSIGNAL],
 [AC_CHECK_FUNCS(strsignal)
 AC_CHECK_DECLS([sys_siglist, _sys_siglist])
index cafcca638c426fb77acec0e7e164195dea81b27c..8fbdb008e8947348476c983cc0c43f1dc8e901bf 100644 (file)
@@ -199,7 +199,7 @@ AC_CHECK_LIB([dl], [dlopen],
                        [Define to 1 if you have dlopen (with -ldl).])])
 
 LSH_FUNC_ALLOCA
-LSH_FUNC_STRERROR
+
 # getenv_secure is used for fat overrides,
 # getline is used in the testsuite
 AC_CHECK_FUNCS(secure_getenv getline)
index 24199921feada35e717f17780d09849da7d0dbc0..87330783ccee2eea079a900ae8fb20f96a627343 100644 (file)
@@ -222,15 +222,15 @@ main (int argc, char **argv)
        {
          FILE *f = fopen (argv[i], "rb");
          if (!f)
-           die ("Cannot open `%s': %s\n", argv[i], STRERROR(errno));
+           die ("Cannot open `%s': %s\n", argv[i], strerror(errno));
          printf("%s: ", argv[i]);
          if (!digest_file (alg, length, raw, f))
-           die("Reading `%s' failed: %s\n", argv[i], STRERROR(errno));
+           die("Reading `%s' failed: %s\n", argv[i], strerror(errno));
          fclose(f);
        }
     }
   if (fflush(stdout) != 0 )
-    die("Write failed: %s\n", STRERROR(errno));
+    die("Write failed: %s\n", strerror(errno));
 
   return EXIT_SUCCESS;
 }
index 9993b301a0b612bb96119ec9ccb576e9dd139abd..0b5c98f57dff4aff9d218e25d3cc634765646f34 100644 (file)
@@ -194,7 +194,7 @@ main (int argc, char **argv)
   free (output);
 
   if (fflush(stdout) != 0 )
-    die("Write failed: %s\n", STRERROR(errno));
+    die("Write failed: %s\n", strerror(errno));
 
   return EXIT_SUCCESS;
 }