Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: base/sys_byteorder.h

Issue 9959002: Update base/sys_byteorder.h comment, missed in previous CL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This is a convenience header to pull in the platform-specific 5 // This header defines cross-platform ByteSwap() implementations for 16, 32 and
6 // headers that define functions for byte-order conversion, 6 // 64-bit values, and NetToHostXX() / HostToNextXX() functions equivalent to
7 // particularly: ntohs(), htons(), ntohl(), htonl(). Prefer including 7 // the traditional ntohX() and htonX() functions.
8 // this file instead of directly writing the #if / #else, since it 8 // Use the functions defined here rather than using the platform-specific
9 // avoids duplicating the platform-specific selections. 9 // functions directly.
10 // This header also provides ntohll() and htonll() for byte-order conversion
11 // for 64-bit integers.
12 10
13 #ifndef BASE_SYS_BYTEORDER_H_ 11 #ifndef BASE_SYS_BYTEORDER_H_
14 #define BASE_SYS_BYTEORDER_H_ 12 #define BASE_SYS_BYTEORDER_H_
15 13
16 #include "base/basictypes.h" 14 #include "base/basictypes.h"
17 #include "build/build_config.h" 15 #include "build/build_config.h"
18 16
19 #if defined(OS_WIN) 17 #if defined(OS_WIN)
20 #include <winsock2.h> 18 #include <winsock2.h>
21 #else 19 #else
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 return ByteSwap(x); 114 return ByteSwap(x);
117 #else 115 #else
118 return x; 116 return x;
119 #endif 117 #endif
120 } 118 }
121 119
122 } // namespace base 120 } // namespace base
123 121
124 122
125 #endif // BASE_SYS_BYTEORDER_H_ 123 #endif // BASE_SYS_BYTEORDER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698