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

Side by Side Diff: source/common/putilimp.h

Issue 1237873002: Fix a compilation with non-clang/non-gcc compilers (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: update the patch, too Created 5 years, 5 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
« no previous file with comments | « patches/mutex.patch ('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 /* 1 /*
2 ****************************************************************************** 2 ******************************************************************************
3 * 3 *
4 * Copyright (C) 1997-2015, International Business Machines 4 * Copyright (C) 1997-2015, International Business Machines
5 * Corporation and others. All Rights Reserved. 5 * Corporation and others. All Rights Reserved.
6 * 6 *
7 ****************************************************************************** 7 ******************************************************************************
8 * 8 *
9 * FILE NAME : putilimp.h 9 * FILE NAME : putilimp.h
10 * 10 *
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 #endif 229 #endif
230 230
231 231
232 /** 232 /**
233 * \def U_HAVE_CLANG_ATOMICS 233 * \def U_HAVE_CLANG_ATOMICS
234 * Defines whether Clang c11 style built-in atomics are avaialable. 234 * Defines whether Clang c11 style built-in atomics are avaialable.
235 * These are used in preference to gcc atomics when both are available. 235 * These are used in preference to gcc atomics when both are available.
236 */ 236 */
237 #ifdef U_HAVE_CLANG_ATOMICS 237 #ifdef U_HAVE_CLANG_ATOMICS
238 /* Use the predefined value. */ 238 /* Use the predefined value. */
239 #elif defined(__clang__) && \ 239 #elif !defined(__clang__)
240 __has_builtin(__c11_atomic_load) && \ 240 # define U_HAVE_CLANG_ATOMICS 0
241 __has_builtin(__c11_atomic_store) && \ 241 #else
242 __has_builtin(__c11_atomic_fetch_add) && \ 242 #if __has_builtin(__c11_atomic_load) && \
243 __has_builtin(__c11_atomic_fetch_sub) 243 __has_builtin(__c11_atomic_store) && \
244 __has_builtin(__c11_atomic_fetch_add) && \
245 __has_builtin(__c11_atomic_fetch_sub)
244 # define U_HAVE_CLANG_ATOMICS 1 246 # define U_HAVE_CLANG_ATOMICS 1
245 #else 247 #else
246 # define U_HAVE_CLANG_ATOMICS 0 248 # define U_HAVE_CLANG_ATOMICS 0
247 #endif 249 #endif
250 #endif
248 251
249 /*===========================================================================*/ 252 /*===========================================================================*/
250 /** @{ Code alignment */ 253 /** @{ Code alignment */
251 /*===========================================================================*/ 254 /*===========================================================================*/
252 255
253 /** 256 /**
254 * \def U_ALIGN_CODE 257 * \def U_ALIGN_CODE
255 * This is used to align code fragments to a specific byte boundary. 258 * This is used to align code fragments to a specific byte boundary.
256 * This is useful for getting consistent performance test results. 259 * This is useful for getting consistent performance test results.
257 * @internal 260 * @internal
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 /* also _C_TS_calloc(x) */ 628 /* also _C_TS_calloc(x) */
626 #else 629 #else
627 /* C defaults */ 630 /* C defaults */
628 # define uprv_default_malloc(x) malloc(x) 631 # define uprv_default_malloc(x) malloc(x)
629 # define uprv_default_realloc(x,y) realloc(x,y) 632 # define uprv_default_realloc(x,y) realloc(x,y)
630 # define uprv_default_free(x) free(x) 633 # define uprv_default_free(x) free(x)
631 #endif 634 #endif
632 635
633 636
634 #endif 637 #endif
OLDNEW
« no previous file with comments | « patches/mutex.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698