public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jeff Johnston <jjohnstn@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] fix __time_load_locale return code
Date: Wed, 17 May 2023 21:48:12 +0000 (GMT)	[thread overview]
Message-ID: <20230517214812.663673858D1E@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=e7858c0a585e29c48a4109933423a0de362fc62d

commit e7858c0a585e29c48a4109933423a0de362fc62d
Author: Alexey Lapshin <alexey.lapshin@espressif.com>
Date:   Wed May 17 17:44:57 2023 -0400

    fix __time_load_locale return code
    
    - add explicit __HAVE_LOCALE_INFO__ check

Diff:
---
 newlib/libc/locale/timelocal.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/newlib/libc/locale/timelocal.c b/newlib/libc/locale/timelocal.c
index 4b361544a..e3a7fd02d 100644
--- a/newlib/libc/locale/timelocal.c
+++ b/newlib/libc/locale/timelocal.c
@@ -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);
 }

                 reply	other threads:[~2023-05-17 21:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230517214812.663673858D1E@sourceware.org \
    --to=jjohnstn@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).