diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-vcs/cvs/files/cvs-1.12.12-mktime-x32.patch |
reinit the tree, so we can have metadata
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. */ |