From nobody Sun May 26 17:40:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VnQz9414Fz5LQBh; Sun, 26 May 2024 17:40:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VnQz92g94z53pV; Sun, 26 May 2024 17:40:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zzbKRGL0DNIMN4qRtZhMSroCSWtYhFjPfv9ZAJHWz4g=; b=lAkYpAyz42OnrpQw9FMl8tuKwUiIVbZ6MhEhg8lkvrjB5oQh6zdXmx5eEADFZYyB8n/tvV z8RPQ3R7bJWymQpT2OGDBaZd1I3Vd8EMzhIepqrdo9T548O6Z0/c14e7EEV1qqUMDfoECf RUqGodVDaEZ1+D27P1QNCzGWJM/PKfgkZTMdoSUdy1L5qxAbC4tYlTSe2bZa0shLv7Ut96 Zr0e7nYhAwtAnl4G61DgNsutiD1305tnbu3ez25LkYTpwOL4f8DrJlRQtkpsRAO8iG1B/g 65aQ7YaIFtQ0MOnjwgnrKay0cGKEUXyxzRHXgsF7Ub45iwCFLiYus2sfrTmyjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716745221; a=rsa-sha256; cv=none; b=KaIg3szv5Km+WB8naO+rL8D6jNcsTBMfm8kFSlElBFpgX9edhC84yFN2knhOXfQNdHCLoi sVBFTCPmjdi3cpK0DpcJjTL+5XJCYqWXBhc4KUHexxFbZKF1DO2AmGxsLUoFePKrvB8vAb JEPA/D4NH/F5tRfbgp/z0H5EzsuNgog6W720nMS7Lay++JhlX72WlVqzvROowG1V2J16eP yGnqhNn/sGXdeiTpn2QNAOlIlaJuLnMqb+gqRFw6n7kA2wEGi2Lznq+ZVdE9znBN5BPWGX gd++JgOOYZI0yZnciCySQazNsHzujntKqDz8tsIjmYL0uwtXqbJBeY2Gld6Drg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716745221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zzbKRGL0DNIMN4qRtZhMSroCSWtYhFjPfv9ZAJHWz4g=; b=XlzxWC9Frc6gUfLvRViYIVPUI+uCQOsGk0xomJEgyBQIeBLytI7mMPV/8AZ7Oyz69Mc/vu KPAF1TUTNWOBpsryrxwF6YgkJ0Ot4Wtn798DjJZJcFHk9M+NJEC453IWK2MxjQ4Th7gPvP xnn3PpLhI/dG++gGtsDAuo5e+Uv3cmadGEi1jj1AaX5VwVi0ezmFzwsnCd1vmUDyNeAjag yLIJiaVMqD4sr0eGra2DXgRhrKuB9DMAIgyeCgY+Y7sOGTismkrzowZJQk5d/TEeeFaK5C pZDfJEVGLQjcK6na3EHj5BoIAENbIgCaG65GW3wI6XiD0O20e9OOM3pdYdu3Bw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VnQz92G5Gz18yX; Sun, 26 May 2024 17:40:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44QHeL86085363; Sun, 26 May 2024 17:40:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44QHeLRO085360; Sun, 26 May 2024 17:40:21 GMT (envelope-from git) Date: Sun, 26 May 2024 17:40:21 GMT Message-Id: <202405261740.44QHeLRO085360@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 917c0541e4cc - main - cross-tools: Document a rather bizarre looking construct List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 917c0541e4cc60fc4ea6fe434dabe0699ca7c2fd Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=917c0541e4cc60fc4ea6fe434dabe0699ca7c2fd commit 917c0541e4cc60fc4ea6fe434dabe0699ca7c2fd Author: Warner Losh AuthorDate: 2024-05-26 17:38:46 +0000 Commit: Warner Losh CommitDate: 2024-05-26 17:38:46 +0000 cross-tools: Document a rather bizarre looking construct On Linux, stddef.h will define __size_t to something when size_t is defined. On FreeBSD, __size_t is an actual typedef which we need for other parts of the system. If __size_t isn't defined, that tells us we need to define the fallback __size_t typedef (if it is defined, then we can't easily redefine it without issues because glob.h will define it to something different than stddef.h defines it). Add a comment to this effect. Sponsored by: Netflix Reviewed by: val_packett.cool Differential Revision: https://reviews.freebsd.org/D45350 --- tools/build/cross-build/include/linux/sys/types.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/build/cross-build/include/linux/sys/types.h b/tools/build/cross-build/include/linux/sys/types.h index 770b3057f8a8..222560167a71 100644 --- a/tools/build/cross-build/include/linux/sys/types.h +++ b/tools/build/cross-build/include/linux/sys/types.h @@ -37,6 +37,13 @@ #include_next +/* + * stddef.h for both gcc and clang will define __size_t when size_t has + * been defined (except on *BSD where it doesn't touch __size_t). So if + * we're building on Linux, we know that if that's not defined, we have + * to typedef __size_t for FreeBSD's use of __size_t in places to work + * during bootstrapping. + */ #ifndef __size_t typedef __SIZE_TYPE__ __size_t; #endif