Problem:
The file, "doprnt.c," fails to compile on Solaris 2.8 using gcc-3.2
for XEmacs 21.4.10.
Preamble
uname -a:
SunOS <hostname> 5.8 Generic_108529-16 i86pc i386
gcc -version:
gcc (GCC) 3.2
- not using binutils
- using native tools such as ld, ar from /usr/ccs/bin
error message in <xemac src>/src:
gcc -c -O4 -Demacs -I. -DHAVE_CONFIG_H -I/usr/local/X11/opt/include -I/usr/dt/include
-I/usr/local/X11/include doprnt.c
doprnt.c: In function `get_doprnt_args':
doprnt.c:366: first argument to `va_arg' not of type `va_list'
doprnt.c:372: first argument to `va_arg' not of type `va_list'
doprnt.c:377: first argument to `va_arg' not of type `va_list'
doprnt.c:380: first argument to `va_arg' not of type `va_list'
doprnt.c:383: first argument to `va_arg' not of type `va_list'
doprnt.c:385: first argument to `va_arg' not of type `va_list'
doprnt.c: In function `emacs_doprnt_lisp_2':
doprnt.c:746: first argument to `va_arg' not of type `va_list'
doprnt.c: In function `emacs_doprnt_string_lisp_2':
doprnt.c:837: first argument to `va_arg' not of type `va_list'
make: *** [doprnt.o] Error 1
I modified sol2.h to take GCC va_list munging in order to go against the
native includes. The patch is included below for only SunOS 5.8 (Solaris
2.8 or 8)--not sure what previous versions require.
"diff -c" for sol2.h:
*** 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 ----
Regards,
Michael Lee
p.s. XEmacs is an excellent editor.