]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
sys_select-h: Remove support for OSF/1.
authorBruno Haible <bruno@clisp.org>
Tue, 9 Sep 2025 10:47:55 +0000 (12:47 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 9 Sep 2025 10:48:06 +0000 (12:48 +0200)
* m4/sys_select_h.m4 (gl_SYS_SELECT_H): Don't test against OSF/1 bug.
* lib/sys_select.in.h: Remove code for OSF/1.

ChangeLog
lib/sys_select.in.h
m4/sys_select_h.m4

index 5ca77890c778cdeb3d1b403b980c2f9a0c6eb94f..2a7764955f9bf0a11809e6b4ce4ce605bd7ec341 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2025-09-09  Bruno Haible  <bruno@clisp.org>
 
+       sys_select-h: Remove support for OSF/1.
+       * m4/sys_select_h.m4 (gl_SYS_SELECT_H): Don't test against OSF/1 bug.
+       * lib/sys_select.in.h: Remove code for OSF/1.
+
        signal-h: Remove support for OSF/1.
        * lib/signal.in.h: Remove code for OSF/1.
 
index c10f8f9de739f9f9496a1b2fc370233dbe96547b..b3ba21e151cf511877d59d74746ce956e651e7fa 100644 (file)
  #error "Please include config.h first."
 #endif
 
-/* On OSF/1 and Solaris 2.6, <sys/types.h> and <sys/time.h>
-   both include <sys/select.h>.
+/* On Solaris 2.6, <sys/types.h> and <sys/time.h> both include <sys/select.h>.
    On Cygwin and OpenBSD, <sys/time.h> includes <sys/select.h>.
    Simply delegate to the system's header in this case.  */
 #if (@HAVE_SYS_SELECT_H@                                                \
      && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H             \
-     && ((defined __osf__ && defined _SYS_TYPES_H_                      \
-          && defined _OSF_SOURCE)                                       \
-         || (defined __sun && defined _SYS_TYPES_H                      \
-             && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE)   \
-                 || defined __EXTENSIONS__))))
+     && (defined __sun && defined _SYS_TYPES_H                          \
+         && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE)       \
+             || defined __EXTENSIONS__)))
 
 # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H
 # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
@@ -44,9 +41,7 @@
 #elif (@HAVE_SYS_SELECT_H@                                              \
        && (defined _CYGWIN_SYS_TIME_H                                   \
            || (!defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H       \
-               && ((defined __osf__ && defined _SYS_TIME_H_             \
-                    && defined _OSF_SOURCE)                             \
-                   || (defined __OpenBSD__ && defined _SYS_TIME_H_)     \
+               && ((defined __OpenBSD__ && defined _SYS_TIME_H_)        \
                    || (defined __sun && defined _SYS_TIME_H             \
                        && (! (defined _XOPEN_SOURCE                     \
                               || defined _POSIX_C_SOURCE)               \
@@ -90,9 +85,7 @@
 
 #if @HAVE_SYS_SELECT_H@
 
-/* On OSF/1 4.0, <sys/select.h> provides only a forward declaration
-   of 'struct timeval', and no definition of this type.
-   Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select()
+/* Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select()
    in <sys/time.h>.
    But avoid namespace pollution on glibc systems, a circular include
    <sys/select.h> -> <sys/time.h> -> <sys/select.h> on FreeBSD 13.1, and
@@ -353,11 +346,11 @@ _GL_WARN_ON_USE (select, "select is not always POSIX compliant - "
 /* On AIX 7 and Solaris 10, <sys/select.h> provides an FD_ZERO implementation
    that relies on memset(), but without including <string.h>.
    But in any case avoid namespace pollution on glibc systems.  */
-# if (defined __OpenBSD__ || defined _AIX || defined __sun || defined __osf__ || defined __BEOS__) \
+# if (defined __OpenBSD__ || defined _AIX || defined __sun || defined __BEOS__) \
      && ! defined __GLIBC__
 #  include <string.h>
 # endif
 
 
 #endif /* _@GUARD_PREFIX@_SYS_SELECT_H */
-#endif /* OSF/1 */
+#endif
index b02f470d95c164e2f57b6e1b647123856757f7d1..f154bc5f1e67690cfe2654da2ef3e5ee6db1e803 100644 (file)
@@ -1,5 +1,5 @@
 # sys_select_h.m4
-# serial 23
+# serial 24
 dnl Copyright (C) 2006-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,
@@ -13,17 +13,14 @@ AC_DEFUN_ONCE([gl_SYS_SELECT_H],
   AC_CACHE_CHECK([whether <sys/select.h> is self-contained],
     [gl_cv_header_sys_select_h_selfcontained],
     [
-      dnl Test against two bugs:
+      dnl Test against a bug:
       dnl 1. On many platforms, <sys/select.h> assumes prior inclusion of
       dnl    <sys/types.h>.
-      dnl 2. On OSF/1 4.0, <sys/select.h> provides only a forward declaration
-      dnl    of 'struct timeval', and no definition of this type.
-      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/select.h>]],
-                                         [[struct timeval b;]])],
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/select.h>]], [])],
         [gl_cv_header_sys_select_h_selfcontained=yes],
         [gl_cv_header_sys_select_h_selfcontained=no])
       dnl Test against another bug:
-      dnl 3. On Solaris 10, <sys/select.h> provides an FD_ZERO implementation
+      dnl 2. On Solaris 10, <sys/select.h> provides an FD_ZERO implementation
       dnl    that relies on memset(), but without including <string.h>.
       if test $gl_cv_header_sys_select_h_selfcontained = yes; then
         AC_COMPILE_IFELSE(