068a1ca63e
Bootloader fork rebase:
- Base changed from 0.1.0 pre-patched archive to upstream 1.0.0 tag (c7eeb9f)
- Applied 0001-redbear-local-forks.patch (Cargo.toml crate path redirects)
- Applied fix-uefi-alloc-panic.patch equivalents (4 panic!() -> graceful
error handling in src/main.rs)
- Applied P5-live-preload-cap-1gib.patch (1 GiB cap on live image preload)
- Skipped: P0 GPT partition scan (requires new module + integration),
P1 timeout/default-resolution, P2 live preload guard (subsumed by
panic fixes + cap), P3 live image safe read, P4 large ISO boot,
redox.patch — to be applied in dedicated rebase session.
firmware-loader/Cargo.toml: version 0.1.0 -> 0.3.0 (sync with other
Red Bear custom crates which are at 0.3.0).
fork-upstream-map.toml: bootloader back from PENDING_REBASE to 1.0.0
since the partial rebase matches upstream 1.0.0 content.
fork-upstream-map.toml: base restored to 'main' tracked (was correctly
tracked by build-redbear.sh).
97 lines
2.9 KiB
Plaintext
97 lines
2.9 KiB
Plaintext
# sockpfaf.m4
|
|
# serial 11
|
|
dnl Copyright (C) 2004, 2006, 2009-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,
|
|
dnl with or without modifications, as long as this notice is preserved.
|
|
dnl This file is offered as-is, without any warranty.
|
|
|
|
dnl Test for some common socket protocol families (PF_INET, PF_INET6, ...)
|
|
dnl and some common address families (AF_INET, AF_INET6, ...).
|
|
dnl This test assumes that a system supports an address family if and only if
|
|
dnl it supports the corresponding protocol family.
|
|
|
|
dnl From Bruno Haible.
|
|
|
|
AC_DEFUN([gl_SOCKET_FAMILIES],
|
|
[
|
|
AC_REQUIRE([gl_SYS_SOCKET_H])
|
|
AC_CHECK_HEADERS_ONCE([netinet/in.h])
|
|
|
|
AC_CACHE_CHECK([for IPv4 sockets],
|
|
[gl_cv_socket_ipv4],
|
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
|
#ifdef HAVE_SYS_SOCKET_H
|
|
#include <sys/socket.h>
|
|
#endif
|
|
#ifdef HAVE_NETINET_IN_H
|
|
#include <netinet/in.h>
|
|
#endif
|
|
#ifdef HAVE_WINSOCK2_H
|
|
#include <winsock2.h>
|
|
#endif]],
|
|
[[int x = AF_INET; struct in_addr y; struct sockaddr_in z;
|
|
if (&x && &y && &z) return 0;]])],
|
|
gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)])
|
|
if test $gl_cv_socket_ipv4 = yes; then
|
|
AC_DEFINE([HAVE_IPV4], [1], [Define to 1 if <sys/socket.h> defines AF_INET.])
|
|
fi
|
|
|
|
AC_CACHE_CHECK([for IPv6 sockets],
|
|
[gl_cv_socket_ipv6],
|
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
|
#ifdef HAVE_SYS_SOCKET_H
|
|
#include <sys/socket.h>
|
|
#endif
|
|
#ifdef HAVE_NETINET_IN_H
|
|
#include <netinet/in.h>
|
|
#endif
|
|
#ifdef HAVE_WINSOCK2_H
|
|
#include <winsock2.h>
|
|
#endif
|
|
#ifdef HAVE_WS2TCPIP_H
|
|
#include <ws2tcpip.h>
|
|
#endif]],
|
|
[[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
|
|
if (&x && &y && &z) return 0;]])],
|
|
gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)])
|
|
if test $gl_cv_socket_ipv6 = yes; then
|
|
AC_DEFINE([HAVE_IPV6], [1], [Define to 1 if <sys/socket.h> defines AF_INET6.])
|
|
fi
|
|
])
|
|
|
|
AC_DEFUN([gl_SOCKET_FAMILY_UNIX],
|
|
[
|
|
AC_REQUIRE([gl_SYS_SOCKET_H])
|
|
AC_CHECK_HEADERS_ONCE([sys/un.h])
|
|
|
|
dnl Windows versions released after 2017 may have support for AF_UNIX.
|
|
dnl Including it requires types from <winsock2.h> to be defined.
|
|
dnl <https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/>.
|
|
if test "$ac_cv_header_winsock2_h" = yes; then
|
|
AC_CHECK_HEADERS([afunix.h], [], [], [#include <winsock2.h>])
|
|
fi
|
|
|
|
AC_CACHE_CHECK([for UNIX domain sockets],
|
|
[gl_cv_socket_unix],
|
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
|
#ifdef HAVE_SYS_SOCKET_H
|
|
#include <sys/socket.h>
|
|
#endif
|
|
#ifdef HAVE_SYS_UN_H
|
|
#include <sys/un.h>
|
|
#endif
|
|
#ifdef HAVE_WINSOCK2_H
|
|
#include <winsock2.h>
|
|
#endif
|
|
#ifdef HAVE_AFUNIX_H
|
|
#include <afunix.h>
|
|
#endif]],
|
|
[[int x = AF_UNIX; struct sockaddr_un y;
|
|
if (&x && &y) return 0;]])],
|
|
gl_cv_socket_unix=yes, gl_cv_socket_unix=no)])
|
|
if test $gl_cv_socket_unix = yes; then
|
|
AC_DEFINE([HAVE_UNIXSOCKET], [1], [Define to 1 if <sys/socket.h> defines AF_UNIX.])
|
|
fi
|
|
])
|