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

Side by Side Diff: src/glsl/strtod.c

Issue 18594002: Don't use strtod_l in Mesa on Android (Closed) Base URL: https://src.chromium.org/chrome/trunk/deps/third_party/mesa/
Patch Set: Created 7 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 | « 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 /* 1 /*
2 * Copyright 2010 VMware, Inc. 2 * Copyright 2010 VMware, Inc.
3 * All Rights Reserved. 3 * All Rights Reserved.
4 * 4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a 5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the 6 * copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including 7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish, 8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sub license, and/or sell copies of the Software, and to 9 * distribute, sub license, and/or sell copies of the Software, and to
10 * permit persons to whom the Software is furnished to do so, subject to 10 * permit persons to whom the Software is furnished to do so, subject to
(...skipping 27 matching lines...) Expand all
38 38
39 39
40 /** 40 /**
41 * Wrapper around strtod which uses the "C" locale so the decimal 41 * Wrapper around strtod which uses the "C" locale so the decimal
42 * point is always '.' 42 * point is always '.'
43 */ 43 */
44 double 44 double
45 glsl_strtod(const char *s, char **end) 45 glsl_strtod(const char *s, char **end)
46 { 46 {
47 #if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \ 47 #if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \
48 !defined(__HAIKU__) && !defined(__UCLIBC__) 48 !defined(__HAIKU__) && !defined(__UCLIBC__) && !defined(ANDROID)
49 static locale_t loc = NULL; 49 static locale_t loc = NULL;
50 if (!loc) { 50 if (!loc) {
51 loc = newlocale(LC_CTYPE_MASK, "C", NULL); 51 loc = newlocale(LC_CTYPE_MASK, "C", NULL);
52 } 52 }
53 return strtod_l(s, end, loc); 53 return strtod_l(s, end, loc);
54 #else 54 #else
55 return strtod(s, end); 55 return strtod(s, end);
56 #endif 56 #endif
57 } 57 }
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