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
1?RCS: Copyright (c) 2012-2012, H.Merijn Brand
2?RCS:
3?RCS: You may redistribute only under the terms of the Artistic License,
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
6?RCS: that same Artistic License; a copy of which may be found at the root
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:
18?C: This manifest constant lets the C program know that isblank
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() {
31 int c = ' ';
32 if (isblank(c))
33 return 0 ;
34 else
35 return 1 ;
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