From patchwork Fri Feb 14 13:57:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Franke X-Patchwork-Id: 106523 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8428C3858423 for ; Fri, 14 Feb 2025 13:57:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8428C3858423 X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from mailout12.t-online.de (mailout12.t-online.de [194.25.134.22]) by sourceware.org (Postfix) with ESMTPS id 337FE3858C78 for ; Fri, 14 Feb 2025 13:57:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 337FE3858C78 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=t-online.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=t-online.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 337FE3858C78 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=194.25.134.22 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739541436; cv=none; b=byZSdCXUE6Bvmg6MlI2AfyXHy8ZqoZqrfZStIdfZ5ka69zV5agzIVz0rhlzo0NIFX/P4zJaIvzEy96ZxlfYHC4BTO6x/5nd2h8Di+wOHDQ2FyxSn9BpaPrsJDy9vyUqv+qmoKLBZWniIYX61GySr9bYPBazRWmD8hq/rS8um/tM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739541436; c=relaxed/simple; bh=PlM1mAxs4beP9GHcGfJFuCkt+XW71QzTdykqLJOTMhQ=; h=To:From:Subject:Message-ID:Date:MIME-Version; b=wy/jwNZOFyoDUU6UN/R7dTkbJ8anXbUcxEuKEwjKX4PzzTuHJIy8+VjR68PVhbt8jXLM6PkAxGImO1wQKLNehpbRQb0xISMzr2v6QYvG/iDbA2kbkYx0xPM7HtU4atdu3/6wVx3SqaBexxYGoi0g1n6GzpuIRYdFsG2EE8egaJ8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 337FE3858C78 Received: from fwd80.aul.t-online.de (fwd80.aul.t-online.de [10.223.144.106]) by mailout12.t-online.de (Postfix) with SMTP id 6E324AF8 for ; Fri, 14 Feb 2025 14:57:14 +0100 (CET) Received: from [192.168.2.102] ([79.230.164.148]) by fwd80.t-online.de with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted) esmtp id 1tiwBt-2p9KOu0; Fri, 14 Feb 2025 14:57:13 +0100 To: newlib@sourceware.org From: Christian Franke Subject: [PATCH] unistd.h: enable SEEK_DATA and SEEK_HOLE also for POSIX-1.2024 Message-ID: <319854d0-fb79-d6d5-dcec-4b6d1c2c2fed@t-online.de> Date: Fri, 14 Feb 2025 14:57:14 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 SeaMonkey/2.53.20 MIME-Version: 1.0 X-TOI-EXPURGATEID: 150726::1739541433-8FFFC93C-D2F7A20D/0/0 CLEAN NORMAL X-TOI-MSGID: 5fbb2428-1e93-45cd-9433-eda56bcaad53 X-Spam-Status: No, score=-8.8 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: newlib@sourceware.org Errors-To: newlib-bounces~patchwork=sourceware.org@sourceware.org SEEK_DATA and SEEK_HOLE are no longer GNU extensions only. diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h index 9dae4b373..e62e38d10 100644 --- a/newlib/libc/include/sys/unistd.h +++ b/newlib/libc/include/sys/unistd.h @@ -333,7 +333,7 @@ int unlinkat (int, const char *, int); # define SEEK_SET 0 # define SEEK_CUR 1 # define SEEK_END 2 -#if __GNU_VISIBLE +#if __GNU_VISIBLE || __POSIX_VISIBLE >= 202405 # define SEEK_DATA 3 # define SEEK_HOLE 4 #endif