[kaffe] Kaffe CVS: kaffe dalibor
tullmann at cs.utah.edu
Fri Dec 6 08:43:31 PST 2002
It seems like just getting configure to test for swab correctly will
solve this problem (unless I'm missing something), without having to
resort to naming platforms in config-mem.h.
On FreeBSD (and other sane systems), where swab() is prototyped in a
header file, config-mem.h should not be providing the prototype. On
Linux (or wherever else swab is mistakenly unprototyped) config-mem.h
should provide a prototype (though, perhaps it should provide an
If we're getting duplicate prototypes, the configure test is broken
(its not finding something that a regular compile is finding).
I'm thinking something like this:
RCS file: /cvs/kaffe/kaffe/configure.in,v
retrieving revision 1.170
diff -u -b -u -r1.170 configure.in
--- configure.in 27 Nov 2002 18:32:54 -0000 1.170
+++ configure.in 6 Dec 2002 16:23:30 -0000
@@ -1124,6 +1124,9 @@
+#include <string.h> /* FreeBSD puts swab here */
That seems to fix the problem on FreeBSD, at least. Let me know if I
should check this in...
> Hi Pat,
> --- Patrick Tullmann <tullmann at cs.utah.edu> wrote:
> > Why isn't the configure variable HAVE_DECLARED_SWAB
> > being set
> > correctly? (Is that the g++/gcc distinction Dalibor
> > mentioned??)
> No idea, really. It seems to be a gcc on linux issue,
> according to the comment in the config-mem.h file.
> Should I ask gcc/libc developers ? Any idea whom to
> bother first?
> > Maybe the configure test should be updated to
> > include <string.h> too?
> > (Right not it only seems to check unistd.h and
> > stdlib.h...)
> I'll try it with <string.h>, if that fails with gcc on
> linux, then I guess I'll revert to the old form, and
> #ifdef LINUX it. Is LINUX the right platform define?
> Every platform seems to have its own ideas about swab.
> I remember my last attempt to compile on mingw also
> gave me some swab prototype problems. As the ssize_t
> definition is by the OpenGroup, should I file a bug
> report for FreeBSD somewhere? If so, where?
> dalibor topic
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
----- ----- ---- --- --- -- - - - - -
Pat Tullmann www.tullmann.org
More information about the kaffe