diff options
author | Bruce Korb <bkorb@gnu.org> | 2011-02-05 08:22:48 -0800 |
---|---|---|
committer | Bruce Korb <bkorb@gnu.org> | 2011-02-05 11:48:43 -0800 |
commit | abac9b73490cd4d59a1e454c6ade5fd2073f2d2f (patch) | |
tree | e0ebcd7ce91a8011fae7348ec346ef7c06157382 /lib/openat-die.c | |
parent | cda784e7600c26148888f21fc1300d041b5404bd (diff) | |
download | gnulib-abac9b73490cd4d59a1e454c6ade5fd2073f2d2f.tar.gz |
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.
Diffstat (limited to 'lib/openat-die.c')
-rw-r--r-- | lib/openat-die.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 <stdlib.h> +#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 (); |