>>>> "Rob" == Rob <rrowens(a)earthlink.net>
writes:
Rob> doprnt.c:366: first argument to `va_arg' not of type `va_list'
>>>> "ml" == Michael Lee <ml(a)slack.net>
writes:
ml> I modified sol2.h to take GCC va_list munging in order to go
ml> against the native includes. The patch is included below for
ml> only SunOS 5.8 (Solaris 2.8 or 8)--not sure what previous
ml> versions require.
I'm pretty sure the following patch should help Rob (it may be
reversed):
*** sol2.h Sun Nov 17 16:19:38 2002
--- sol2.h.orig Thu Apr 12 14:24:44 2001
***************
*** 14,26 ****
#if defined(__GNUC__) && OS_RELEASE >= 56 && !defined(NOT_C_CODE)
/* GCC va_list munging is a little messed up */
- #if OS_RELEASE != 58
#define __GNUC_VA_LIST
#define _VA_LIST_
#define _VA_LIST va_list
typedef void *__gnuc_va_list;
typedef __gnuc_va_list va_list;
- #endif
/* Missing prototypes for functions added in Solaris 2.6 */
#include <sys/types.h>
--- 14,24 ----
However, this is not the right way to go. First, this is probably a
GCC (on Solaris) issue, not a Solaris problem per se. (Have you run
GCC's fixincludes script, if needed, by the way? I know it's evil,
but we can't really take responsibility for supporting a user-hacked
compiler.) So the test should be on GCC version, not Solaris version.
But that's still pretty bogus, since we should be able to test
directly for the breakage in configure.
If somebody with a broken GCC on Solaris could compile the following
and post the full output (stdout and stderr), that _should_ be enough
to get a configure test that discriminates. (We could do it the other
way around, and check if it barfs with the above bogosity in place,
but that's too perverse for me.)
#include <stdarg.h>
int testfunc (char *spec, va_list vargs)
{
int i = va_arg (vargs, int);
return i;
}
Thanks!
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.