summaryrefslogtreecommitdiffstats
path: root/base/pr_time_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix PR_ImplodeTime for Linux x64.wtc@chromium.org2009-08-121-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following error when building for x64 targets: base/third_party/nspr/prtime.cc: In function 'PRTime PR_ImplodeTime(const PRExplodedTime*)': base/third_party/nspr/prtime.cc:173: error: integer overflow in expression base/third_party/nspr/prtime.cc:176: error: integer overflow in expression PRTime is long long (8 bytes) on ia32, and long (8 bytes) on x64. On ia32, LONG_MAX (4 bytes) converted to microseconds fits in the PRTime type, but on x64 LONG_MAX is 8 bytes and so overflows the PRTime type on conversion. Avoid these issues by only returning INT_MAX. On ia32 this is the correct value, and does not change behaviour. On x64 the call to timegm() will always succeed due to the increased range of time_t, so the error condition of -1 should never be reached. Fix a bug in the conditional expression for 1 second before epoch. Patch by Joel Stanley Original review URL: http://codereview.chromium.org/160511 R=dean,wtc BUG=18231 TEST=new unit test Review URL: http://codereview.chromium.org/164366 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23186 0039d316-1c4b-4281-b951-d872f2087c98
* Remove logging.h from cc files that don't use it.thestig@chromium.org2009-03-121-1/+0
| | | | | | Review URL: http://codereview.chromium.org/42155 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11593 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid a crash in mktime() when Visual C++ 2005 iswtc@chromium.org2009-03-031-3/+32
| | | | | | | | | | used and the input date is in year 3001. R=eroman BUG=4387 Review URL: http://codereview.chromium.org/28340 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10768 0039d316-1c4b-4281-b951-d872f2087c98
* Move Time, TimeDelta and TimeTicks into namespace base.dsh@google.com2008-10-271-0/+2
| | | | | | Review URL: http://codereview.chromium.org/7995 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
* Use gcc 4.2 for the Mac build. Fix up new warnings and errors pointed outmark@chromium.org2008-09-101-2/+1
| | | | | | | | | | by gcc 4.2: warning: 'C' has a field 'C::m_' whose type uses the anonymous namespace warning: missing braces around initializer for 'S' error: extra qualification 'C::' on member 'm' Review URL: http://codereview.chromium.org/1675 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1955 0039d316-1c4b-4281-b951-d872f2087c98
* Move unittests that had a _test filename to _unittest. Update some missing ↵deanm@google.com2008-08-261-0/+240
tests in the SCons build. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1375 0039d316-1c4b-4281-b951-d872f2087c98