aMule Forum

English => Compilation problems => Topic started by: Nodsu on August 24, 2005, 08:44:38 AM

Title: CVS 20050824 uses fwprintf
Post by: Nodsu 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.
Title: Re: CVS 20050824 uses fwprintf
Post by: lfroen 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 ?
Title: Re: CVS 20050824 uses fwprintf
Post by: Nodsu on August 24, 2005, 07:12:59 PM
"All-platform" means "linux"? I'm sorry for bothering you..
Title: Re: CVS 20050824 uses fwprintf
Post by: Xaignar on August 24, 2005, 07:44:22 PM
I think lfroen misunderstood your post. Can you try using "wxPrintf" instead?
Title: Re: CVS 20050824 uses fwprintf
Post by: Kry on August 24, 2005, 07:49:54 PM
Ignore those 2. Fixed on current CVS.
Title: Re: CVS 20050824 uses fwprintf
Post by: Kry 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
Title: Re: CVS 20050824 uses fwprintf
Post by: Nodsu 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.
Title: Re: CVS 20050824 uses fwprintf
Post by: Kry on August 26, 2005, 08:07:12 AM
that's a different story. I'll check it
Title: Re: CVS 20050824 uses fwprintf
Post by: Nodsu 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
Title: Re: CVS 20050824 uses fwprintf
Post by: Kry on August 26, 2005, 09:07:28 AM
happens with distcc disabled?
Title: Re: CVS 20050824 uses fwprintf
Post by: Nodsu 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
Title: Re: CVS 20050824 uses fwprintf
Post by: Kry on August 26, 2005, 11:42:41 AM
I really doubt NetBSD 2.0 does not comply ANSI C standards.
Title: Re: CVS 20050824 uses fwprintf
Post by: Nodsu on August 26, 2005, 12:10:11 PM
It's not there. Will be implemented in 3.0.
Title: Re: CVS 20050824 uses fwprintf
Post by: Kry 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?
Title: Re: CVS 20050824 uses fwprintf
Post by: Nodsu on August 26, 2005, 10:10:04 PM
You use fputwc :D
Title: Re: CVS 20050824 uses fwprintf
Post by: Kry on August 27, 2005, 09:08:49 PM
do you have fputwc?
Title: Re: CVS 20050824 uses fwprintf
Post by: Kry on August 27, 2005, 09:53:42 PM
Bah, whatever, removed.
Title: Re: CVS 20050824 uses fwprintf
Post by: Xaignar on August 27, 2005, 10:05:33 PM
Kry, you have NFC, you forgot to u2c ;)
Title: Re: CVS 20050824 uses fwprintf
Post by: Kry on August 27, 2005, 10:38:20 PM
u2c is just slow :P see the discussion on dev channel.
Title: Re: CVS 20050824 uses fwprintf
Post by: Xaignar on August 27, 2005, 10:48:59 PM
Then it's lucky that we don't plan on crashing frequently :P