[tz] [PROPOSED] Avoid zic problems with errno == EOVERFLOW
Paul Eggert
eggert at cs.ucla.edu
Mon Jun 26 23:08:38 UTC 2017
Although this patch does not fix any bugs, it makes zic’s ‘stat’
calls less likely to fail unnecessarily with errno == EOVERFLOW,
and this should be a bit faster in some cases.
Problem reported by Nick Alcock in:
https://sourceware.org/ml/libc-alpha/2017-06/msg01264.html
* private.h (_FILE_OFFSET_BITS, _LARGE_FILES)
(_DARWIN_USE_64_BIT_INODE): New macros.
---
private.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/private.h b/private.h
index f5e39b5..2e8415e 100644
--- a/private.h
+++ b/private.h
@@ -102,6 +102,16 @@
/* Enable strtoimax on pre-C99 Solaris 11. */
#define __EXTENSIONS__ 1
+/* To avoid having 'stat' fail unnecessarily with errno == EOVERFLOW,
+ enable large files on GNUish systems ... */
+#ifndef _FILE_OFFSET_BITS
+# define _FILE_OFFSET_BITS 64
+#endif
+/* ... and on AIX ... */
+#define _LARGE_FILES 1
+/* ... and enable large inode numbers on Mac OS X 10.5 and later. */
+#define _DARWIN_USE_64_BIT_INODE 1
+
/*
** Nested includes
*/
--
2.9.4
More information about the tz
mailing list