https://bugzilla.mindrot.org/show_bug.cgi?id=2315
Michael Felt <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Michael Felt <[email protected]> --- The much easier way is to set CC=xlc before running configure. By default cc is much closer to c89 (or even pre-c89?) whereas xlc is much closer to c99. The key difference, as far as va_copy is concerned is that xlc and it's derivatives redefine va_copy into a builtin function. Test program: va_copy_test.c: === #include <stdarg.h> /* * test va_copy changes by changing XL C compiler name (cc, c89, c99, xlc) * and the -E flag */ va_copy_test(void *a, void *b) { #ifdef _ANSI_C_SOURCE #ifdef _ISOC99_SOURCE va_copy(a,b); #else fake_ansi_copy(a,b); #endif #endif #ifndef _ANSI_C_SOURCE fake_noansi_copy(a,b); #endif } === CC=cc root@x064:[/data/prj/openbsd/openssh]cc -E va_copy_test.c #line 62 "/usr/include/va_list.h" typedef char *va_list; #line 8 "va_copy_test.c" va_copy_test(void *a, void *b) { #line 13 va_copy(a,b); #line 21 } CC=c89 root@x064:[/data/prj/openbsd/openssh]c89 -E va_copy_test.c #line 62 "/usr/include/va_list.h" typedef char *va_list; #line 8 "va_copy_test.c" va_copy_test(void *a, void *b) { #line 15 fake_ansi_copy(a,b); #line 21 } CC=c99 root@x064:[/data/prj/openbsd/openssh]c99 -E va_copy_test.c #line 62 "/usr/include/va_list.h" typedef char *va_list; #line 8 "va_copy_test.c" va_copy_test(void *a, void *b) { #line 13 __builtin_va_copy(a,b); #line 21 } CC=xlc root@x064:[/data/prj/openbsd/openssh]xlc -E va_copy_test.c #line 62 "/usr/include/va_list.h" typedef char *va_list; #line 8 "va_copy_test.c" va_copy_test(void *a, void *b) { #line 13 __builtin_va_copy(a,b); #line 21 } Although c99 and xlc give the same results - for this - my preference is to use xlc. Review /etc/vac.cfg.?? and compare c99 with xlc and make your choice. Saves you a lot of code changes! -- You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ openssh-bugs mailing list [email protected] https://lists.mindrot.org/mailman/listinfo/openssh-bugs
