public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dave at hiauly1 dot hia dot nrc dot ca" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/17005] wide character strings don't work on HP-UX 11i using gcc 3.4.1 Date: Sun, 15 Aug 2004 19:53:00 -0000 [thread overview] Message-ID: <20040815195344.20693.qmail@sourceware.org> (raw) In-Reply-To: <20040812163817.17005.jerrydy@sbcglobal.net> ------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca 2004-08-15 19:53 ------- Subject: Re: wide character strings don't work on HP-UX > You mean *result1.data() is a '\0'? Or result1.data() is a null pointer? I believe the former. > Anyway, time_put::do_put basically does this, in "C terms": > > #include <locale.h> > #include <time.h> > #include <wchar.h> > #include <string.h> > #include <assert.h> > > int main() > { > wchar_t __s[64]; > int __maxlen = 64; > wchar_t __format[3] = L"%a"; > struct tm __tm = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; > > wcsftime(__s, __maxlen, __format, &__tm); > > assert(wcscmp(__s, L"Sun") == 0); > } > > Can you debug a bit further? Thanks, Paolo. The wcsftime call isn't working. The return value is 0 indicating that the results in __s are undefined. Changing the third argument to "const char *" works. I think that I have found the problem. # ifdef _INCLUDE__STDC_A1_SOURCE extern size_t wcsftime __((wchar_t *, size_t, const wchar_t *, const struct tm *)); # else /* ! _INCLUDE__STDC_A1_SOURCE */ extern size_t wcsftime __((wchar_t *, size_t, const char *, const struct tm *)); # endif /* _INCLUDE_STDC_A1_SOURCE */ The third argument is different when _INCLUDE__STDC_A1_SOURCE is defined. It would appear that we either need to do something different when _INCLUDE__STDC_A1_SOURCE is defined. We seem have the following in libc.a: Symbols from libc.a[wcsftime.o]: __wcsftime_std | 0|extern|entry |$CODE$ _wcsftime | 252|extern|entry |$CODE$ wcsftime | 252|sdef |entry |$CODE$ __wcsftime_std | |undef |code | Dave -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17005
next prev parent reply other threads:[~2004-08-15 19:53 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-08-12 16:38 [Bug c++/17005] New: " jerrydy at sbcglobal dot net 2004-08-12 17:23 ` [Bug c++/17005] " pcarlini at suse dot de 2004-08-12 17:26 ` [Bug libstdc++/17005] " pcarlini at suse dot de 2004-08-12 17:39 ` jbuck at gcc dot gnu dot org 2004-08-12 17:53 ` jbuck at gcc dot gnu dot org 2004-08-12 18:10 ` pcarlini at suse dot de 2004-08-12 18:29 ` jerrydy at sbcglobal dot net 2004-08-12 18:33 ` jbuck at gcc dot gnu dot org 2004-08-12 20:29 ` jerrydy at sbcglobal dot net 2004-08-12 22:09 ` danglin at gcc dot gnu dot org 2004-08-13 2:11 ` jerrydy at sbcglobal dot net 2004-08-13 4:40 ` danglin at gcc dot gnu dot org 2004-08-14 18:16 ` dave at hiauly1 dot hia dot nrc dot ca 2004-08-14 18:31 ` pcarlini at suse dot de 2004-08-14 19:03 ` cvs-commit at gcc dot gnu dot org 2004-08-14 19:27 ` pinskia at gcc dot gnu dot org 2004-08-14 19:45 ` dave at hiauly1 dot hia dot nrc dot ca 2004-08-15 18:06 ` pcarlini at suse dot de 2004-08-15 19:53 ` dave at hiauly1 dot hia dot nrc dot ca [this message] 2004-08-15 20:06 ` pcarlini at suse dot de 2004-08-15 20:47 ` dave at hiauly1 dot hia dot nrc dot ca 2004-08-15 22:29 ` dave at hiauly1 dot hia dot nrc dot ca 2004-08-21 10:26 ` pcarlini at suse dot de 2004-08-22 17:35 ` pcarlini at suse dot de 2004-08-22 19:31 ` dave at hiauly1 dot hia dot nrc dot ca 2004-08-25 17:50 ` cvs-commit at gcc dot gnu dot org 2004-08-25 18:08 ` pinskia at gcc dot gnu dot org 2005-01-31 16:39 ` pcarlini at suse dot de 2005-02-02 13:26 ` hundertmarck at boehme-weihs dot de 2005-02-02 13:30 ` pcarlini at suse dot de 2005-02-02 15:28 ` dave at hiauly1 dot hia dot nrc dot ca 2005-02-08 19:58 ` hundertmarck at boehme-weihs dot de 2005-03-01 10:43 ` hundertmarck at boehme-weihs dot de 2005-03-01 11:01 ` pcarlini at suse dot de 2005-03-01 11:12 ` hundertmarck at boehme-weihs dot de 2005-03-01 15:06 ` dave at hiauly1 dot hia dot nrc dot ca
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=20040815195344.20693.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.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: linkBe 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).