]> sourceware.org Git - newlib-cygwin.git/commitdiff
fix __time_load_locale return code
authorAlexey Lapshin <alexey.lapshin@espressif.com>
Wed, 17 May 2023 21:44:57 +0000 (17:44 -0400)
committerJeff Johnston <jjohnstn@redhat.com>
Wed, 17 May 2023 21:47:54 +0000 (17:47 -0400)
- add explicit __HAVE_LOCALE_INFO__ check

newlib/libc/locale/timelocal.c

index 4b361544ac940395482022bb8f1467504e9a23e3..e3a7fd02d7456056d6586cd7ffccd0d90ab0226c 100644 (file)
@@ -147,10 +147,11 @@ int
 __time_load_locale (struct __locale_t *locale, const char *name,
                    void *f_wctomb, const char *charset)
 {
-  int  ret;
+  int  ret = 0;
   struct lc_time_T ti;
   char *bufp = NULL;
 
+#ifdef __HAVE_LOCALE_INFO__
 #ifdef __CYGWIN__
   extern int __set_lc_time_from_win (const char *, const struct lc_time_T *,
                                     struct lc_time_T *, char **, void *,
@@ -186,5 +187,6 @@ __time_load_locale (struct __locale_t *locale, const char *name,
 #else
   /* TODO */
 #endif
+#endif /* __HAVE_LOCALE_INFO__ */
   return (ret);
 }
This page took 0.036013 seconds and 5 git commands to generate.