?RCS: You may distribute under the terms of either the GNU General Public
?RCS: License or the Artistic License, as specified in the README file.
?RCS:
-?MAKE:d_memrchr: Inlibc
+?MAKE:d_memrchr: Inlibc Hasproto d_gnulibc
?MAKE: -pick add $@ %<
?S:d_memrchr:
?S: This variable conditionally defines the HAS_MEMRCHR symbol, which
?C:.
?H:#$d_memrchr HAS_MEMRCHR /**/
?H:.
+?T:d_memrchr_proto xx1 xx2 xx3 xx4
?LINT:set d_memrchr
: see if memrchr exists
-set memrchr d_memrchr
-eval $inlibc
+: We need both a prototype in string.h and the symbol in libc.
+echo " "
+d_memrchr_proto=''
+xx1="#$d_gnulibc HAS_GNULIBC"
+xx2='#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)'
+xx3='# define _GNU_SOURCE'
+xx4='#endif'
+set d_memrchr_proto memrchr literal "$xx1" literal "$xx2" literal "$xx3" literal "$xx4" define string.h
+eval $hasproto
+case "$d_memrchr_proto" in
+ define) # see if memrchr exists
+ set memrchr d_memrchr
+ eval $inlibc
+ ;;
+ *) val=$undef
+ set d_memrchr
+ eval $setvar
+ ;;
+esac
?RCS: You may distribute under the terms of either the GNU General Public
?RCS: License or the Artistic License, as specified in the README file.
?RCS:
-?MAKE:d_strlcat: Inlibc
+?MAKE:d_strlcat: Inlibc Hasproto d_gnulibc
?MAKE: -pick add $@ %<
?S:d_strlcat:
?S: This variable conditionally defines the HAS_STRLCAT symbol, which
?C:.
?H:#$d_strlcat HAS_STRLCAT /**/
?H:.
+?T:d_strlcat_proto xx1 xx2 xx3 xx4
?LINT:set d_strlcat
: see if strlcat exists
-set strlcat d_strlcat
-eval $inlibc
+: We need both a prototype in string.h and the symbol in libc.
+echo " "
+d_strlcat_proto=''
+xx1="#$d_gnulibc HAS_GNULIBC"
+xx2='#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)'
+xx3='# define _GNU_SOURCE'
+xx4='#endif'
+set d_strlcat_proto strlcat literal "$xx1" literal "$xx2" literal "$xx3" literal "$xx4" define string.h
+eval $hasproto
+case "$d_strlcat_proto" in
+ define) # see if strlcat exists
+ set strlcat d_strlcat
+ eval $inlibc
+ ;;
+ *) val=$undef
+ set d_strlcat
+ eval $setvar
+ ;;
+esac
?RCS: You may distribute under the terms of either the GNU General Public
?RCS: License or the Artistic License, as specified in the README file.
?RCS:
-?MAKE:d_strlcpy: Inlibc
+?MAKE:d_strlcpy: Inlibc Hasproto d_gnulibc
?MAKE: -pick add $@ %<
?S:d_strlcpy:
?S: This variable conditionally defines the HAS_STRLCPY symbol, which
?C:.
?H:#$d_strlcpy HAS_STRLCPY /**/
?H:.
+?T:d_strlcpy_proto xx1 xx2 xx3 xx4
?LINT:set d_strlcpy
: see if strlcpy exists
-set strlcpy d_strlcpy
-eval $inlibc
+: We need both a prototype in string.h and the symbol in libc.
+echo " "
+d_strlcpy_proto=''
+xx1="#$d_gnulibc HAS_GNULIBC"
+xx2='#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)'
+xx3='# define _GNU_SOURCE'
+xx4='#endif'
+set d_strlcpy_proto strlcpy literal "$xx1" literal "$xx2" literal "$xx3" literal "$xx4" define string.h
+eval $hasproto
+case "$d_strlcpy_proto" in
+ define) # see if strlcpy exists
+ set strlcpy d_strlcpy
+ eval $inlibc
+ ;;
+ *) val=$undef
+ set d_strlcpy
+ eval $setvar
+ ;;
+esac