1 ?RCS: $Id: d_charsprf.U,v 3.0 1993/08/18 12:05:49 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_charsprf.U,v $
12 ?RCS: Revision 3.0 1993/08/18 12:05:49 ram
13 ?RCS: Baseline for dist 3.0 netwide release.
15 ?MAKE:d_charsprf: cat rm +cc Setvar
16 ?MAKE: -pick add $@ %<
18 ?S: This variable conditionally defines CHARSPRINTF if this system
19 ?S: declares "char *sprintf()" in stdio.h. The trend seems to be to
20 ?S: declare it as "int sprintf()".
23 ?C: This symbol is defined if this system declares "char *sprintf()" in
24 ?C: stdio.h. The trend seems to be to declare it as "int sprintf()". It
25 ?C: is up to the package author to declare sprintf correctly based on the
28 ?H:#$d_charsprf CHARSPRINTF /**/
31 : see if sprintf is declared as int or pointer to char
33 $cat >ucbsprf.c <<'EOF'
38 exit((unsigned long)sprintf(buf,"%s","foo") > 10L);
41 if $cc -o ucbsprf ucbsprf.c >/dev/null 2>&1 && ./ucbsprf; then
42 echo "Your sprintf() returns (int)." >&4
45 echo "Your sprintf() returns (char*)." >&4