void-packages/srcpkgs/rc/patches/va_copy.patch

62 lines
1.7 KiB
Diff

--- print.c
+++ print.c
@@ -285,11 +285,11 @@ extern int fmtprint(Format *format, const char *fmt,...) {
va_list ap, saveargs;
va_start(ap, fmt);
- __va_copy(saveargs, format->args);
- __va_copy(format->args, ap);
+ va_copy(saveargs, format->args);
+ va_copy(format->args, ap);
n += printfmt(format, fmt);
va_end(format->args);
- __va_copy(format->args, saveargs);
+ va_copy(format->args, saveargs);
return n + format->flushed;
}
@@ -316,7 +316,7 @@ extern int fprint(int fd, const char *fmt,...) {
format.u.n = fd;
va_start(ap, fmt);
- __va_copy(format.args, ap);
+ va_copy(format.args, ap);
printfmt(&format, fmt);
va_end(format.args);
@@ -361,7 +361,7 @@ extern char *mprint(const char *fmt,...) {
format.u.n = 1;
va_start(ap, fmt);
- __va_copy(format.args, ap);
+ va_copy(format.args, ap);
result = memprint(&format, fmt, ealloc(PRINT_ALLOCSIZE), PRINT_ALLOCSIZE);
va_end(format.args);
return result;
@@ -374,7 +374,7 @@ extern char *nprint(const char *fmt,...) {
format.u.n = 0;
va_start(ap, fmt);
- __va_copy(format.args, ap);
+ va_copy(format.args, ap);
result = memprint(&format, fmt, nalloc(PRINT_ALLOCSIZE), PRINT_ALLOCSIZE);
va_end(format.args);
return result;
--- proto.h
+++ proto.h
@@ -23,11 +23,11 @@ typedef long align_t;
#include <stdarg.h>
-/* C 9x specifies a __va_copy() macro which should be used for copying
+/* C 9x specifies a va_copy() macro which should be used for copying
objects of type va_list. Of course, most places don't have this yet,
but where it does exist we need to use it. */
-#ifndef __va_copy
-#define __va_copy(x,y) (x)=(y)
+#ifndef va_copy
+#define va_copy(x,y) (x)=(y)
#endif
#if STDC_HEADERS