[Lucas Nussbaum]
> In file included from
> /build/user-squeak-vm_3.10.3+svn1902.dfsg-1-amd64-zLK_K2/squeak-vm-3.10.3+svn1902.dfsg/platforms/unix/vm/debug.c:3:
> /usr/include/stdio.h:397:66: error: macro "dprintf" passed 3 arguments, but
> takes just 1
I came across this RC bug and investigated a bit, and the problem seem
to be that stdio.h have started to provide a dprintf function, which
conflicts with the dprintf macro defined in debug.h. This is the
start of debug.c:
#include "debug.h"
#include <stdio.h>
#include <stdarg.h>
[...]
And this is the start of debug.h:
#ifndef __sq_debug_h
#define __sq_debug_h
#ifndef DEBUG
# define DEBUG 0
#endif
#if (DEBUG)
/* the thing to use here is a variadic macro, but Apple's gcc barfs on
** them when running in precomp mode. did they _really_ have to break
** the preprocessor just to implement precomp? good _grief_.
*/
extern void __sq_dprintf(const char *fmt, ...);
# define dprintf(ARGS) __sq_dprintf ARGS
#else
# define dprintf(ARGS) ((void)0)
#endif
One workaround would be to build without debugging. Another would be
to rename dprintf() to something else. A third would be to build the
source without the __USE_GNU define to avoid the dprintf() function in
stdio.h to be visible.
No idea which approach is best. I suspect this should be discussed
with upstream.
Happy hacking,
--
Petter Reinholdtsen
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]