From abac9b73490cd4d59a1e454c6ade5fd2073f2d2f Mon Sep 17 00:00:00 2001 From: Bruce Korb Date: Sat, 5 Feb 2011 08:22:48 -0800 Subject: libposix: Add _HEADERS primaries to posix modules. Modify gnulib-tool to strip them from generated Makefile.am-s where they are not needed. Also, replace M4 macro prefixes when requested. Finally, omit calls to error() for libposix. --- lib/openat-die.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/openat-die.c') diff --git a/lib/openat-die.c b/lib/openat-die.c index 0db20b9cd0..b10e627c6d 100644 --- a/lib/openat-die.c +++ b/lib/openat-die.c @@ -21,7 +21,10 @@ #include +#ifndef GNULIB_LIBPOSIX #include "error.h" +#endif + #include "exitfail.h" #include "gettext.h" @@ -30,9 +33,10 @@ void openat_save_fail (int errnum) { +#ifndef GNULIB_LIBPOSIX error (exit_failure, errnum, _("unable to record current working directory")); - +#endif /* The `noreturn' attribute cannot be applied to error, since it returns when its first argument is 0. To help compilers understand that this function does not return, call abort. Also, the abort is a @@ -48,8 +52,10 @@ openat_save_fail (int errnum) void openat_restore_fail (int errnum) { +#ifndef GNULIB_LIBPOSIX error (exit_failure, errnum, _("failed to return to initial working directory")); +#endif /* As above. */ abort (); -- cgit v1.2.1