From patchwork Fri Mar 19 01:18:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YunQiang Su X-Patchwork-Id: 42674 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 E51AC3848037; Fri, 19 Mar 2021 01:18:58 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-eopbgr1310139.outbound.protection.outlook.com [40.107.131.139]) by sourceware.org (Postfix) with ESMTPS id 84DB43854801 for ; Fri, 19 Mar 2021 01:18:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 84DB43854801 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cipunited.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yunqiang.su@cipunited.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DOhpkE7NBafR8r7U9Au7ODgk5aa0o/fWKTmG4LM0GNcHnSMDbqitHCfPXPSL0sfHajknDLImLYSkpk0ro+7NaXhQ4iO4Yi+nwoEaLdsEmqzzJagACL2yVdfHj1GZmcUVZoAdxUxf1/MrccgHAI18DqFPnUuE30XD/vjorjCLoL0/p+klqBDUbjgNAYpPfJbjhbLzslLZ+4HTsRfuD8m9tPT/jBzpGKMvpDedSjaIHIyjaXgkjVXGLitYjeNQJw305jDySy+NU8Tq3XuSgl7KQtkyV1hwQM8jO/TIFTeJVu338dC9ms1zvUKnBVxoz/sVRZjJMDdx4qpdNLHW6HM/DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0KJeexcL9wdSnytkyEhLybxHFJBF33uk1HBjvgDFchA=; b=WwCRYWSk8fs7VFSKxlhJk1zRjLVH8EjVvLUbpGDDqXQUJCa+REJ6sDLW6VX4kuEsQMMvhVHLHxfsR4CpmtdX/tDg+eLmrnM06OiPvdbzBROpS5aA9XEXpnje/INEe6o2gMjcTs0tYIoI2aR603E6XmTQrrFBrLaKKjIwmJlcKIa/oZPLI3ek5M8tihnLi0p/r3NorF6OnJXbokXacxQXxgDbt2+WWKEv85U5mD3ONHuBlz1/WiD5NFiEERwhmES+WPjA0EyHuR3SyKl4Vam40a17HE/uorzPWU8OBQ8lpA3fJkUbFsL/vYHmPITZH3IMF/NtBAcJ3aJ1ca25jsgelw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cipunited.com; dmarc=pass action=none header.from=cipunited.com; dkim=pass header.d=cipunited.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cipunited.onmicrosoft.com; s=selector1-cipunited-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0KJeexcL9wdSnytkyEhLybxHFJBF33uk1HBjvgDFchA=; b=ejfzvMhRY6i264WRvCFE7HexxpsE08NcFwCjtTagrbCRKys9+moie0pGF87gkm7RqIO8+N7196QVuus/IVA+HI1R6kgtRsnuF0aKUXmRNvd8KUo+bUYPR6mlHzIH3RTAFFbPs0uk9ghWvFZVHAkE2CQ0GJRUb9aFQFgBt2X7yyE= Authentication-Results: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=cipunited.com; Received: from HKAPR04MB3956.apcprd04.prod.outlook.com (2603:1096:203:d5::13) by HKAPR04MB4035.apcprd04.prod.outlook.com (2603:1096:203:dc::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.32; Fri, 19 Mar 2021 01:18:50 +0000 Received: from HKAPR04MB3956.apcprd04.prod.outlook.com ([fe80::152f:4f26:f6d1:2d6f]) by HKAPR04MB3956.apcprd04.prod.outlook.com ([fe80::152f:4f26:f6d1:2d6f%3]) with mapi id 15.20.3955.018; Fri, 19 Mar 2021 01:18:50 +0000 From: YunQiang Su To: libc-alpha@sourceware.org Subject: [PATCH v2 1/2] fstatat64: use statx on kernel using uint32 for time Date: Fri, 19 Mar 2021 01:18:36 +0000 Message-Id: <20210319011837.3883510-1-yunqiang.su@cipunited.com> X-Mailer: git-send-email 2.31.0 X-Originating-IP: [58.246.137.130] X-ClientProxiedBy: HK2PR03CA0051.apcprd03.prod.outlook.com (2603:1096:202:17::21) To HKAPR04MB3956.apcprd04.prod.outlook.com (2603:1096:203:d5::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (58.246.137.130) by HK2PR03CA0051.apcprd03.prod.outlook.com (2603:1096:202:17::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.9 via Frontend Transport; Fri, 19 Mar 2021 01:18:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e68df81c-f149-42d5-c04f-08d8ea74f3a4 X-MS-TrafficTypeDiagnostic: HKAPR04MB4035: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ppWGLxUxmRthrHJPygBOy8qdwgi4bRUi1Rdnsqbtiry8lQ5UXY2fpr1hwqdmM4ryVhRoCsMiv9Y4R2n1XzHHJafepZcwWt3S3YwBMzc1HOX3XsvJHmFD4CWC7knhy0lMosB5m7X3HLilJGwqg0ZLRmRyAfFSCmWoGRjzDsELB/n3qWA4k/r5r6EwVSNcncnPzz9TZ/g7xKv5mLmlUOLGUgbfS5LpZ5ln455DDbEx2fpiDCNiAiMQD8lKVjiHvyBkyFZjUsoVCeEbige9o6samzgtBodesFrmIrVV1tjSeAULVeCQemtZBfLr/R3XDDpDVW4R/jZOQs/6Bw5Myuai4siFo3QJJQlN4FHMEtf/YPXuP4sTZ2lXXhYyOg/7Wi4jE0lbPJa+m3TQzgjUv5IpUhPc8ph/u14ka7Hz6+qXKY2L2uKAdAGAnwHoQKUr1WuH5VIHlPnmfnOm38ZTxiCr3DAJinhifvC/u3mdOF63hxwssxTRzlfr2wy25H2c0nuhdQ+9hyMxhguewe/29VGcXqh+2gGtKuVD9f74Wsd2ES7DMPQpgLjs/GrkOBLcLRTNSeL9JI1X6ECniRqW/d07HCLM1g0V4DGSAxpcQzD494rt/iW8QTo4a//SJT4DFbmC6N/5YKa9RRHW3O/eAqI3gqduLzrO2rW5tqtTv5qbRb6Y8qoJYuCfyxff7atAR0dv X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HKAPR04MB3956.apcprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(39830400003)(346002)(396003)(376002)(366004)(136003)(6512007)(956004)(316002)(83380400001)(38100700001)(1076003)(2616005)(69590400012)(36756003)(6486002)(107886003)(2906002)(66476007)(52116002)(86362001)(26005)(8676002)(66946007)(6666004)(478600001)(5660300002)(6506007)(8936002)(66556008)(16526019)(6916009)(186003)(4326008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: 1UPfIRBHblKYUtzjEHQnO0aiK5JGjmx/KTrnsjJavfFXLtvXYF22qQyKOFiggZ15SwVes+x7JtenV0t4Y+cebK423XvQfIrmatd+nTmre+El9q0j0KJp91jC2gXYxgUuq9R3wXPYEIlmhkkbMUSuWti4KW7kH/LNRyF14vkGgehqrCXdFaZHppy/HJB/F/Y7eI24Z1VZoxcE55+iZ5Y/fzOXOsbPoYoSlHoVnDRxfWqzrNTIgtpnSl0SviBj2TUXJNm5g2NpCtjQYmQyLO3CklM46IwWQn3Cm3bK7t+ApAyQRy2jpRjI6cdGsOUqtSJdNeJkTdZ04YFZ7URh+9waA1MmBEHOr9siuXmO7vTZ4QHC6RoIoN6tEI3rY8WPbpFZqlhq6s2siyPka9O39F1b9rIt0LDtAraryBIv6if6dPmxZB9hxvjcrfPmGUweDy655Y24/D6SrOx9PgHCNZoa3BFUGPdJcyh4I7dADguaFptt/E2v7AhAnNDqvbi2ZaTbpR/IM1Tt2i08EXXId/E48GDHdiKYeswiRSFy7Z17ic0C5M5XRauEVbk8Gr+t/BCFyw6kN3D45jlT5+IJHwSp8w0swe+2hMNPkLYbqI3antY49ya2QO3s5Pmb3wdB6bHD9WgOo/ebpPNsyucwybLulsc0ngLuwhvmHXAnH1oQiYoB5iW39UMPSh3odbbUTT6/TWxt2Hf2fkRv1YGaLWjY/zZDsz+OM1Z+M/ukpZ5j67kFhYmA5+zzypXhFruCQ+15OjjndSHFMy0+sGPUTQ2Ward3DpMPOJRyu2ZQVkx3UWyNvPDxPcajQdex6jb00HpPx27Iz7AxjuciXgeBX3yL+BtwVTlMw7D2KUL7OyCGwLSqL4ILpNHuY/xZW3OV/NvZMWfhXd9NBDIc02z35P1SMtHCI+XqK2j+cba/AHE/n7IRbX25+8D35gb4/uk2/G8bwVa2Fms2H/kGfqvD3AgbaGF7dak9DIabR6ryUPE0aLnyugrKdVxsc6pvJM95eEoPny+t6eT2wDm8/3hSNUJz/GMqIojJHv/Ab0X1GGx1/3xLkoprmPwkPTk+ELW6VAoYD+1nn9/StQvLHHBmIESPJymwERhBckGLSvDHMfge+Qlm+ovUYjDPBvEa885Yl6NETiBzf9Vi2os1zdqlmmNFZ+byxxtUNauGgEL3lu3iEOMNroBVKLkHXtAgo+F3p7ctkDXOE4W+/JX5odK9QPg8w/ZsTanxzW1fUDiPQFgtQnslzZNJgVwOIbxczxx/wP5Sx2IEo86D7GO79l9Jy1cHZhbojBzWeGln8qcW3u33CH6FZlnnTjq70owOsZOQqhyq X-OriginatorOrg: cipunited.com X-MS-Exchange-CrossTenant-Network-Message-Id: e68df81c-f149-42d5-c04f-08d8ea74f3a4 X-MS-Exchange-CrossTenant-AuthSource: HKAPR04MB3956.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2021 01:18:49.9264 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e31cf5b5-ee69-4d5f-9c69-edeeda2458c0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 786mL21r/WY7UD3aHK+cRLwg+QC/NHpponCyE7hz8ty6yDMuD8U0HCaY/t4rPARyS2/8JiDy+q0ql4tRWZ0P46+5/9FRzUQ3EUSnwGDWLTM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKAPR04MB4035 X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: syq@debian.org, YunQiang Su , jiaxun.yang@flygoat.com, aurelien@aurel32.net, macro@orcam.me.uk Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" MIPS N64's lagacy stat-syscalls use uint32 as its time. Glibc converts it to int64 then. Timestamp -1 as an example: syscall(newfstatat) gets 0xffffffff, Glibc converts it to 0x00000000ffffffff Then, -1 becomes a time in y2106. We define a macro STAT_KERNEL64_TIME32_T for this behaviour. fstatat also uses fstatat64_time64 internal for this case. --- sysdeps/unix/sysv/linux/fstatat.c | 9 +++++++-- sysdeps/unix/sysv/linux/fstatat64.c | 5 ++++- sysdeps/unix/sysv/linux/mips/kernel_stat.h | 5 +++++ sysdeps/unix/sysv/linux/statx_cp.h | 4 ++++ sysdeps/unix/sysv/linux/tst-futimens.c | 4 ++++ sysdeps/unix/sysv/linux/tst-utime.c | 4 ++++ sysdeps/unix/sysv/linux/tst-utimes.c | 5 +++++ 7 files changed, 33 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/fstatat.c b/sysdeps/unix/sysv/linux/fstatat.c index 59efff615f..ccb6027b64 100644 --- a/sysdeps/unix/sysv/linux/fstatat.c +++ b/sysdeps/unix/sysv/linux/fstatat.c @@ -37,7 +37,12 @@ __fstatat (int fd, const char *file, struct stat *buf, int flag) || buf->__st_blocks_pad != 0)) return INLINE_SYSCALL_ERROR_RETURN_VALUE (EOVERFLOW); # else -# ifdef __NR_fstatat64 +# if defined(STAT_KERNEL64_TIME32_T) + /* Some architecture, like MIPS N64, is 64bit, while its kernel_stat has 32bit timespec. + Since they are 64bit, and time_t is also 64bit, it is safe for this cast */ + return __fstatat64_time64(fd, file, (struct __stat64_t64 *)buf, flag); +# endif +# if defined(__NR_fstatat64) /* Old KABIs with old non-LFS support, e.g. arm, i386, hppa, m68k, mips32, microblaze, s390, sh, powerpc, and sparc. */ struct stat64 st64; @@ -72,7 +77,7 @@ __fstatat (int fd, const char *file, struct stat *buf, int flag) return 0; } # else - /* 64-bit kabi outlier, e.g. mips64 and mips64-n32. */ + /* 64-bit kabi outlier, e.g. mips64-n32. */ struct kernel_stat kst; r = INTERNAL_SYSCALL_CALL (newfstatat, fd, file, &kst, flag); if (r == 0) diff --git a/sysdeps/unix/sysv/linux/fstatat64.c b/sysdeps/unix/sysv/linux/fstatat64.c index 490226a8ec..be19165f49 100644 --- a/sysdeps/unix/sysv/linux/fstatat64.c +++ b/sysdeps/unix/sysv/linux/fstatat64.c @@ -47,9 +47,12 @@ __fstatat64_time64 (int fd, const char *file, struct __stat64_t64 *buf, int r; #if (__WORDSIZE == 32 \ - && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) + && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) \ + || defined(STAT_KERNEL64_TIME32_T) /* 32-bit kABI with default 64-bit time_t, e.g. arc, riscv32. Also 64-bit time_t support is done through statx syscall. */ + /* the time_sec members of kernel_stat struct on some architecture + is unsigned 32bit, which has Y2106 problem. MIPS N64 is an example. */ struct statx tmp; r = INTERNAL_SYSCALL_CALL (statx, fd, file, AT_NO_AUTOMOUNT | flag, STATX_BASIC_STATS, &tmp); diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h index e4b0f211ca..ce2e1c01ac 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h @@ -68,4 +68,9 @@ struct kernel_stat # define STATFS_IS_STATFS64 0 #endif +/* the time_sec members of kernel_stat struct is uint32_t, which has Y2106 problem */ +#if _MIPS_SIM == _ABI64 +#define STAT_KERNEL64_TIME32_T 1 +#endif + #endif diff --git a/sysdeps/unix/sysv/linux/statx_cp.h b/sysdeps/unix/sysv/linux/statx_cp.h index 634330aaa6..cc1ae4698d 100644 --- a/sysdeps/unix/sysv/linux/statx_cp.h +++ b/sysdeps/unix/sysv/linux/statx_cp.h @@ -18,6 +18,10 @@ extern void __cp_stat64_statx (struct stat64 *to, struct statx *from) attribute_hidden; +#if defined(STAT_KERNEL64_TIME32_T) +# define __cp_stat64_t64_statx __cp_stat64_statx +#else extern void __cp_stat64_t64_statx (struct __stat64_t64 *to, const struct statx *from) attribute_hidden; +#endif diff --git a/sysdeps/unix/sysv/linux/tst-futimens.c b/sysdeps/unix/sysv/linux/tst-futimens.c index 785cd87557..67a411db74 100644 --- a/sysdeps/unix/sysv/linux/tst-futimens.c +++ b/sysdeps/unix/sysv/linux/tst-futimens.c @@ -37,6 +37,9 @@ const struct timespec t2[2] = { { 0x80000001ULL, 0 }, { 0x80000002ULL, 0 } }; /* struct timespec array around Y2038 threshold. */ const struct timespec t3[2] = { { 0x7FFFFFFE, 0 }, { 0x80000002ULL, 0 } }; +/* struct timespec array around -1: may trigger Y2106 problem */ +const struct timespec t4[2] = { { -1, 0 }, { -2, 0 } }; + #define PREPARE do_prepare static void do_prepare (int argc, char *argv[]) @@ -83,6 +86,7 @@ do_test (void) test_futimens_helper (&t1[0]); test_futimens_helper (&t2[0]); test_futimens_helper (&t3[0]); + test_futimens_helper (&t4[0]); return 0; } diff --git a/sysdeps/unix/sysv/linux/tst-utime.c b/sysdeps/unix/sysv/linux/tst-utime.c index 21e4e41dea..c39927fc68 100644 --- a/sysdeps/unix/sysv/linux/tst-utime.c +++ b/sysdeps/unix/sysv/linux/tst-utime.c @@ -39,6 +39,9 @@ const static struct utimbuf t2 = { 0x80000001ULL, 0x80000002ULL }; /* struct utimbuf around Y2038 threshold. */ const static struct utimbuf t3 = { 0x7FFFFFFE, 0x80000002ULL }; +/* struct timespec array around -1: may trigger Y2106 problem */ +const static struct utimbuf t4 = { -1, -2 }; + #define PREPARE do_prepare static void do_prepare (int argc, char *argv[]) @@ -85,6 +88,7 @@ do_test (void) test_utime_helper (&t1); test_utime_helper (&t2); test_utime_helper (&t3); + test_utime_helper (&t4); return 0; } diff --git a/sysdeps/unix/sysv/linux/tst-utimes.c b/sysdeps/unix/sysv/linux/tst-utimes.c index 0f23e44897..1395aa1764 100644 --- a/sysdeps/unix/sysv/linux/tst-utimes.c +++ b/sysdeps/unix/sysv/linux/tst-utimes.c @@ -40,6 +40,10 @@ struct timeval t2[2] = { { 0x80000001ULL, 0 }, { 0x80000002ULL, 0 } }; const static struct timeval t3[2] = { { 0x7FFFFFFE, 0 }, { 0x80000002ULL, 0 } }; +/* struct timespec array around -1: may trigger Y2106 problem */ +const static +struct timeval t4[2] = { { -1, 0 }, { -2, 0 } }; + #define PREPARE do_prepare static void do_prepare (int argc, char *argv[]) @@ -86,6 +90,7 @@ do_test (void) test_utime_helper (&t1[0]); test_utime_helper (&t2[0]); test_utime_helper (&t3[0]); + test_utime_helper (&t4[0]); return 0; } From patchwork Fri Mar 19 01:18:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YunQiang Su X-Patchwork-Id: 42675 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 5222B386EC4D; Fri, 19 Mar 2021 01:19:02 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-eopbgr1310139.outbound.protection.outlook.com [40.107.131.139]) by sourceware.org (Postfix) with ESMTPS id 4905D3854801 for ; Fri, 19 Mar 2021 01:18:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4905D3854801 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cipunited.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yunqiang.su@cipunited.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QM7Mzx0hctfzYkAVhhuxB/J//hcH3h7kGXeGwsRlHpq7YSoX2RrXvIdEatzZCMMeQq17ec/WBsJyCrCckelKcdq9ZKeE3AWLIZbesWKjG1ML5JjjNGQio9XyvYGyHO8VmWHS7mgm/nD6SqHqFm/9mCW0UCDtkkIuCwPP4XeyACp+ehd4bnAeojsCOTWyM7kCHsBchDdmFyp/m3uXfUfKU1b5H1y62Guq3ocgV5MXq9JR2KCG8gN7FgTNI2jt4mwLjPMnr+vimSGn6BfrS8ohKzWxQhwCwwwPJMoWcqHidAHS528ymL4vfuzkZumCQaDKfa7cVPPkdsLZGLwNMqiloA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MRX9pE9ZBVJfx/JrvItnKWOVTmUKIKJ8EpV5wAAnDro=; b=IytBteL6qFUonCcWwr0NDpIY8jpdvvQ/JeVCdiKZcQPTmgLUDVNvB9qfKXwfS0UU9rAz5jNpe269TEolUKMZDDPkcoE/RsaAJI6wNoJWrZbUtgKZ2OXnSZODv3D3ZSjT2PBJfkgVdLbsKRTfGH0nHKlhZ45EH4X3mY1/1ouMq0dS080ohjc1qTOqPS/EIbCDJIh7nFbzRGSRI33e9lumMzGVwBhBIcf2jorZkasFb4X9Oe+ucgrYqKj/vt2AYn3OavjvfOEPsM3YNpbG83gewNV3wx2TfuRCpxSDEZBWMu7H8+W3nLe/WVdO6xWZFQdVj8Mms2OmMASx9bFg169lpQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cipunited.com; dmarc=pass action=none header.from=cipunited.com; dkim=pass header.d=cipunited.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cipunited.onmicrosoft.com; s=selector1-cipunited-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MRX9pE9ZBVJfx/JrvItnKWOVTmUKIKJ8EpV5wAAnDro=; b=c9SRpctrehE6p7AIKtvVjcOq3T9ytyIk0cjM6nHZcVNlDD0Mj28Fp9nWpLQqstv7jmarQFfoW8l1rjoMgInZoz08AG28lMbUv4iaEbF6dooWcWEvLBytMRotjluZJbMtvqLOxOr9CMXkPdE7Fpnmtkl/2vFQxsNA39PLO1LzVNI= Authentication-Results: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=cipunited.com; Received: from HKAPR04MB3956.apcprd04.prod.outlook.com (2603:1096:203:d5::13) by HKAPR04MB4035.apcprd04.prod.outlook.com (2603:1096:203:dc::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.32; Fri, 19 Mar 2021 01:18:52 +0000 Received: from HKAPR04MB3956.apcprd04.prod.outlook.com ([fe80::152f:4f26:f6d1:2d6f]) by HKAPR04MB3956.apcprd04.prod.outlook.com ([fe80::152f:4f26:f6d1:2d6f%3]) with mapi id 15.20.3955.018; Fri, 19 Mar 2021 01:18:52 +0000 From: YunQiang Su To: libc-alpha@sourceware.org Subject: [PATCH v2 2/2] MIPS: N64, make xstat as wrapper of generic fstatat Date: Fri, 19 Mar 2021 01:18:37 +0000 Message-Id: <20210319011837.3883510-2-yunqiang.su@cipunited.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210319011837.3883510-1-yunqiang.su@cipunited.com> References: <20210319011837.3883510-1-yunqiang.su@cipunited.com> X-Originating-IP: [58.246.137.130] X-ClientProxiedBy: HK2PR03CA0051.apcprd03.prod.outlook.com (2603:1096:202:17::21) To HKAPR04MB3956.apcprd04.prod.outlook.com (2603:1096:203:d5::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (58.246.137.130) by HK2PR03CA0051.apcprd03.prod.outlook.com (2603:1096:202:17::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.9 via Frontend Transport; Fri, 19 Mar 2021 01:18:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f61376f9-022f-4138-77c0-08d8ea74f4d2 X-MS-TrafficTypeDiagnostic: HKAPR04MB4035: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:619; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /A24Oe/mlnET0EFTgggz6bAJ1FAU8qbQinqJY30OUi+rujXnzQPnHptiFZL9Mo6r/02Dry3msSfFGDp0x16Pe3sW2B6uA/afe0htG8SSxWmSvfVlmwQowB9p/L1wRiNbp/OhkqEDMFkqY1WKflo6Mxe7MdarkYT6GqhwkCoGQ+ZFhlbjnoWqG8uSJbmK/wJkmGXjuDa0OQMQADdqEBekY720qAfuu+voUsbw8Rhv4I9LfwkN81MtxQlO3G8yYzf9D859ZSHaFzqZhyVJNdrv1OaZlx8oFwnTt1SxWiQxcskVDTTedZSMTZKILV17uZrHTpnaWPqCf8A5Dljq1NgoWc73k1SrU8o5aNO0smqPKkY0IWkB783WN30iUJqrDe/jLmNxY4uSIBIRIx+UZ7Vri22YB7NqhGKnBRDv1nrIF91h22WH/+wKjlhVLkqqQTbg/9T5BSsO6rTnt7fHxNUaZDmO2Y46a3uzBb9vfQ/cDxR7eagjTM36YmsehNI+arQe+1a814H1Sc+u7Lp3meWvt4bcxRLvz90+T+Gosw83DcAHV9LMr662308GI49+NmlJNBQFG54soDOq/evNvBe9JdnIGpyGKeyLNF0Ylx/hzeL23RclWs9EBVQDY3QPu1z+T1r/o8F/1vrWrcznJIQSlpyUqsttGWuaqK5AH8fTR917U7imnsecsDjV8jQss/bPT6EH2by+DIUD48K4HNS2E+U9gqs96JYBPXbzJRrXsi5awUKcMRsjFpB8QdybVKpB/pKYgcLdh5o3xwl4OLONKkAEb1UF32214QFdYbvwOv5MUNSOtlia+ZpQjk9D9YSL X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HKAPR04MB3956.apcprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(39830400003)(346002)(396003)(376002)(366004)(136003)(6512007)(956004)(316002)(38100700001)(1076003)(2616005)(69590400012)(36756003)(6486002)(107886003)(30864003)(2906002)(66476007)(52116002)(86362001)(26005)(8676002)(66946007)(6666004)(478600001)(5660300002)(6506007)(8936002)(66556008)(16526019)(6916009)(186003)(4326008)(41533002)(2004002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: oe0NprSJPxQP82K6cy2HKuBjK5Cv/aBVpjHsG5je5dXUy+PJR1TKuF0ovVlJNfb0DAs8PNNISSgqMeXWkB4Vhe1kQz3WaSq21ztUopQyln8OiHsMCnyvDtwoi7vjrGvshYguvJ8bijXlOL+upJr3BwxhFSA8c3m/8yUh4DzxeV/gw4kfUGxKjVjx4+CbiCLHV2GjP1VZa41mXPQ3j1FS4383CBTOX9QTopQieO67IXmNK8X6oO2QiParCXAUfzDOuTDSzdeAtT0w5uefcROApD6N4xQ7kjIZJUipHH23pyUpbzBuhx2GfkV8sTkPHT2ebaicIIyC4faVBMLl7Usm6WahJXGDaqXdHyqhFCxNA/Zmls5D2uQT1irBsmRcYrlF86qTWf+4UjnMrkldqEmdu9Q96IhZ+qy8XycMdiqpZwdqDHcij2WXLXDcwKN99h0seArL18wMEzAulhl8wbk38L1V/VFJP9yPtf2nMMMunm4uIRqmalVY78GpjvyRWP3qdAJKWVrStoM/0yDTiq36nQ34ps1FELhF2C9T8b75tmK5HqtDu2mn3ip0n35lmnV0KHmzqAdJf/PvulNVXNeKkTA0B3kojSi+a53RNjh10ql6B93uVHORkGq8AsFq4cRm7nV5ukqVUdVgNKjLHWgZcaJy+MGAp90IM20r5rjNJrMjzcEQ8k/jyrmKjUwQK+FbsZdImzCK3bGPJ2g47L7wjfwTH61KU4IV/qRf7ham0aIs/PftZRm8+g5fTL/d/c34yFTkkoMcB1eI3qJxgMXqq0g4ZDhx5wyBbrVf/MqXP8TVKyvuPNn4fP+ts7wMV9fhJTdwg6Uia3DDRDpNVkU9kuxieCAAwQqXjjMtOBzHpAW38gnqzZCyU2didfS55RS22yy3rJjNXgP4JO9DDcaH8n9Vz432f9ekmpPxr79p5yc4rXauX1gkh2byaF9u8YhFKWMUfrFco/p8zY3OmcgkVIuMy4CtPsanE6CSX4HvJ+Vz1DmkTyT3Wp0wL7wZbI46O/AFxug/a+QowwS0rKkrDbbc70bjGrYaXHmoFiNq6YH1dMiDj4rplmsMh+fJTZTgNIeUqhQC3Kq7fndOw2aLi5WaJ0hdREDJQPbTmDXe7c0gl6BcDvXp+iZ9P1MriLXSPxnU+Yt3soWKdbIqfbaB6vq5E252OLbJtH1iIxrNcDJ0PR4aLy5jWivIspMjhIZIzp7DrbPglKOBdaKhHfyprO+gZUbQDrTYRlYLHcToxwYuR2y04beMkGidx1IYIxcXDtN2D1WJWbJq4CuGHhCTn4nq5IO+H8MXjO3rsPHjybW5jl6/MxgbdCf4eAZPNIGX X-OriginatorOrg: cipunited.com X-MS-Exchange-CrossTenant-Network-Message-Id: f61376f9-022f-4138-77c0-08d8ea74f4d2 X-MS-Exchange-CrossTenant-AuthSource: HKAPR04MB3956.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2021 01:18:51.8928 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e31cf5b5-ee69-4d5f-9c69-edeeda2458c0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mQLMZj/G7NfaUsvGp0Q4hIl1pMjOdXW4YBZwfS4NfuELbNbPo2C/RXSAuIhvtSyWecfpjLQeFHl2nIYVeXQUHo5KDzlRN/AFqoVq9kD65F8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKAPR04MB4035 X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_SHORT, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: syq@debian.org, YunQiang Su , jiaxun.yang@flygoat.com, aurelien@aurel32.net, macro@orcam.me.uk Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" fxstatat as wrapper of fstatat fxstatat64 as wrapper of fstatat64 fxstat, lxstat, xstat as wrapper of fxstatat fxstat64, lxstat64, xstat64 as wrapper of fxstatat64 --- .../unix/sysv/linux/mips/mips64/n64/fxstat.c | 27 +++++++++++++ .../sysv/linux/mips/mips64/n64/fxstat64.c | 28 ++++++++++++++ .../sysv/linux/mips/mips64/n64/fxstatat.c | 38 +++++++++++++++++++ .../sysv/linux/mips/mips64/n64/fxstatat64.c | 34 +++++++++++++++++ .../unix/sysv/linux/mips/mips64/n64/lxstat.c | 27 +++++++++++++ .../sysv/linux/mips/mips64/n64/lxstat64.c | 27 +++++++++++++ .../unix/sysv/linux/mips/mips64/n64/xstat.c | 27 +++++++++++++ .../unix/sysv/linux/mips/mips64/n64/xstat64.c | 28 ++++++++++++++ 8 files changed, 236 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/fxstat.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/fxstat64.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/fxstatat.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/fxstatat64.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/lxstat.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/lxstat64.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/xstat.c create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/xstat64.c diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/fxstat.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/fxstat.c new file mode 100644 index 0000000000..037b2bb080 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/fxstat.c @@ -0,0 +1,27 @@ +/* fxstat using old-style Unix stat system call. + Copyright (C) 1991-2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +/* Get information about the file NAME in BUF. */ +int +__fxstat (int vers, int fd, struct stat *buf) +{ + return __fxstatat(vers, fd, "", buf, AT_EMPTY_PATH); +} diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/fxstat64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/fxstat64.c new file mode 100644 index 0000000000..4c2d461667 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/fxstat64.c @@ -0,0 +1,28 @@ +/* fxstat64 using 64-bit MIPS fstat system call. + Copyright (C) 1997-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +/* Get information about the file FD in BUF. */ + +int +__fxstat64 (int vers, int fd, struct stat64 *buf) +{ + return __fxstatat64(vers, fd, "", buf, AT_EMPTY_PATH); +} diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/fxstatat.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/fxstatat.c new file mode 100644 index 0000000000..6d94f12bce --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/fxstatat.c @@ -0,0 +1,38 @@ +/* Copyright (C) 2005-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* Ho hum, since fxstatat == fxstatat64 we must get rid of the + prototype or gcc will complain since they don't strictly match. */ + +#include +#include +#include +#include + +/* Get information about the file NAME relative to FD in ST. */ +int +__fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) +{ + if (__builtin_expect (vers != _STAT_VER_LINUX, 0)) + { + __set_errno (EINVAL); + return -1; + } + + return __fstatat(fd, file, st, flag); + +} diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/fxstatat64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/fxstatat64.c new file mode 100644 index 0000000000..b5b0eac92f --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/fxstatat64.c @@ -0,0 +1,34 @@ +/* Copyright (C) 2005-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#include +#include +#include + +/* Get information about the file NAME in BUF. */ + +int +__fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag) +{ + if (__builtin_expect (vers != _STAT_VER_LINUX, 0)) + { + __set_errno (EINVAL); + return -1; + } + + return __fstatat64_time64(fd, file, st, flag); +} diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/lxstat.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/lxstat.c new file mode 100644 index 0000000000..43dd4e76b7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/lxstat.c @@ -0,0 +1,27 @@ +/* lxstat using old-style Unix stat system call. + Copyright (C) 1991-2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +/* Get information about the file NAME in BUF. */ +int +__lxstat (int vers, const char *name, struct stat *buf) +{ + return __fxstatat(vers, AT_FDCWD, name, buf, AT_SYMLINK_NOFOLLOW); +} diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/lxstat64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/lxstat64.c new file mode 100644 index 0000000000..232878a74a --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/lxstat64.c @@ -0,0 +1,27 @@ +/* lxstat64 using 64-bit MIPS lstat system call. + Copyright (C) 1997-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +/* Get information about the file NAME in BUF. */ +int +__lxstat64 (int vers, const char *name, struct stat64 *buf) +{ + return __fxstatat64(vers, AT_FDCWD, name, buf, AT_SYMLINK_NOFOLLOW); +} diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/xstat.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/xstat.c new file mode 100644 index 0000000000..68e62fc3b3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/xstat.c @@ -0,0 +1,27 @@ +/* xstat using old-style Unix stat system call. + Copyright (C) 1991-2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +/* Get information about the file NAME in BUF. */ +int +__xstat (int vers, const char *name, struct stat *buf) +{ + return __fxstatat(vers, AT_FDCWD, name, buf, 0); +} diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/xstat64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/xstat64.c new file mode 100644 index 0000000000..06f9738a65 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/xstat64.c @@ -0,0 +1,28 @@ +/* xstat64 using 64-bit MIPS stat system call. + Copyright (C) 1991-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +/* Get information about the file NAME in BUF. */ + +int +__xstat64 (int vers, const char *name, struct stat64 *buf) +{ + return __fxstatat64(vers, AT_FDCWD, name, buf, 0); +}