From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 5BC761F454 for ; Fri, 8 Nov 2019 20:49:39 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=bNQTBvjQmmdH6PGEtfNL7lC3nVSS0 BFCpzEhJqJxBKIkruxTO3coWQEBEj8p1VOeyrj8D359UA6IxCrE7s73Bykg0l4Qm KKeD4P4E4ZbPQYSW3sKi20dyRhPNrcss+TqkYbxUXx1o2SXvjSwis+9GDTqq48pN a4SkmMdXmHemZw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=+DaK6YrJLB0NIts1MqkQHEqiUVA=; b=J/d F2QHBrH1wZ27K+t2lTIcCCV+DehEMBoDmJAAkX8hpVPgcDbtwccn7Rq7E/PYtva1 MIhQgNVo7yKIyHJRlo4u1Rm7QvoiQfHslcw/prGGxzO7BNxDyEbe6YtdvwmFPkZZ jzHXDYSJ/bWZd+yCePLM1MvdDWWDqb2FzXitjjSk= Received: (qmail 78681 invoked by alias); 8 Nov 2019 20:49:36 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 78673 invoked by uid 89); 8 Nov 2019 20:49:36 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: esa2.mentor.iphmx.com IronPort-SDR: Vgxq3oouIFUJ8V2lKZfF4p/qos7ybAgkiEPi5Yj3hH4cSDeLlm+g4xGzvh/XnfvpFvQPSFiDuu gbmmbi2HVtx2gvnGvh+uPOKfH9GY8Pgl7dPbyE8trHiTSDwIbkLLFwvwXyuRj8s4Tc8SMXLytM VFztmcN/DyRC280v+QMiKok1wCsxZPCOFXvoMOimzLUuJygLdBWfR1eogJBK1WHfoh+VMQkh5s Eu3eHtPWJOcGEiMlWZlle6snpk9Q/PPX3uy5YFkgcAV2C6q9sYuIKf7KFHwRG6JiNXB4enny8w 6+A= IronPort-SDR: 7aIzTD3muxQnxf2uUkDNIExtYk24I/HgzQAmA5wv6GjMCxpu8W50+eemjuUe91m6x5VuoSkouE qoqaOInsPDXOcEN4VKuANFPqkGCks29v47xDdqPiFrt7+3THWNxKkDg0tzCSV7UsqfM4MQ/TyB FkwTd6uw82bQDkHHUfVGBdwldBMrVTexk9CJ2IC197XRkGiPjKogrKsLyBtMAo248FiGbqDbAe eC0UtHYoQMqE4tne7v0Dgu3K0199QDqMZxDhT9Rk14zVikm/R92VrKvtovetFt92WM8gAUQCJ/ C4k= Date: Fri, 8 Nov 2019 20:49:28 +0000 From: Joseph Myers To: Subject: Declare asctime_r, ctime_r, gmtime_r, localtime_r for C2X Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" C2X adds the asctime_r, ctime_r, gmtime_r and localtime_r functions. This patch duly adds __GLIBC_USE (ISOC2X) to the conditions under which declares them. Tested for x86_64. diff --git a/time/time.h b/time/time.h index 7daaacce16..05d9098c13 100644 --- a/time/time.h +++ b/time/time.h @@ -122,7 +122,7 @@ extern struct tm *gmtime (const time_t *__timer) __THROW; of *TIMER in the local timezone. */ extern struct tm *localtime (const time_t *__timer) __THROW; -#ifdef __USE_POSIX +#if defined __USE_POSIX || __GLIBC_USE (ISOC2X) /* Return the `struct tm' representation of *TIMER in UTC, using *TP to store the result. */ extern struct tm *gmtime_r (const time_t *__restrict __timer, @@ -132,7 +132,7 @@ extern struct tm *gmtime_r (const time_t *__restrict __timer, using *TP to store the result. */ extern struct tm *localtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; -#endif /* POSIX */ +#endif /* POSIX || C2X */ /* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ @@ -141,7 +141,7 @@ extern char *asctime (const struct tm *__tp) __THROW; /* Equivalent to `asctime (localtime (timer))'. */ extern char *ctime (const time_t *__timer) __THROW; -#ifdef __USE_POSIX +#if defined __USE_POSIX || __GLIBC_USE (ISOC2X) /* Reentrant versions of the above functions. */ /* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n" @@ -152,7 +152,7 @@ extern char *asctime_r (const struct tm *__restrict __tp, /* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */ extern char *ctime_r (const time_t *__restrict __timer, char *__restrict __buf) __THROW; -#endif /* POSIX */ +#endif /* POSIX || C2X */ /* Defined in localtime.c. */ -- Joseph S. Myers joseph@codesourcery.com