From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2134) id 663673858D1E; Wed, 17 May 2023 21:48:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 663673858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1684360092; bh=+Twpp9G1jmquM6i2CWcvFa6vr+/RfdDSg3Hor6I7XMU=; h=From:To:Subject:Date:From; b=EPegd+hesgjFt6jMS6JG7IGf7VXAPtwx98Z3x7vXGTGwAJRwy1zRGH79FTkzIe8If xIRao2gl2+/vRimJqu1vLMLA7z1qiS+CPyCGyeNxBjxhbffPt5qsK6d+9SwnMYwbyO zJW6Km7L/7mEZhn43q6WZrDlkfPGxmTSr8TJHN08= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jeff Johnston To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] fix __time_load_locale return code X-Act-Checkin: newlib-cygwin X-Git-Author: Alexey Lapshin X-Git-Refname: refs/heads/master X-Git-Oldrev: 9ae9eef21db51e1e26d43a2c1347de5dc50170fd X-Git-Newrev: e7858c0a585e29c48a4109933423a0de362fc62d Message-Id: <20230517214812.663673858D1E@sourceware.org> Date: Wed, 17 May 2023 21:48:12 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3De7858c0a585= e29c48a4109933423a0de362fc62d commit e7858c0a585e29c48a4109933423a0de362fc62d Author: Alexey Lapshin Date: Wed May 17 17:44:57 2023 -0400 fix __time_load_locale return code =20 - 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 =3D 0; struct lc_time_T ti; char *bufp =3D NULL; =20 +#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 ch= ar *name, #else /* TODO */ #endif +#endif /* __HAVE_LOCALE_INFO__ */ return (ret); }