1 ?RCS: $Id: d_vprintf.U,v 3.0 1993/08/18 12:07:59 ram Exp $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
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 ?RCS: $Log: d_vprintf.U,v $
12 ?RCS: Revision 3.0 1993/08/18 12:07:59 ram
13 ?RCS: Baseline for dist 3.0 netwide release.
15 ?MAKE:d_vprintf d_charvspr: Guess cat +cc +ccflags Csym Setvar
16 ?MAKE: -pick add $@ %<
18 ?S: This variable conditionally defines the HAS_VPRINTF symbol, which
19 ?S: indicates to the C program that the vprintf() routine is available
20 ?S: to printf with a pointer to an argument list.
23 ?S: This variable conditionally defines CHARVSPRINTF if this system
24 ?S: has vsprintf returning type (char*). The trend seems to be to
25 ?S: declare it as "int vsprintf()".
27 ?C:HAS_VPRINTF (VPRINTF):
28 ?C: This symbol, if defined, indicates that the vprintf routine is available
29 ?C: to printf with a pointer to an argument list. If unavailable, you
30 ?C: may need to write your own, probably in terms of _doprnt().
32 ?C:USE_CHAR_VSPRINTF (CHARVSPRINTF):
33 ?C: This symbol is defined if this system has vsprintf() returning type
34 ?C: (char*). The trend seems to be to declare it as "int vsprintf()". It
35 ?C: is up to the package author to declare vsprintf correctly based on the
38 ?H:#$d_vprintf HAS_VPRINTF /**/
39 ?H:#$d_charvspr USE_CHAR_VSPRINTF /**/
42 ?LINT:set d_vprintf d_charvspr
43 : see if vprintf exists
45 if set vprintf val -f d_vprintf; eval $csym; $val; then
46 echo 'vprintf() found.' >&4
48 $cat >vprintf.c <<'EOF'
51 int main() { xxx("foo"); }
60 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
63 if $cc $ccflags -o vprintf vprintf.c >/dev/null 2>&1 && ./vprintf; then
64 echo "Your vsprintf() returns (int)." >&4
67 echo "Your vsprintf() returns (char*)." >&4
71 echo 'vprintf() NOT found.' >&4