From 2d7b775ad8b45869a3866e55d4d2ced6bc4a5d01 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 11 Jun 2003 10:42:09 +0000 Subject: [PATCH] New module 'sysexits'. --- ChangeLog | 5 +++++ MODULES.html.sh | 1 + lib/ChangeLog | 4 ++++ lib/sysexit_.h | 39 +++++++++++++++++++++++++++++++++++++++ m4/ChangeLog | 4 ++++ m4/sysexits.m4 | 15 +++++++++++++++ modules/sysexits | 28 ++++++++++++++++++++++++++++ 7 files changed, 96 insertions(+) create mode 100644 lib/sysexit_.h create mode 100644 m4/sysexits.m4 create mode 100644 modules/sysexits diff --git a/ChangeLog b/ChangeLog index cde854ff5e..1270e04406 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-06-11 Simon Josefsson + + * modules/sysexits: New file. + * MODULES.html.sh (func_all_modules): Add sysexits. + 2003-06-10 Bruno Haible * MODULES.html.sh (func_all_modules): Add strchrnul and argp. diff --git a/MODULES.html.sh b/MODULES.html.sh index 13ad6fb27d..6a059d362c 100755 --- a/MODULES.html.sh +++ b/MODULES.html.sh @@ -1880,6 +1880,7 @@ func_all_modules () func_module quote func_module readutmp func_module sig2str + func_module sysexits func_end_table } diff --git a/lib/ChangeLog b/lib/ChangeLog index 6f41a95795..a759b54ff8 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2003-06-11 Simon Josefsson + + * sysexit_.h: New file. + 2003-05-20 Derek Price * stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is necessary. diff --git a/lib/sysexit_.h b/lib/sysexit_.h new file mode 100644 index 0000000000..7afd370dc8 --- /dev/null +++ b/lib/sysexit_.h @@ -0,0 +1,39 @@ +/* exit() exit codes for some BSD system programs. + Copyright (C) 2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* Written by Simon Josefsson based on sysexits(3) man page */ + +#ifndef _SYSEXITS_H +#define _SYSEXITS_H + +#define EX_USAGE 64 +#define EX_DATAERR 65 +#define EX_NOINPUT 66 +#define EX_NOUSER 67 +#define EX_NOHOST 68 +#define EX_UNAVAILABLE 69 +#define EX_SOFTWARE 70 +#define EX_OSERR 71 +#define EX_OSFILE 72 +#define EX_CANTCREAT 73 +#define EX_IOERR 74 +#define EX_TEMPFAIL 75 +#define EX_PROTOCOL 76 +#define EX_NOPERM 77 +#define EX_CONFIG 78 + +#endif /* _SYSEXITS_H */ diff --git a/m4/ChangeLog b/m4/ChangeLog index e31bef8678..4e4bf375eb 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,7 @@ +2003-06-11 Bruno Haible + + * sysexits.m4: New file. + 2003-06-10 Simon Josefsson * strchrnul.m4: New file. diff --git a/m4/sysexits.m4 b/m4/sysexits.m4 new file mode 100644 index 0000000000..31386cec0e --- /dev/null +++ b/m4/sysexits.m4 @@ -0,0 +1,15 @@ +# sysexits.m4 serial 1 +dnl Copyright (C) 2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +AC_DEFUN([gl_SYSEXITS], +[ + AC_CHECK_HEADERS(sysexits.h, + [SYSEXITS_H=sysexits.h], + [SYSEXITS_H=]) + AC_SUBST([SYSEXITS_H]) +]) diff --git a/modules/sysexits b/modules/sysexits new file mode 100644 index 0000000000..8a4f1c8c58 --- /dev/null +++ b/modules/sysexits @@ -0,0 +1,28 @@ +Description: +Exit status codes for some BSD system programs. + +Files: +lib/sysexit_.h +m4/sysexits.m4 + +Depends-on: + +configure.ac: +gl_SYSEXITS + +Makefile.am: +EXTRA_DIST += sysexit_.h + +# We need the following in order to create a when the system +# doesn't have one that works with the given compiler. +all-local $(lib_OBJECTS): @SYSEXITS_H@ +sysexits.h: sysexit_.h + cp $(srcdir)/sysexit_.h sysexits.h-t + mv sysexits.h-t sysexits.h +MOSTLYCLEANFILES += sysexits.h sysexits.h-t + +Include: +#include + +Maintainer: +Simon Josefsson -- 2.30.2