diff options
Diffstat (limited to 'src/libstddjb')
-rw-r--r-- | src/libstddjb/child_spawn.c | 2 | ||||
-rw-r--r-- | src/libstddjb/child_spawn0.c | 2 | ||||
-rw-r--r-- | src/libstddjb/child_spawn1_internal.c | 2 | ||||
-rw-r--r-- | src/libstddjb/child_spawn2.c | 2 | ||||
-rw-r--r-- | src/libstddjb/child_spawn3.c | 2 | ||||
-rw-r--r-- | src/libstddjb/hiercopy_tmp.c | 2 | ||||
-rw-r--r-- | src/libstddjb/prog.c | 2 | ||||
-rw-r--r-- | src/libstddjb/strerr.c | 35 | ||||
-rw-r--r-- | src/libstddjb/strerr_sys.c | 22 |
9 files changed, 7 insertions, 64 deletions
diff --git a/src/libstddjb/child_spawn.c b/src/libstddjb/child_spawn.c index 5a157a8..aa70deb 100644 --- a/src/libstddjb/child_spawn.c +++ b/src/libstddjb/child_spawn.c @@ -20,7 +20,7 @@ #else #include <skalibs/sig.h> -#include <skalibs/strerr2.h> +#include <skalibs/strerr.h> #include <skalibs/exec.h> #endif diff --git a/src/libstddjb/child_spawn0.c b/src/libstddjb/child_spawn0.c index 927bb0e..5b59b20 100644 --- a/src/libstddjb/child_spawn0.c +++ b/src/libstddjb/child_spawn0.c @@ -47,7 +47,7 @@ pid_t child_spawn0 (char const *prog, char const *const *argv, char const *const #include <string.h> #include <skalibs/allreadwrite.h> -#include <skalibs/strerr2.h> +#include <skalibs/strerr.h> #include <skalibs/sig.h> #include <skalibs/djbunix.h> #include <skalibs/exec.h> diff --git a/src/libstddjb/child_spawn1_internal.c b/src/libstddjb/child_spawn1_internal.c index 436d19e..be154f0 100644 --- a/src/libstddjb/child_spawn1_internal.c +++ b/src/libstddjb/child_spawn1_internal.c @@ -71,7 +71,7 @@ pid_t child_spawn1_internal (char const *prog, char const *const *argv, char con #include <string.h> #include <skalibs/allreadwrite.h> -#include <skalibs/strerr2.h> +#include <skalibs/strerr.h> #include <skalibs/sig.h> #include <skalibs/djbunix.h> #include <skalibs/exec.h> diff --git a/src/libstddjb/child_spawn2.c b/src/libstddjb/child_spawn2.c index d35b4a6..bddd97f 100644 --- a/src/libstddjb/child_spawn2.c +++ b/src/libstddjb/child_spawn2.c @@ -21,7 +21,7 @@ #include <string.h> #include <skalibs/allreadwrite.h> #include <skalibs/sig.h> -#include <skalibs/strerr2.h> +#include <skalibs/strerr.h> #include <skalibs/exec.h> #endif diff --git a/src/libstddjb/child_spawn3.c b/src/libstddjb/child_spawn3.c index 255e3c1..733df74 100644 --- a/src/libstddjb/child_spawn3.c +++ b/src/libstddjb/child_spawn3.c @@ -20,7 +20,7 @@ #include <string.h> #include <skalibs/sig.h> -#include <skalibs/strerr2.h> +#include <skalibs/strerr.h> #include <skalibs/exec.h> #endif diff --git a/src/libstddjb/hiercopy_tmp.c b/src/libstddjb/hiercopy_tmp.c index 79b7b46..4e69bbe 100644 --- a/src/libstddjb/hiercopy_tmp.c +++ b/src/libstddjb/hiercopy_tmp.c @@ -5,7 +5,7 @@ #include <sys/stat.h> #include <errno.h> #include <fcntl.h> -#include <skalibs/strerr2.h> + #include <skalibs/stralloc.h> #include <skalibs/direntry.h> #include <skalibs/djbunix.h> diff --git a/src/libstddjb/prog.c b/src/libstddjb/prog.c index f6c683c..3c5f7f5 100644 --- a/src/libstddjb/prog.c +++ b/src/libstddjb/prog.c @@ -2,6 +2,6 @@ /* MT-unsafe */ -#include <skalibs/strerr2.h> +#include <skalibs/strerr.h> char const *PROG = "(none)" ; diff --git a/src/libstddjb/strerr.c b/src/libstddjb/strerr.c deleted file mode 100644 index ae70477..0000000 --- a/src/libstddjb/strerr.c +++ /dev/null @@ -1,35 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include <unistd.h> -#include <errno.h> -#include <skalibs/buffer.h> -#include <skalibs/strerr.h> - -void strerr_warn (char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8, char const *x9, char const *x10, char const *se) -{ - int e = errno ; - if (x1) buffer_puts(buffer_2, x1) ; - if (x2) buffer_puts(buffer_2, x2) ; - if (x3) buffer_puts(buffer_2, x3) ; - if (x4) buffer_puts(buffer_2, x4) ; - if (x5) buffer_puts(buffer_2, x5) ; - if (x6) buffer_puts(buffer_2, x6) ; - if (x7) buffer_puts(buffer_2, x7) ; - if (x8) buffer_puts(buffer_2, x8) ; - if (x9) buffer_puts(buffer_2, x9) ; - if (x10) buffer_puts(buffer_2, x10) ; - if (se) buffer_puts(buffer_2, se) ; - buffer_putflush(buffer_2, "\n", 1) ; - errno = e ; -} - -void strerr_die (int e, char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8, char const *x9, char const *x10, char const *se) -{ - strerr_warn(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, se) ; - _exit(e) ; - - /* No, OpenBSD, this noreturn function does NOT return. - Please learn what _exit() does. */ -} diff --git a/src/libstddjb/strerr_sys.c b/src/libstddjb/strerr_sys.c deleted file mode 100644 index e388f5a..0000000 --- a/src/libstddjb/strerr_sys.c +++ /dev/null @@ -1,22 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include <unistd.h> -#include <string.h> -#include <errno.h> -#include <skalibs/strerr.h> - -void strerr_warnsys (char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8, char const *x9, char const *x10) -{ - strerr_warn(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, strerror(errno)) ; -} - -void strerr_diesys (int e, char const *x1, char const *x2, char const *x3, char const *x4, char const *x5, char const *x6, char const *x7, char const *x8, char const *x9, char const *x10) -{ - strerr_warnsys(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) ; - _exit(e) ; - - /* No, OpenBSD, this noreturn function does NOT return. - Please learn what _exit() does. */ -} |