| 1 | ?RCS: $Id: d_strctcpy.U,v 3.0 1993/08/18 12:07:34 ram Exp $ |
| 2 | ?RCS: |
| 3 | ?RCS: Copyright (c) 1991-1993, Raphael Manfredi |
| 4 | ?RCS: |
| 5 | ?RCS: You may redistribute only under the terms of the Artistic License, |
| 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 License; a copy of which may be found at the root |
| 9 | ?RCS: of the source tree for dist 3.0. |
| 10 | ?RCS: |
| 11 | ?RCS: $Log: d_strctcpy.U,v $ |
| 12 | ?RCS: Revision 3.0 1993/08/18 12:07:34 ram |
| 13 | ?RCS: Baseline for dist 3.0 netwide release. |
| 14 | ?RCS: |
| 15 | ?MAKE:d_strctcpy: cat rm_try cc Setvar |
| 16 | ?MAKE: -pick add $@ %< |
| 17 | ?S:d_strctcpy: |
| 18 | ?S: This variable conditionally defines the USE_STRUCT_COPY symbol, which |
| 19 | ?S: indicates to the C program that this C compiler knows how to copy |
| 20 | ?S: structures. |
| 21 | ?S:. |
| 22 | ?C:USE_STRUCT_COPY (STRUCTCOPY): |
| 23 | ?C: This symbol, if defined, indicates that this C compiler knows how |
| 24 | ?C: to copy structures. If undefined, you'll need to use a block copy |
| 25 | ?C: routine of some sort instead. |
| 26 | ?C:. |
| 27 | ?H:#$d_strctcpy USE_STRUCT_COPY /**/ |
| 28 | ?H:. |
| 29 | ?LINT:set d_strctcpy |
| 30 | : check for structure copying |
| 31 | echo " " |
| 32 | echo "Checking to see if your C compiler can copy structs..." >&4 |
| 33 | $cat >try.c <<'EOCP' |
| 34 | int main() |
| 35 | { |
| 36 | struct blurfl { |
| 37 | int dyick; |
| 38 | } foo, bar; |
| 39 | |
| 40 | foo = bar; |
| 41 | } |
| 42 | EOCP |
| 43 | if $cc -c try.c >/dev/null 2>&1 ; then |
| 44 | val="$define" |
| 45 | echo "Yup, it can." |
| 46 | else |
| 47 | val="$undef" |
| 48 | echo "Nope, it can't." |
| 49 | fi |
| 50 | set d_strctcpy |
| 51 | eval $setvar |
| 52 | $rm_try |
| 53 | |