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

Side by Side Diff: base/string_util_posix.h

Issue 8544003: disable GetAppOutputRestrictedSIGPIPE and enable ::vswprintf on OpenBSD (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « base/process_util_unittest.cc ('k') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef BASE_STRING_UTIL_POSIX_H_ 5 #ifndef BASE_STRING_UTIL_POSIX_H_
6 #define BASE_STRING_UTIL_POSIX_H_ 6 #define BASE_STRING_UTIL_POSIX_H_
7 #pragma once 7 #pragma once
8 8
9 #include <stdarg.h> 9 #include <stdarg.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 27 matching lines...) Expand all
38 inline int strncmp16(const char16* s1, const char16* s2, size_t count) { 38 inline int strncmp16(const char16* s1, const char16* s2, size_t count) {
39 #if defined(WCHAR_T_IS_UTF16) 39 #if defined(WCHAR_T_IS_UTF16)
40 return ::wcsncmp(s1, s2, count); 40 return ::wcsncmp(s1, s2, count);
41 #elif defined(WCHAR_T_IS_UTF32) 41 #elif defined(WCHAR_T_IS_UTF32)
42 return c16memcmp(s1, s2, count); 42 return c16memcmp(s1, s2, count);
43 #endif 43 #endif
44 } 44 }
45 45
46 inline int vswprintf(wchar_t* buffer, size_t size, 46 inline int vswprintf(wchar_t* buffer, size_t size,
47 const wchar_t* format, va_list arguments) { 47 const wchar_t* format, va_list arguments) {
48 #if defined(OS_OPENBSD)
49 // TODO(phajdan.jr): There is a patch to add vswprintf to OpenBSD,
50 // http://marc.info/?l=openbsd-tech&m=130003157729839&w=2
51 NOTIMPLEMENTED();
52 return -1;
53 #else
54 DCHECK(IsWprintfFormatPortable(format)); 48 DCHECK(IsWprintfFormatPortable(format));
55 return ::vswprintf(buffer, size, format, arguments); 49 return ::vswprintf(buffer, size, format, arguments);
56 #endif
57 } 50 }
58 51
59 } // namespace base 52 } // namespace base
60 53
61 #endif // BASE_STRING_UTIL_POSIX_H_ 54 #endif // BASE_STRING_UTIL_POSIX_H_
OLDNEW
« no previous file with comments | « base/process_util_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698