Commit | Line | Data |
---|---|---|
9082a838 MBT |
1 | ?RCS: $Id$ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 2014 H.Merijn Brand | |
4 | ?RCS: | |
5 | ?RCS: You may distribute under the terms of either the GNU General Public | |
6 | ?RCS: License or the Artistic License, as specified in the README file. | |
7 | ?RCS: | |
8 | ?MAKE:d_ptrdiff_t: Inlibc Setvar Compile rm_try cat | |
9 | ?MAKE: -pick add $@ %< | |
10 | ?S:d_ptrdiff_t: | |
11 | ?S: This symbol will be defined if the C compiler supports ptrdiff_t. | |
12 | ?S:. | |
13 | ?C:HAS_PTRDIFF_T: | |
14 | ?C: This symbol will be defined if the C compiler supports ptrdiff_t. | |
15 | ?C:. | |
16 | ?H:#$d_ptrdiff_t HAS_PTRDIFF_T /**/ | |
17 | ?H:. | |
18 | ?LINT:set d_ptrdiff_t | |
19 | : check for ptrdiff_t | |
20 | echo " " | |
21 | echo "Checking to see if you have ptrdiff_t..." >&4 | |
22 | $cat >try.c <<EOCP | |
23 | #include <stddef.h> | |
24 | int main() { ptrdiff_t x = 7; } | |
25 | EOCP | |
26 | set try | |
27 | if eval $compile; then | |
28 | val="$define" | |
29 | echo "You have ptrdiff_t." | |
30 | else | |
31 | val="$undef" | |
32 | echo "You do not have ptrdiff_t." | |
33 | fi | |
34 | $rm_try | |
35 | set d_ptrdiff_t | |
36 | eval $setvar | |
37 |