OLD | NEW |
1 // Copyright 2011 Google Inc. All Rights Reserved. | 1 // Copyright 2011 Google Inc. All Rights Reserved. |
2 // Author: sesse@google.com (Steinar H. Gunderson) | 2 // Author: sesse@google.com (Steinar H. Gunderson) |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 typedef short int16; | 73 typedef short int16; |
74 typedef unsigned short uint16; | 74 typedef unsigned short uint16; |
75 typedef int int32; | 75 typedef int int32; |
76 typedef unsigned int uint32; | 76 typedef unsigned int uint32; |
77 typedef long long int64; | 77 typedef long long int64; |
78 typedef unsigned long long uint64; | 78 typedef unsigned long long uint64; |
79 #endif | 79 #endif |
80 | 80 |
81 typedef std::string string; | 81 typedef std::string string; |
82 | 82 |
| 83 #ifndef DISALLOW_COPY_AND_ASSIGN |
83 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ | 84 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ |
84 TypeName(const TypeName&); \ | 85 TypeName(const TypeName&); \ |
85 void operator=(const TypeName&) | 86 void operator=(const TypeName&) |
| 87 #endif |
86 | 88 |
87 #if 1 | 89 #if 1 |
88 // Windows does not have an iovec type, yet the concept is universally useful. | 90 // Windows does not have an iovec type, yet the concept is universally useful. |
89 // It is simple to define it ourselves, so we put it inside our own namespace. | 91 // It is simple to define it ourselves, so we put it inside our own namespace. |
90 struct iovec { | 92 struct iovec { |
91 void* iov_base; | 93 void* iov_base; |
92 size_t iov_len; | 94 size_t iov_len; |
93 }; | 95 }; |
94 #endif | 96 #endif |
95 | 97 |
96 // MSVC does not have ssize_t by default; autoconf suggests defining as `int'. | 98 // MSVC does not have ssize_t by default; autoconf suggests defining as `int'. |
97 // Would be in config.h, but Chromium does not use automake/autoconf. | 99 // Would be in config.h, but Chromium does not use automake/autoconf. |
98 #include <Windows.h> | 100 #include <Windows.h> |
99 #include <BaseTsd.h> | 101 #include <BaseTsd.h> |
100 typedef SSIZE_T ssize_t; | 102 typedef SSIZE_T ssize_t; |
101 | 103 |
102 } // namespace snappy | 104 } // namespace snappy |
103 | 105 |
104 #endif // UTIL_SNAPPY_OPENSOURCE_SNAPPY_STUBS_PUBLIC_H_ | 106 #endif // UTIL_SNAPPY_OPENSOURCE_SNAPPY_STUBS_PUBLIC_H_ |
OLD | NEW |