aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2

Author Topic: CVS 20050824 uses fwprintf  (Read 6874 times)

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
CVS 20050824 uses fwprintf
« on: August 24, 2005, 08:44:38 AM »

In MuleDebug.cpp
Quote
#if wxUSE_UNICODE
        fwprintf(stderr, L"%ls\n", (const wchar_t *)(trace.c_str()) );

At least on NetBSD fwprintf is not implemented resulting in a compile error (wxGTK is OK with it and still compiles with --enable-unicode). I suppose the existence of fwprintf cannot be assumed based on the unicodeness of wx.
Logged

lfroen

  • Guest
Re: CVS 20050824 uses fwprintf
« Reply #1 on: August 24, 2005, 02:04:22 PM »

Quote
WPRINTF(3)                 Linux Programmer's Manual                WPRINTF(3)

NAME
       wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - formatted
       wide character output conversion


CONFORMING TO
       ISO/ANSI C, UNIX98

What more can I say about it without putting rude hat ?
Logged

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
Re: CVS 20050824 uses fwprintf
« Reply #2 on: August 24, 2005, 07:12:59 PM »

"All-platform" means "linux"? I'm sorry for bothering you..
Logged

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: CVS 20050824 uses fwprintf
« Reply #3 on: August 24, 2005, 07:44:22 PM »

I think lfroen misunderstood your post. Can you try using "wxPrintf" instead?
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: CVS 20050824 uses fwprintf
« Reply #4 on: August 24, 2005, 07:49:54 PM »

Ignore those 2. Fixed on current CVS.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: CVS 20050824 uses fwprintf
« Reply #5 on: August 24, 2005, 07:54:08 PM »

On a side note, both lfroen and Nodsu please avoid flamewars. Nodsu was right in the fact that it idn't compile, just not about the reason, he should check better next time. lfroen was right: it is ansi C, but he could have checked *the headers needed*.

And both started a flamewar, both wrong :P

And Xaignar has NFC :P
Logged

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
Re: CVS 20050824 uses fwprintf
« Reply #6 on: August 26, 2005, 08:04:52 AM »

Hmm. OK

This still occurs (CVS 20050826) because configure uses == when testing for wx stuff, resulting in wx CFLAGS not being set. After fixing configure it compiles well.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: CVS 20050824 uses fwprintf
« Reply #7 on: August 26, 2005, 08:07:12 AM »

that's a different story. I'll check it
Logged

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
Re: CVS 20050824 uses fwprintf
« Reply #8 on: August 26, 2005, 08:37:32 AM »

*mutter*
Note to self: always triple-check before posting BS

Fixing the non-POSIX test in configure doesn't help and this still happens:
Quote
if distcc -DHAVE_CONFIG_H -I. -I. -I../../..   -I/usr/local/include -I../.. -I../../../src -I/usr/pkg/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/pkg/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   -DwxUSE_GUI=0    -DEC_REMOTE -DWEBSERVERDIR="\"/usr/local/share/amule/webserver\"" -DUSE_EMBEDDED_CRYPTO -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC   -MT amuleweb-MuleDebug.o -MD -MP -MF ".deps/amuleweb-MuleDebug.Tpo" -c -o amuleweb-MuleDebug.o `test -f '../../../src/MuleDebug.cpp' || echo './'`../../../src/MuleDebug.cpp; \
then mv -f ".deps/amuleweb-MuleDebug.Tpo" ".deps/amuleweb-MuleDebug.Po"; else rm -f ".deps/amuleweb-MuleDebug.Tpo"; exit 1; fi
../../../src/MuleDebug.cpp: In function `void print_backtrace(unsigned int)':
../../../src/MuleDebug.cpp:468: error: `fwprintf' undeclared (first use this function)
../../../src/MuleDebug.cpp:468: error: (Each undeclared identifier is reported only once for each function it appears in.)
distcc[11060] ERROR: compile ../../../src/MuleDebug.cpp on @horse failed
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: CVS 20050824 uses fwprintf
« Reply #9 on: August 26, 2005, 09:07:28 AM »

happens with distcc disabled?
Logged

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
Re: CVS 20050824 uses fwprintf
« Reply #10 on: August 26, 2005, 10:35:34 AM »

Yes, it is the same with plain gcc.
It can't possibly work because there is no fwprintf in NetBSD 2.0
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: CVS 20050824 uses fwprintf
« Reply #11 on: August 26, 2005, 11:42:41 AM »

I really doubt NetBSD 2.0 does not comply ANSI C standards.
Logged

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
Re: CVS 20050824 uses fwprintf
« Reply #12 on: August 26, 2005, 12:10:11 PM »

It's not there. Will be implemented in 3.0.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: CVS 20050824 uses fwprintf
« Reply #13 on: August 26, 2005, 08:50:06 PM »

*sigh*

Ok, that's incredibly sad. How, by god's sake, does an O.S not have ANSI C functions?

And now we want to print a wide char string fo a descriptor. So what?
Logged

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
Re: CVS 20050824 uses fwprintf
« Reply #14 on: August 26, 2005, 10:10:04 PM »

You use fputwc :D
Logged
Pages: [1] 2