New module 'sysexits'.
authorBruno Haible <bruno@clisp.org>
Wed, 11 Jun 2003 10:42:09 +0000 (10:42 +0000)
committerBruno Haible <bruno@clisp.org>
Wed, 11 Jun 2003 10:42:09 +0000 (10:42 +0000)
ChangeLog
MODULES.html.sh
lib/ChangeLog
lib/sysexit_.h [new file with mode: 0644]
m4/ChangeLog
m4/sysexits.m4 [new file with mode: 0644]
modules/sysexits [new file with mode: 0644]

index cde854f..1270e04 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-11  Simon Josefsson  <jas@extundo.com>
+
+       * modules/sysexits: New file.
+       * MODULES.html.sh (func_all_modules): Add sysexits.
+
 2003-06-10  Bruno Haible  <bruno@clisp.org>
 
        * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
index 13ad6fb..6a059d3 100755 (executable)
@@ -1880,6 +1880,7 @@ func_all_modules ()
   func_module quote
   func_module readutmp
   func_module sig2str
+  func_module sysexits
   func_end_table
 }
 
index 6f41a95..a759b54 100644 (file)
@@ -1,3 +1,7 @@
+2003-06-11  Simon Josefsson  <jas@extundo.com>
+
+       * sysexit_.h: New file.
+
 2003-05-20  Derek Price  <derek@ximbiot.com>
 
        * 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 (file)
index 0000000..7afd370
--- /dev/null
@@ -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 */
index e31bef8..4e4bf37 100644 (file)
@@ -1,3 +1,7 @@
+2003-06-11  Bruno Haible  <bruno@clisp.org>
+
+       * sysexits.m4: New file.
+
 2003-06-10  Simon Josefsson  <jas@extundo.com>
 
        * strchrnul.m4: New file.
diff --git a/m4/sysexits.m4 b/m4/sysexits.m4
new file mode 100644 (file)
index 0000000..31386ce
--- /dev/null
@@ -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 (file)
index 0000000..8a4f1c8
--- /dev/null
@@ -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 <sysexits.h> 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 <sysexits.h>
+
+Maintainer:
+Simon Josefsson