OLD | NEW |
1 /** | 1 /** |
2 * \file imports.c | 2 * \file imports.c |
3 * Standard C library function wrappers. | 3 * Standard C library function wrappers. |
4 * | 4 * |
5 * Imports are services which the device driver or window system or | 5 * Imports are services which the device driver or window system or |
6 * operating system provides to the core renderer. The core renderer (Mesa) | 6 * operating system provides to the core renderer. The core renderer (Mesa) |
7 * will call these functions in order to do memory allocation, simple I/O, | 7 * will call these functions in order to do memory allocation, simple I/O, |
8 * etc. | 8 * etc. |
9 * | 9 * |
10 * Some drivers will want to override/replace this file with something | 10 * Some drivers will want to override/replace this file with something |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 } | 749 } |
750 else { | 750 else { |
751 return NULL; | 751 return NULL; |
752 } | 752 } |
753 } | 753 } |
754 | 754 |
755 /** Wrapper around strtof() */ | 755 /** Wrapper around strtof() */ |
756 float | 756 float |
757 _mesa_strtof( const char *s, char **end ) | 757 _mesa_strtof( const char *s, char **end ) |
758 { | 758 { |
759 #if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) | 759 #if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \ |
| 760 !defined(ANDROID) |
760 static locale_t loc = NULL; | 761 static locale_t loc = NULL; |
761 if (!loc) { | 762 if (!loc) { |
762 loc = newlocale(LC_CTYPE_MASK, "C", NULL); | 763 loc = newlocale(LC_CTYPE_MASK, "C", NULL); |
763 } | 764 } |
764 return strtof_l(s, end, loc); | 765 return strtof_l(s, end, loc); |
765 #elif defined(_ISOC99_SOURCE) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600
) | 766 #elif defined(_ISOC99_SOURCE) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600
) |
766 return strtof(s, end); | 767 return strtof(s, end); |
767 #else | 768 #else |
768 return (float)strtod(s, end); | 769 return (float)strtod(s, end); |
769 #endif | 770 #endif |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 va_start(args, fmtString); | 1023 va_start(args, fmtString); |
1023 vsnprintf(s, MAXSTRING, fmtString, args); | 1024 vsnprintf(s, MAXSTRING, fmtString, args); |
1024 va_end(args); | 1025 va_end(args); |
1025 output_if_debug("Mesa", s, GL_FALSE); | 1026 output_if_debug("Mesa", s, GL_FALSE); |
1026 #endif /* DEBUG */ | 1027 #endif /* DEBUG */ |
1027 (void) ctx; | 1028 (void) ctx; |
1028 (void) fmtString; | 1029 (void) fmtString; |
1029 } | 1030 } |
1030 | 1031 |
1031 /*@}*/ | 1032 /*@}*/ |
OLD | NEW |