struct-tm.patch: declare functions in case of redefine_extname

This commit is contained in:
Igor Pashev 2015-03-30 23:36:44 +03:00
parent a56f36d1c0
commit c02deafc59
2 changed files with 9 additions and 5 deletions

View File

@ -1,6 +1,8 @@
libc (4.3+15) UNRELEASED; urgency=medium
* XOPEM_SOURCE=600 by default
* Updated debian/patches/struct-tm.patch: declare functions in case of
redefine_extname
-- Igor Pashev <pashev.igor@gmail.com> Mon, 30 Mar 2015 21:32:44 +0300

View File

@ -41,19 +41,21 @@ Index: libc/usr/src/head/time.h
#include <iso/time_iso.h>
#if (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
(_POSIX_C_SOURCE > 2) || defined(__EXTENSIONS__)
@@ -80,10 +80,17 @@ typedef int timer_t;
@@ -80,10 +80,21 @@ typedef int timer_t;
#if defined(__EXTENSIONS__) || \
(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
(_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT)
-extern struct tm *gmtime_r(const time_t *_RESTRICT_KYWD,
+extern struct tm *__gnu_gmtime_r(const time_t *_RESTRICT_KYWD,
struct tm *_RESTRICT_KYWD);
-extern struct tm *localtime_r(const time_t *_RESTRICT_KYWD,
+ struct tm *_RESTRICT_KYWD);
+extern struct tm *__gnu_localtime_r(const time_t *_RESTRICT_KYWD,
struct tm *_RESTRICT_KYWD);
+ struct tm *_RESTRICT_KYWD);
+#ifdef __PRAGMA_REDEFINE_EXTNAME
+#pragma redefine_extname gmtime_r __gnu_gmtime_r
+#pragma redefine_extname localtime_r __gnu_localtime_r
extern struct tm *gmtime_r(const time_t *_RESTRICT_KYWD,
struct tm *_RESTRICT_KYWD);
extern struct tm *localtime_r(const time_t *_RESTRICT_KYWD,
struct tm *_RESTRICT_KYWD);
+#else /* __PRAGMA_REDEFINE_EXTNAME */
+#define gmtime_r __gnu_gmtime_r
+#define localtime_r __gnu_localtime_r