[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sysexits: test failure on HP-UX
From: |
Bruno Haible |
Subject: |
sysexits: test failure on HP-UX |
Date: |
Mon, 26 Mar 2007 00:53:30 +0200 |
User-agent: |
KMail/1.5.4 |
The sysexits test that I wrote verifies that all values from EX_OK to EX_CONFIG
are present and have distinct values.
This fails on HP-UX. It has a <sysexits.h> file which contains only te values
up to EX_NOPERM. The values are the same, though (at least :-)).
Here is a proposed patch to extend the HP-UX <sysexits.h> with the missing
value.
2007-03-25 Bruno Haible <address@hidden>
* lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
<sysexits.h> file, and only add EX_CONFIG.
* m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
absolute file name and whether it is sufficient. Substitute also
HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
* modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
ABSOLUTE_SYSEXITS_H into sysexits.h.
*** lib/sysexit_.h 9 Jan 2006 21:48:50 -0000 1.3
--- lib/sysexit_.h 25 Mar 2007 22:48:15 -0000
***************
*** 1,5 ****
/* exit() exit codes for some BSD system programs.
! Copyright (C) 2003, 2006 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
--- 1,5 ----
/* exit() exit codes for some BSD system programs.
! Copyright (C) 2003, 2006-2007 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
***************
*** 20,41 ****
#ifndef _SYSEXITS_H
#define _SYSEXITS_H
! #define EX_OK 0 /* same value as EXIT_SUCCESS */
! #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 */
--- 20,54 ----
#ifndef _SYSEXITS_H
#define _SYSEXITS_H
! #if @HAVE_SYSEXITS_H@
! # include @ABSOLUTE_SYSEXITS_H@
!
! /* HP-UX 11 <sysexits.h> ends at EX_NOPERM. */
! # ifndef EX_CONFIG
! # define EX_CONFIG 78
! # endif
!
! #else
!
! # define EX_OK 0 /* same value as EXIT_SUCCESS */
!
! # 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
#endif /* _SYSEXITS_H */
*** m4/sysexits.m4 24 Jan 2005 10:02:25 -0000 1.3
--- m4/sysexits.m4 25 Mar 2007 22:48:15 -0000
***************
*** 1,13 ****
! # sysexits.m4 serial 2
! dnl Copyright (C) 2003,2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_SYSEXITS],
[
! AC_CHECK_HEADERS(sysexits.h,
! [SYSEXITS_H=],
! [SYSEXITS_H=sysexits.h])
AC_SUBST([SYSEXITS_H])
])
--- 1,45 ----
! # sysexits.m4 serial 3
! dnl Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_SYSEXITS],
[
! AC_CHECK_HEADERS_ONCE([sysexits.h])
! if test $ac_cv_header_sysexits_h = yes; then
! HAVE_SYSEXITS_H=1
! gl_ABSOLUTE_HEADER([sysexits.h])
! ABSOLUTE_SYSEXITS_H=\"$gl_cv_absolute_sysexits_h\"
! AC_TRY_COMPILE([#include <sysexits.h>],
! [switch (0)
! {
! case EX_OK:
! case EX_USAGE:
! case EX_DATAERR:
! case EX_NOINPUT:
! case EX_NOUSER:
! case EX_NOHOST:
! case EX_UNAVAILABLE:
! case EX_SOFTWARE:
! case EX_OSERR:
! case EX_OSFILE:
! case EX_CANTCREAT:
! case EX_IOERR:
! case EX_TEMPFAIL:
! case EX_PROTOCOL:
! case EX_NOPERM:
! case EX_CONFIG:
! break;
! }
! ],
! [SYSEXITS_H=],
! [SYSEXITS_H=sysexits.h])
! else
! HAVE_SYSEXITS_H=0
! SYSEXITS_H=sysexits.h
! fi
! AC_SUBST([HAVE_SYSEXITS_H])
! AC_SUBST([ABSOLUTE_SYSEXITS_H])
AC_SUBST([SYSEXITS_H])
])
*** modules/sysexits 13 Oct 2006 12:40:23 -0000 1.11
--- modules/sysexits 25 Mar 2007 22:48:15 -0000
***************
*** 17,23 ****
# doesn't have one that works with the given compiler.
sysexits.h: sysexit_.h
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
! cat $(srcdir)/sysexit_.h; \
} > address@hidden
mv -f address@hidden $@
MOSTLYCLEANFILES += sysexits.h sysexits.h-t
--- 17,25 ----
# doesn't have one that works with the given compiler.
sysexits.h: sysexit_.h
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
! sed -e 's|@''HAVE_SYSEXITS_H''@|$(HAVE_SYSEXITS_H)|g' \
! -e 's|@''ABSOLUTE_SYSEXITS_H''@|$(ABSOLUTE_SYSEXITS_H)|g' \
! < $(srcdir)/sysexit_.h; \
} > address@hidden
mv -f address@hidden $@
MOSTLYCLEANFILES += sysexits.h sysexits.h-t
- sysexits: test failure on HP-UX,
Bruno Haible <=