From: Bruno Haible Date: Tue, 9 Sep 2025 10:39:02 +0000 (+0200) Subject: errno-h: Remove support for OSF/1. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7cb7d645adb8f393afa08011fd9bea1613cb84c;p=thirdparty%2Fgnulib.git errno-h: Remove support for OSF/1. * lib/errno.in.h: Don't test EMULTIHOP_HIDDEN, ENOLINK_HIDDEN, EOVERFLOW_HIDDEN. * m4/errno_h.m4 (gl_REPLACE_ERRNO_VALUE): Remove macro. (gl_HEADER_ERRNO_H): Don't invoke it. * modules/errno-h (Makefile.am): Don't substitute EMULTIHOP_HIDDEN, EMULTIHOP_VALUE, ENOLINK_HIDDEN, ENOLINK_VALUE, EOVERFLOW_HIDDEN, EOVERFLOW_VALUE. --- diff --git a/ChangeLog b/ChangeLog index a7203f3c9b..929cf09039 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2025-09-09 Bruno Haible + errno-h: Remove support for OSF/1. + * lib/errno.in.h: Don't test EMULTIHOP_HIDDEN, ENOLINK_HIDDEN, + EOVERFLOW_HIDDEN. + * m4/errno_h.m4 (gl_REPLACE_ERRNO_VALUE): Remove macro. + (gl_HEADER_ERRNO_H): Don't invoke it. + * modules/errno-h (Makefile.am): Don't substitute EMULTIHOP_HIDDEN, + EMULTIHOP_VALUE, ENOLINK_HIDDEN, ENOLINK_VALUE, EOVERFLOW_HIDDEN, + EOVERFLOW_VALUE. + faccessat, truncate: Remove support for OSF/1. * lib/faccessat.c: Simplify include of . * lib/truncate.c: Likewise. diff --git a/lib/errno.in.h b/lib/errno.in.h index ba5dd37100..db9fd23dea 100644 --- a/lib/errno.in.h +++ b/lib/errno.in.h @@ -148,22 +148,6 @@ # endif -/* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros - EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */ -# if @EMULTIHOP_HIDDEN@ -# define EMULTIHOP @EMULTIHOP_VALUE@ -# define GNULIB_defined_EMULTIHOP 1 -# endif -# if @ENOLINK_HIDDEN@ -# define ENOLINK @ENOLINK_VALUE@ -# define GNULIB_defined_ENOLINK 1 -# endif -# if @EOVERFLOW_HIDDEN@ -# define EOVERFLOW @EOVERFLOW_VALUE@ -# define GNULIB_defined_EOVERFLOW 1 -# endif - - /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. Likewise, on NonStop Kernel, EDQUOT is not defined. diff --git a/m4/errno_h.m4 b/m4/errno_h.m4 index 420d5bb3e9..623cb7b236 100644 --- a/m4/errno_h.m4 +++ b/m4/errno_h.m4 @@ -1,5 +1,5 @@ # errno_h.m4 -# serial 18 +# serial 19 dnl Copyright (C) 2004, 2006, 2008-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -83,59 +83,4 @@ booboo gl_NEXT_HEADERS([errno.h]) GL_GENERATE_ERRNO_H=true fi - gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) - gl_REPLACE_ERRNO_VALUE([ENOLINK]) - gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) -]) - -# Assuming $1 = EOVERFLOW. -# The EOVERFLOW errno value ought to be defined in , according to -# POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and -# some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined. -# Check for the value of EOVERFLOW. -# Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE. -AC_DEFUN([gl_REPLACE_ERRNO_VALUE], -[ - if $GL_GENERATE_ERRNO_H; then - AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ - AC_EGREP_CPP([yes],[ -#include -#ifdef ]$1[ -yes -#endif - ], - [gl_cv_header_errno_h_]$1[=yes], - [gl_cv_header_errno_h_]$1[=no]) - if test $gl_cv_header_errno_h_]$1[ = no; then - AC_EGREP_CPP([yes],[ -#define _XOPEN_SOURCE_EXTENDED 1 -#include -#ifdef ]$1[ -yes -#endif - ], [gl_cv_header_errno_h_]$1[=hidden]) - if test $gl_cv_header_errno_h_]$1[ = hidden; then - dnl The macro exists but is hidden. - dnl Define it to the same value. - AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [ -#define _XOPEN_SOURCE_EXTENDED 1 -#include -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include -#include -]) - fi - fi - ]) - case $gl_cv_header_errno_h_]$1[ in - yes | no) - ]$1[_HIDDEN=0; ]$1[_VALUE= - ;; - *) - ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1[" - ;; - esac - AC_SUBST($1[_HIDDEN]) - AC_SUBST($1[_VALUE]) - fi ]) diff --git a/modules/errno-h b/modules/errno-h index 385985feab..6592979795 100644 --- a/modules/errno-h +++ b/modules/errno-h @@ -29,12 +29,6 @@ errno.h: errno.in.h $(top_builddir)/config.status -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ - -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ - -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ - -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ - -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ - -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ - -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ $(srcdir)/errno.in.h > $@-t $(AM_V_at)mv $@-t $@ else