diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-vcs/cvs/files/cvs-1.12.12-mktime-x32.patch | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-vcs/cvs/files/cvs-1.12.12-mktime-x32.patch')
-rw-r--r-- | dev-vcs/cvs/files/cvs-1.12.12-mktime-x32.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/dev-vcs/cvs/files/cvs-1.12.12-mktime-x32.patch b/dev-vcs/cvs/files/cvs-1.12.12-mktime-x32.patch new file mode 100644 index 000000000000..948fa4d7144e --- /dev/null +++ b/dev-vcs/cvs/files/cvs-1.12.12-mktime-x32.patch @@ -0,0 +1,29 @@ +back port changes from upstream gnulib to make this work on x32 + +https://bugs.gentoo.org/395641 + +--- cvs-1.12.12/lib/mktime.c ++++ cvs-1.12.12/lib/mktime.c +@@ -115,6 +115,13 @@ + #define TM_YEAR_BASE 1900 + verify (base_year_is_a_multiple_of_100, TM_YEAR_BASE % 100 == 0); + ++#if INT_MAX <= LONG_MAX / 2 ++typedef long int long_int; ++#else ++typedef long long int long_int; ++#endif ++verify (long_int_is_wide_enough, INT_MAX == INT_MAX * (long_int) 2 / 2); ++ + /* Return 1 if YEAR + TM_YEAR_BASE is a leap year. */ + static inline int + leapyear (long int year) +@@ -167,8 +174,6 @@ + int year0, int yday0, int hour0, int min0, int sec0) + { + verify (C99_integer_division, -1 / 2 == 0); +- verify (long_int_year_and_yday_are_wide_enough, +- INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX); + + /* Compute intervening leap days correctly even if year is negative. + Take care to avoid integer overflow here. */ |