Commit | Line | Data |
---|---|---|
df89d149 MBT |
1 | ?RCS: You may distribute under the terms of either the GNU General Public |
2 | ?RCS: License or the Artistic License, as specified in the README file. | |
3 | ?RCS: | |
440736ce | 4 | ?MAKE:d_memrchr: Inlibc Hasproto d_gnulibc |
df89d149 MBT |
5 | ?MAKE: -pick add $@ %< |
6 | ?S:d_memrchr: | |
7 | ?S: This variable conditionally defines the HAS_MEMRCHR symbol, which | |
8 | ?S: indicates to the C program that the memrchr() routine is available | |
8b00c5e2 LM |
9 | ?S: to return a pointer to the last occurrence of a byte in a memory |
10 | ?S: area (or NULL if not found). | |
df89d149 MBT |
11 | ?S:. |
12 | ?C:HAS_MEMRCHR: | |
13 | ?C: This symbol, if defined, indicates that the memrchr routine is | |
8b00c5e2 LM |
14 | ?C: available to return a pointer to the last occurrence of a byte in |
15 | ?C: a memory area (or NULL if not found). | |
df89d149 MBT |
16 | ?C:. |
17 | ?H:#$d_memrchr HAS_MEMRCHR /**/ | |
18 | ?H:. | |
440736ce | 19 | ?T:d_memrchr_proto xx1 xx2 xx3 xx4 |
df89d149 MBT |
20 | ?LINT:set d_memrchr |
21 | : see if memrchr exists | |
440736ce AC |
22 | : We need both a prototype in string.h and the symbol in libc. |
23 | echo " " | |
24 | d_memrchr_proto='' | |
25 | xx1="#$d_gnulibc HAS_GNULIBC" | |
26 | xx2='#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)' | |
27 | xx3='# define _GNU_SOURCE' | |
28 | xx4='#endif' | |
29 | set d_memrchr_proto memrchr literal "$xx1" literal "$xx2" literal "$xx3" literal "$xx4" define string.h | |
30 | eval $hasproto | |
31 | case "$d_memrchr_proto" in | |
32 | define) # see if memrchr exists | |
33 | set memrchr d_memrchr | |
34 | eval $inlibc | |
35 | ;; | |
36 | *) val=$undef | |
37 | set d_memrchr | |
38 | eval $setvar | |
39 | ;; | |
40 | esac | |
df89d149 | 41 |