This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Merge pull request #79 from neilb/taintsupport
[metaconfig.git] / U / perl / d_isblank.U
CommitLineData
35290401 1?RCS: Copyright (c) 2012-2012, H.Merijn Brand
65a32477
MBT
2?RCS:
3?RCS: You may redistribute only under the terms of the Artistic License,
35290401
MB
4?RCS: as specified in the README file that comes with the distribution.
5?RCS: You may reuse parts of this distribution only within the terms of
65a32477 6?RCS: that same Artistic License; a copy of which may be found at the root
35290401
MB
7?RCS: of the source tree for dist 4.0.
8?RCS:
9?RCS: Original Author: H.Merijn Brand
10?RCS:
11?MAKE:d_isblank: cc cat ccflags ldflags rm libs Setvar
12?MAKE: -pick add $@ %<
13?S:d_isblank:
14?S: This variable conditionally defines the HAS_ISBLANK constant,
15?S: which indicates to the C program that isblank() is available.
16?S:.
17?C:HAS_ISBLANK:
65a32477 18?C: This manifest constant lets the C program know that isblank
35290401
MB
19?C: is available.
20?C:.
21?H:#$d_isblank HAS_ISBLANK /**/
22?H:.
23?LINT:set d_isblank
24?X: Can't use Inlibc because isblank() might be a macro.
25: Look for isblank
26echo " "
27$cat >isblank.c <<'EOCP'
28#include <stdio.h>
29#include <ctype.h>
30int main() {
0a773ca6 31 int c = ' ';
35290401 32 if (isblank(c))
8c0d5fbd 33 return 0 ;
35290401 34 else
8c0d5fbd 35 return 1 ;
35290401
MB
36}
37EOCP
38if $cc $ccflags $ldflags -o isblank isblank.c $libs >/dev/null 2>&1 ; then
39 echo "isblank() found." >&4
40 val="$define"
41else
42 echo "isblank() NOT found." >&4
43 val="$undef"
44fi
45set d_isblank
46eval $setvar
47$rm -f isblank*
48