3 ?RCS: Copyright (c) 2000, Jarkko Hietaniemi
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
11 ?MAKE:need_va_copy: +ccflags rm cat Compile i_stdarg i_stdlib
12 ?MAKE: -pick add $@ %<
14 ?S: This symbol, if defined, indicates that the system stores
15 ?S: the variable argument list datatype, va_list, in a format
16 ?S: that cannot be copied by simple assignment, so that some
17 ?S: other means must be used when copying is required.
18 ?S: As such systems vary in their provision (or non-provision)
19 ?S: of copying mechanisms, handy.h defines a platform-
20 ?S: independent macro, Perl_va_copy(src, dst), to do the job.
23 ?C: This symbol, if defined, indicates that the system stores
24 ?C: the variable argument list datatype, va_list, in a format
25 ?C: that cannot be copied by simple assignment, so that some
26 ?C: other means must be used when copying is required.
27 ?C: As such systems vary in their provision (or non-provision)
28 ?C: of copying mechanisms, handy.h defines a platform-
29 ?C: independent macro, Perl_va_copy(src, dst), to do the job.
31 ?H:#$need_va_copy NEED_VA_COPY /**/
35 ?LINT:set need_va_copy
36 : see if we need va_copy
50 ivfprintf(FILE *f, const char *fmt, va_list *valp)
52 return vfprintf(f, fmt, *valp);
56 myvfprintf(FILE *f, const char *fmt, va_list val)
58 return ivfprintf(f, fmt, &val);
62 myprintf(char *fmt, ...)
66 return myvfprintf(stdout, fmt, val);
70 main(int ac, char **av)
72 signal(SIGSEGV, exit);
74 myprintf("%s%cs all right, then\n", "that", '\'');
79 if eval $compile && ./try 2>&1 >/dev/null; then
81 "that's all right, then")
87 yes) echo "It seems that you don't need va_copy()." >&4
90 *) echo "It seems that va_copy() or similar will be needed." >&4
91 need_va_copy="$define"
94 $rm -f try.* core core.* *.core *.core.*
96 *) echo "You don't have <stdarg.h>, not checking for va_copy()." >&4