summaryrefslogtreecommitdiffstats
path: root/base/format_macros.h
Commit message (Collapse)AuthorAgeFilesLines
* Define print format macros for NSInteger & NSUIntegersdefresne@chromium.org2014-03-101-0/+28
| | | | | | | | | | | | | | | | | The size of NSInteger and NSUInteger varies between 32-bit and 64-bit architectures, however does not provides macro to safely format them and instead recommend casting the value to the larger version that is used on 64-bit architecture. Using a cast could cause some formatting to be missed (if the type of a variable changes), so instead we define our own macros to format those types safely. BUG=349458 Review URL: https://codereview.chromium.org/192443003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256019 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 255755 "Define print format macros for NSInteger & NSUInt..."rbyers@chromium.org2014-03-081-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Reason for revert: caused unit test failures on Mac ASAN bots, eg: http://build.chromium.org/p/chromium.memory/builders/Mac%20ASan%2064%20Tests%20%281%29/builds/69/steps/base_unittests/logs/FormatNSInteger > Define print format macros for NSInteger & NSUInteger > > The size of NSInteger and NSUInteger varies between 32-bit and 64-bit > architectures, however does not provides macro to safely format them > and instead recommend casting the value to the larger version that is > used on 64-bit architecture. > > Using a cast could cause some formatting to be missed (if the type of > a variable changes), so instead we define our own macros to format those > types safely. > > BUG=349458 > > Review URL: https://codereview.chromium.org/187793003 TBR=sdefresne@chromium.org Review URL: https://codereview.chromium.org/192023002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255781 0039d316-1c4b-4281-b951-d872f2087c98
* Define print format macros for NSInteger & NSUIntegersdefresne@chromium.org2014-03-081-0/+28
| | | | | | | | | | | | | | | | | The size of NSInteger and NSUInteger varies between 32-bit and 64-bit architectures, however does not provides macro to safely format them and instead recommend casting the value to the larger version that is used on 64-bit architecture. Using a cast could cause some formatting to be missed (if the type of a variable changes), so instead we define our own macros to format those types safely. BUG=349458 Review URL: https://codereview.chromium.org/187793003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255755 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Fix style guide errors in commentsdpolukhin@chromium.org2010-09-161-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3402004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59622 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent macro redefinitiongregoryd@google.com2010-02-251-0/+4
| | | | | | Review URL: http://codereview.chromium.org/657016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40028 0039d316-1c4b-4281-b951-d872f2087c98
* Add compiler-specific "examine printf format" attributes to printfs.evan@chromium.org2009-11-201-2/+13
| | | | | | | | | | | | Functions that take a printf-style format get a new annotation, which produces a bunch of compiler warnings when you use printf impoperly. This change adds the annotations and fixes the warnings. We now must use PRId64 for 64-bit numbers and the PRIsz for size_t. Review URL: http://codereview.chromium.org/339059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32600 0039d316-1c4b-4281-b951-d872f2087c98
* First step towards NaCl-Chrome integration:1. NaCl plugin becomes a built-in ↵gregoryd@google.com2009-09-291-0/+8
| | | | | | | | | | | plugin in Chrome and runs in the renderer process.2. Most of the changes are related to launching the NaCl process (that loads and runs the NaCl module) and establishing the initial communication between that process and the NaCl plugin.3. Command line flag "--internal-nacl" is required to enable the built-in NaCl plugin. NaCl still cannot run in Chrome sandbox, the flag automatically disables the sandboxCommitted: http://src.chromium.org/viewvc/chrome?view=rev&revision=27315 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=27324 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=27397 Review URL: http://codereview.chromium.org/153002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27445 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 27397 - First step towards NaClChrome integration:1. NaCl plugin ↵gregoryd@google.com2009-09-281-8/+0
| | | | | | | | | | | | | becomes a builtin plugin in Chrome and runs in the renderer process.2. Most of the changes are related to launching the NaCl process (that loads and runs the NaCl module) and establishing the initial communication between that process and the NaCl plugin.3. Command line flag "internalnacl" is required to enable the builtin NaCl plugin. NaCl still cannot run in Chrome sandbox, the flag automatically disables the sandboxCommitted: http://src.chromium.org/viewvc/chrome?view=rev&revision=27315 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=27324 Review URL: http://codereview.chromium.org/153002 TBR=gregoryd@google.com Review URL: http://codereview.chromium.org/235042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27400 0039d316-1c4b-4281-b951-d872f2087c98
* First step towards NaCl-Chrome integration:1. NaCl plugin becomes a built-in ↵gregoryd@google.com2009-09-281-0/+8
| | | | | | | | | plugin in Chrome and runs in the renderer process.2. Most of the changes are related to launching the NaCl process (that loads and runs the NaCl module) and establishing the initial communication between that process and the NaCl plugin.3. Command line flag "--internal-nacl" is required to enable the built-in NaCl plugin. NaCl still cannot run in Chrome sandbox, the flag automatically disables the sandboxCommitted: http://src.chromium.org/viewvc/chrome?view=rev&revision=27315 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=27324 Review URL: http://codereview.chromium.org/153002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27397 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 27324 - First step towards NaClChrome integration:1. NaCl plugin ↵gregoryd@google.com2009-09-261-8/+0
| | | | | | | | | | | | becomes a builtin plugin in Chrome and runs in the renderer process.2. Most of the changes are related to launching the NaCl process (that loads and runs the NaCl module) and establishing the initial communication between that process and the NaCl plugin.3. Command line flag "internalnacl" is required to enable the builtin NaCl plugin. NaCl still cannot run in Chrome sandbox, the flag automatically disables the sandboxCommitted: http://src.chromium.org/viewvc/chrome?view=rev&revision=27315 Review URL: http://codereview.chromium.org/153002 TBR=bradnelson@google.com Review URL: http://codereview.chromium.org/244017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27326 0039d316-1c4b-4281-b951-d872f2087c98
* First step towards NaCl-Chrome integration:1. NaCl plugin becomes a built-in ↵gregoryd@google.com2009-09-261-0/+8
| | | | | | | | plugin in Chrome and runs in the renderer process.2. Most of the changes are related to launching the NaCl process (that loads and runs the NaCl module) and establishing the initial communication between that process and the NaCl plugin.3. Command line flag "--internal-nacl" is required to enable the built-in NaCl plugin. NaCl still cannot run in Chrome sandbox, the flag automatically disables the sandboxCommitted: http://src.chromium.org/viewvc/chrome?view=rev&revision=27315 Review URL: http://codereview.chromium.org/153002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27324 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 27315 - First step towards NaClChrome integration:1. NaCl plugin ↵gregoryd@google.com2009-09-261-8/+0
| | | | | | | | | | | | becomes a builtin plugin in Chrome and runs in the renderer process.2. Most of the changes are related to launching the NaCl process (that loads and runs the NaCl module) and establishing the initial communication between that process and the NaCl plugin.3. Command line flag "internalnacl" is required to enable the builtin NaCl plugin. NaCl still cannot run in Chrome sandbox, the flag automatically disables the sandbox Review URL: http://codereview.chromium.org/153002 TBR=gregoryd@google.com Review URL: http://codereview.chromium.org/244014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27317 0039d316-1c4b-4281-b951-d872f2087c98
* First step towards NaCl-Chrome integration:1. NaCl plugin becomes a built-in ↵gregoryd@google.com2009-09-261-0/+8
| | | | | | | | plugin in Chrome and runs in the renderer process.2. Most of the changes are related to launching the NaCl process (that loads and runs the NaCl module) and establishing the initial communication between that process and the NaCl plugin.3. Command line flag "--internal-nacl" is required to enable the built-in NaCl plugin. NaCl still cannot run in Chrome sandbox, the flag automatically disables the sandbox Review URL: http://codereview.chromium.org/153002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27315 0039d316-1c4b-4281-b951-d872f2087c98
* Preparing rollback in case things don't work out.bradnelson@google.com2009-09-181-8/+0
| | | | | | | | | | | This rolls back 26540, gregoryd's attempt at a nacl landing. BUG=None TEST=None Review URL: http://codereview.chromium.org/213019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26543 0039d316-1c4b-4281-b951-d872f2087c98
* This is a copy of http://codereview.chromium.org/153002/showgregoryd@google.com2009-09-181-0/+8
| | | | | | | | | | First step towards NaCl-Chrome integration:1. NaCl plugin becomes a built-in plugin in Chrome and runs in the renderer process.2. Most of the changes are related to launching the NaCl process (that loads and runs the NaCl module) and establishing the initial communication between that process and the NaCl plugin.3. This CL relies on another CL that contains the changes on the Native Client side: http://codereview.chromium.org/1501904. Command line flag "--internal-nacl" is required to enable the built-in NaCl plugin.5. NaCl still cannot run in Chrome sandbox, so the "--no-sandbox" flag is also required TBR=bradnelson Review URL: http://codereview.chromium.org/207025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26540 0039d316-1c4b-4281-b951-d872f2087c98
* Use C99 standard format macros for 64-bit values.agl@chromium.org2009-06-291-0/+50
Currently we have several uses of %I64d in format strings to indicate a 64-bit value. This does not work on Mac or Linux, where 'I' indicates the use of locale specific digits. Instead, we introduce base/format_macros.h which mimic the C99 standard macros for 64-bit values in a cross-platform manner. Dean pointed out that V8 is handling this themselves rather than use inttypes.h. Maybe we'll end up going down the same path but, for the moment, we'll try and do it the 'correct' way and see how it works out. http://codereview.chromium.org/147154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19500 0039d316-1c4b-4281-b951-d872f2087c98