summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2018-11-30 15:30:01 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2018-11-30 15:30:01 +0100
commitddd263875896c11b7d0875c7357a3322243290d9 (patch)
tree0e7d833198199c848ef35559894331c37ad6130c /src/lib/eina
parent27430928acaec8fd74a7ff67920ca0383f868502 (diff)
Revert "eina: add locale-independent eina_convert_strtod_c function"
This reverts commit bef1c5cc433b89add2cf0292e1098e1bd74ac640. The commit breaks the build on macos. I gave it soem time to get fixed up quickly, but its late Friday night in Korea now and this is unlikely to get fixed until Monday. Revert here until fixed. ./src/lib/eina/eina_private.h:158:1: error: unknown type name 'locale_t' https://travis-ci.org/Enlightenment/efl/jobs/461790674
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_convert.c10
-rw-r--r--src/lib/eina/eina_convert.h16
-rw-r--r--src/lib/eina/eina_main.c19
-rw-r--r--src/lib/eina/eina_private.h6
4 files changed, 0 insertions, 51 deletions
diff --git a/src/lib/eina/eina_convert.c b/src/lib/eina/eina_convert.c
index 152ef5be4a..2943b37343 100644
--- a/src/lib/eina/eina_convert.c
+++ b/src/lib/eina/eina_convert.c
@@ -453,16 +453,6 @@ eina_convert_atofp(const char *src, int length, Eina_F32p32 *fp)
453 return EINA_TRUE; 453 return EINA_TRUE;
454} 454}
455 455
456EAPI double
457eina_convert_strtod_c(const char *nptr, char **endptr)
458{
459#ifdef _WIN32
460 return _strtod_l(nptr, endptr, _eina_c_locale_get());
461#else
462 return strtod_l(nptr, endptr, _eina_c_locale_get());
463#endif
464}
465
466/** 456/**
467 * @} 457 * @}
468 */ 458 */
diff --git a/src/lib/eina/eina_convert.h b/src/lib/eina/eina_convert.h
index 337cd88ad8..026fc6c8f6 100644
--- a/src/lib/eina/eina_convert.h
+++ b/src/lib/eina/eina_convert.h
@@ -334,22 +334,6 @@ EAPI Eina_Bool eina_convert_atofp(const char *src,
334 Eina_F32p32 *fp) EINA_ARG_NONNULL(1, 3); 334 Eina_F32p32 *fp) EINA_ARG_NONNULL(1, 3);
335 335
336/** 336/**
337 * @brief Converts a string to a floating point number.
338 *
339 * @param[in] nptr a string to convert. It shouldn't be NULL.
340 * @param[out] endptr If endptr is not NULL, a pointer to the character after the last
341 * character used in the conversion is stored in the location referenced
342 * by endptr.
343 * @return a double type floating point number.
344 *
345 * This function returns converted floating point number with locale-independency.
346 * Actually, it use "C" locale for strtod_l function internally. If you need strtod
347 * without locale-dependency, this function can replace strtod.
348 * For more information, please refer documents of strtod, strtod_l.
349 */
350EAPI double eina_convert_strtod_c(const char *nptr, char **endptr);
351
352/**
353 * @} 337 * @}
354 */ 338 */
355 339
diff --git a/src/lib/eina/eina_main.c b/src/lib/eina/eina_main.c
index 535e4e7611..024d1e3eaa 100644
--- a/src/lib/eina/eina_main.c
+++ b/src/lib/eina/eina_main.c
@@ -85,7 +85,6 @@ static int _eina_main_count = 0;
85static int _eina_main_thread_count = 0; 85static int _eina_main_thread_count = 0;
86#endif 86#endif
87static int _eina_log_dom = -1; 87static int _eina_log_dom = -1;
88static locale_t _eina_c_locale;
89 88
90#ifdef ERR 89#ifdef ERR
91#undef ERR 90#undef ERR
@@ -286,12 +285,6 @@ eina_init(void)
286 if (EINA_LIKELY(_eina_main_count > 0)) 285 if (EINA_LIKELY(_eina_main_count > 0))
287 return ++_eina_main_count; 286 return ++_eina_main_count;
288 287
289#ifdef _WIN32
290 _eina_c_locale = _create_locale(LC_ALL, "C");
291#else
292 _eina_c_locale = newlocale(LC_ALL_MASK, "C", NULL);
293#endif
294
295 srand(time(NULL)); 288 srand(time(NULL));
296 while (eina_seed == 0) 289 while (eina_seed == 0)
297 eina_seed = rand(); 290 eina_seed = rand();
@@ -355,12 +348,6 @@ eina_init(void)
355 return 1; 348 return 1;
356} 349}
357 350
358locale_t
359_eina_c_locale_get(void)
360{
361 return _eina_c_locale;
362}
363
364EAPI int 351EAPI int
365eina_shutdown(void) 352eina_shutdown(void)
366{ 353{
@@ -372,12 +359,6 @@ eina_shutdown(void)
372 _eina_main_count--; 359 _eina_main_count--;
373 if (EINA_UNLIKELY(_eina_main_count == 0)) 360 if (EINA_UNLIKELY(_eina_main_count == 0))
374 { 361 {
375#ifdef _WIN32
376 _free_locale(_eina_c_locale);
377#else
378 freelocale(_eina_c_locale);
379#endif
380
381 eina_log_timing(_eina_log_dom, 362 eina_log_timing(_eina_log_dom,
382 EINA_LOG_STATE_START, 363 EINA_LOG_STATE_START,
383 EINA_LOG_STATE_SHUTDOWN); 364 EINA_LOG_STATE_SHUTDOWN);
diff --git a/src/lib/eina/eina_private.h b/src/lib/eina/eina_private.h
index be826e0fb0..eab59586c1 100644
--- a/src/lib/eina/eina_private.h
+++ b/src/lib/eina/eina_private.h
@@ -20,7 +20,6 @@
20#define EINA_PRIVATE_H_ 20#define EINA_PRIVATE_H_
21 21
22#include <stdarg.h> 22#include <stdarg.h>
23#include <locale.h>
24 23
25#ifdef _WIN32 24#ifdef _WIN32
26# include <Evil.h> 25# include <Evil.h>
@@ -152,11 +151,6 @@ Eina_Stringshare *eina_file_sanitize(const char *path);
152 151
153void eina_freeq_main_set(Eina_FreeQ *fq); 152void eina_freeq_main_set(Eina_FreeQ *fq);
154 153
155#ifdef _WIN32
156typedef _locale_t locale_t;
157#endif
158locale_t _eina_c_locale_get(void);
159
160#include "eina_inline_private.h" 154#include "eina_inline_private.h"
161 155
162#endif /* EINA_PRIVATE_H_ */ 156#endif /* EINA_PRIVATE_H_ */