This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
metaconfig nits.
[metaconfig.git] / U / perl / io64.U
1 ?RCS: $Id$
2 ?RCS:
3 ?RCS: Copyright (c) 1998 Jarkko Hietaniemi
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_llseek d_fpos64_t d_off64_t: \
9         Inlibc Setvar n c Compile rm cat echo lseeksize
10 ?MAKE:  -pick add $@ %<
11 ?S:d_llseek:
12 ?S:     This variable conditionally defines the HAS_LLSEEK symbol, which
13 ?S:     indicates to the C program that the llseek() routine is available.
14 ?S:.
15 ?S:d_off64_t:
16 ?S:     This symbol will be defined if the C compiler supports off64_t.
17 ?S:.
18 ?S:d_fpos64_t:
19 ?S:     This symbol will be defined if the C compiler supports fpos64_t.
20 ?S:.
21 ?C:HAS_LLSEEK:
22 ?C:     This symbol, if defined, indicates that the llseek routine is
23 ?C:     available to seek files larger than 2 gigabytes.
24 ?C:.
25 ?C:HAS_OFF64_T:
26 ?C:     This symbol will be defined if the C compiler supports off64_t.
27 ?C:.
28 ?C:HAS_FPOS64_T:
29 ?C:     This symbol will be defined if the C compiler supports fpos64_t.
30 ?C:.
31 ?H:#$d_llseek   HAS_LLSEEK              /**/
32 ?H:#$d_off64_t  HAS_OFF64_T             /**/
33 ?H:#$d_fpos64_t HAS_FPOS64_T            /**/
34 ?H:.
35 ?LINT:set d_llseek
36 ?LINT:set d_off64_t
37 ?LINT:set d_fpos64_t
38 ?LINT:set d_ino64_t
39
40 : see if llseek exists
41 set llseek d_llseek
42 eval $inlibc
43
44 : check for off64_t
45 echo " "
46 $echo $n "Checking to see if your system supports off64_t...$c" >&4
47 $cat >try.c <<EOCP
48 #include <sys/types.h>
49 #include <unistd.h>
50 int main() { off64_t x = 7; }'
51 EOCP
52 set try
53 if eval $compile; then
54         val="$define"
55         echo " Yup, it does."
56 else
57         val="$undef"
58         echo " Nope, it doesn't."
59         case "$lseeksize" in
60         8) echo "(This is okay because your off_t is 64 bits wide.)" ;;
61         esac
62 fi
63 $rm -f try.* try
64 set d_off64_t
65 eval $setvar
66
67 : check for fpos64_t
68 echo " "
69 $echo $n "Checking to see if your system supports fpos64_t...$c" >&4
70 $cat >try.c <<EOCP
71 #include <sys/stdio.h>
72 int main() { fpos64_t x x = 7; }'
73 EOCP
74 set try
75 if eval $compile; then
76         val="$define"
77         echo " Yup, it does."
78 else
79         val="$undef"
80         echo " Nope, it doesn't."
81         case "$lseeksize" in
82         8) echo "(This is okay because your off_t is 64 bits wide.)" ;;
83         esac
84 fi
85 $rm -f try.* try
86 set d_fpos64_t
87 eval $setvar
88