This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Compile error: MkLinux, egcs, ssh2

file: ssh-2.0.8/lib/sshutil/sshencode.c

arch: powerpc601
system: MkLinux DR3 on kernel linux-2.0.35 OSF-Mach3
compiler: egcs-2.90.25 980302 (egcs-1.0.2 prerelease)
source: for kernel, for microkernel,
and compiler.

(This is the standard *NIX OS on PowerPC601 with the standard compiler. is the marginally informative website.)

First is a warning:
In function ssh_encode_va, line 92: Incompatible pointer 

	typedef void (*SshEncoder)(SshBuffer *buffer, va_list *ap);
	SshBuffer buffer; va_list ap; SshEncoder encoder;

So this is a bug in egcs, I would think.

Second is line 500: incompatible types in assignment
	va_list ap; va_list start_of_ap;

and in line 512:

The problem possibly comes from egcs definition of va_list

	typedef struct __va_list { ... } va_list[1]; 	

so that perhaps start_of_ap=ap wouldn't be what you wanted even if egcs
allowed it (copy first arg of ap into first arg of start_of_ap).

I personally can't think of a simple way to do what you want, but I'm no
real programmer. memcpy seems wrong, since you don't know how long the
array is.

Hope this is helpful to someone. Incidentally ssh-1.2.26 compiles cleanly
with no modifications. and so far all compile problems of ssh-2.0.8 come
from stdarg.h with every source file compiling with the exception of
sshencode.c Of course the binaries that rely on libsshutil.a can't be
built, so I can't vouch for the product as a whole.

-Jack Schmidt

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]