From df7b35c0c0fc9e31b2200f3d511f5fb342273b29 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Fri, 29 Oct 1999 20:19:41 +0000 Subject: [PATCH] metaconfig nits. p4raw-id: //depot/metaconfig@4490 --- U/modified/i_sysuio.U | 23 ++--------------------- U/perl/d_cmsghdr_s.U | 4 ++-- U/perl/d_fs_data_s.U | 4 ++-- U/perl/d_iovec_s.U | 28 ++++++++++++++++++++++++++++ U/perl/d_msghdr_s.U | 4 ++-- U/perl/d_statfs3.U | 4 ++-- U/perl/d_statfs4.U | 4 ++-- U/perl/d_statfs_f_flags.U | 4 ++-- U/perl/d_statfs_s.U | 4 ++-- U/perl/io64.U | 30 +++++++++++++++++++----------- U/threads/d_pthreadj.U | 8 ++++---- 11 files changed, 67 insertions(+), 50 deletions(-) create mode 100644 U/perl/d_iovec_s.U diff --git a/U/modified/i_sysuio.U b/U/modified/i_sysuio.U index bb12817..0424fed 100644 --- a/U/modified/i_sysuio.U +++ b/U/modified/i_sysuio.U @@ -5,39 +5,20 @@ ?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:i_sysuio d_iovec_s: Inhdr Hasfield +?MAKE:i_sysuio: Inhdr ?MAKE: -pick add $@ %< ?S:i_sysuio: ?S: This variable conditionally defines the I_SYSUIO symbol, and indicates ?S: whether a C program should include . ?S:. -?S:d_iovec_s: -?S: This variable conditionally defines the HAS_STRUCT_IOVEC symbol, -?S: which indicates that the struct iovec is supported. -?S:. ?C:I_SYSUIO: ?C: This symbol, if defined, indicates that exists and ?C: should be included. ?C:. -?C:HAS_STRUCT_IOVEC: -?C: This symbol, if defined, indicates that the struct iovec -?C: to do scatter writes/gather reads is supported. -?C:. ?H:#$i_sysuio I_SYSUIO /**/ -?H:#$d_iovec_s HAS_STRUCT_IOVEC /**/ ?H:. -?LINT:set i_sysuio d_iovec_s +?LINT:set i_sysuio : see if this is a sys/uio.h system set sys/uio.h i_sysuio eval $inhdr -echo "Checking to see if your system supports struct iovec..." >&4 -set d_iovec_s iovec iov_base $i_sysuio sys/uio.h -eval $hasfield -case "$d_iovec_s" in -"$define") echo "Yup, it does." >&4 - ;; -*) echo "Nope, it doesn't." >&4 - ;; -esac - diff --git a/U/perl/d_cmsghdr_s.U b/U/perl/d_cmsghdr_s.U index 05483df..689e250 100644 --- a/U/perl/d_cmsghdr_s.U +++ b/U/perl/d_cmsghdr_s.U @@ -24,8 +24,8 @@ $echo $n "Checking to see if your system supports struct cmsghdr..." $c >&4 set d_ccmsghdr_s ccmsghdr ccmsg_len $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h eval $hasstruct case "$d_cmsghdr_s" in -"$define") echo "Yup, it does." >&4 ;; -*) echo "Nope, it doesn't." >&4 ;; +"$define") echo "Yup, it does." ;; +*) echo "Nope, it doesn't." ;; esac diff --git a/U/perl/d_fs_data_s.U b/U/perl/d_fs_data_s.U index ffd0129..829d9bf 100644 --- a/U/perl/d_fs_data_s.U +++ b/U/perl/d_fs_data_s.U @@ -24,7 +24,7 @@ $echo $n "Checking to see if your system supports struct fs_data..." $c >&4 set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h eval $hasstruct case "$d_fs_data_s" in -"$define") echo "Yup, it does." >&4 ;; -*) echo "Nope, it doesn't." >&4 ;; +"$define") echo "Yup, it does." ;; +*) echo "Nope, it doesn't." ;; esac diff --git a/U/perl/d_iovec_s.U b/U/perl/d_iovec_s.U new file mode 100644 index 0000000..fb982b7 --- /dev/null +++ b/U/perl/d_iovec_s.U @@ -0,0 +1,28 @@ +?RCS: $Id$ +?RCS: +?RCS: Copyright (c) 1999 Jarkko Hietaniemi +?RCS: +?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_iovec_s: i_sysuio Hasfield +?MAKE: -pick add $@ %< +?S:d_iovec_s: +?S: This variable conditionally defines the HAS_STRUCT_IOVEC symbol, +?S: which indicates that the struct iovec is supported. +?S:. +?C:HAS_STRUCT_IOVEC: +?C: This symbol, if defined, indicates that the struct iovec +?C: to do scatter writes/gather reads is supported. +?C:. +?H:#$d_iovec_s HAS_STRUCT_IOVEC /**/ +?H:. +?LINT:set d_iovec_s +echo "Checking to see if your system supports struct iovec..." >&4 +set d_iovec_s iovec iov_base $i_sysuio sys/uio.h +eval $hasfield +case "$d_iovec_s" in +"$define") echo "Yup, it does." ;; +*) echo "Nope, it doesn't." ;; +esac + diff --git a/U/perl/d_msghdr_s.U b/U/perl/d_msghdr_s.U index ec9fd0b..be9dd04 100644 --- a/U/perl/d_msghdr_s.U +++ b/U/perl/d_msghdr_s.U @@ -24,8 +24,8 @@ $echo $n "Checking to see if your system supports struct msghdr..." $c >&4 set d_cmsghdr_s cmsghdr cmsg_len $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h eval $hasstruct case "$d_msghdr_s" in -"$define") echo "Yup, it does." >&4 ;; -*) echo "Nope, it doesn't." >&4 ;; +"$define") echo "Yup, it does." ;; +*) echo "Nope, it doesn't." ;; esac diff --git a/U/perl/d_statfs3.U b/U/perl/d_statfs3.U index 0ab2c3e..8b0fd43 100644 --- a/U/perl/d_statfs3.U +++ b/U/perl/d_statfs3.U @@ -57,8 +57,8 @@ EOCP val="$undef" fi case "$val" in - $define) echo "Yup, it can." >&4 ;; - $undef) echo "No, it can't." >&4 ;; + $define) echo "Yup, it can." ;; + $undef) echo "No, it can't." ;; esac ;; *) val="$undef" diff --git a/U/perl/d_statfs4.U b/U/perl/d_statfs4.U index 1fa09c7..488de47 100644 --- a/U/perl/d_statfs4.U +++ b/U/perl/d_statfs4.U @@ -57,8 +57,8 @@ EOCP val="$undef" fi case "$val" in - $define) echo "Yup, it can." >&4 ;; - $undef) echo "No, it can't." >&4 ;; + $define) echo "Yup, it can." ;; + $undef) echo "No, it can't." ;; esac ;; *) val="$undef" diff --git a/U/perl/d_statfs_f_flags.U b/U/perl/d_statfs_f_flags.U index 6731fd9..713e19b 100644 --- a/U/perl/d_statfs_f_flags.U +++ b/U/perl/d_statfs_f_flags.U @@ -42,7 +42,7 @@ define) ;; esac case "$d_statfs_f_flags" in -"$define") echo "Yup, it does." >&4 ;; -*) echo "Nope, it doesn't." >&4 ;; +"$define") echo "Yup, it does." ;; +*) echo "Nope, it doesn't." ;; esac diff --git a/U/perl/d_statfs_s.U b/U/perl/d_statfs_s.U index 655e00d..79d183c 100644 --- a/U/perl/d_statfs_s.U +++ b/U/perl/d_statfs_s.U @@ -26,8 +26,8 @@ $echo $n "Checking to see if your system supports struct statfs..." $c >&4 set d_statfs_s statfs $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h $i_sysvfs sys/vfs.h $i_sysstatfs sys/statfs.h eval $hasstruct case "$d_statfs_s" in -"$define") echo "Yup, it does." >&4 ;; -*) echo "Nope, it doesn't." >&4 ;; +"$define") echo "Yup, it does." ;; +*) echo "Nope, it doesn't." ;; esac diff --git a/U/perl/io64.U b/U/perl/io64.U index bbf0b72..70e298e 100644 --- a/U/perl/io64.U +++ b/U/perl/io64.U @@ -6,7 +6,7 @@ ?RCS: License or the Artistic License, as specified in the README file. ?RCS: ?MAKE:d_llseek d_fpos64_t d_off64_t: \ - Inlibc Setvar n c cc optimize ccflags rm cat echo + Inlibc Setvar n c Compile rm cat echo lseeksize ?MAKE: -pick add $@ %< ?S:d_llseek: ?S: This variable conditionally defines the HAS_LLSEEK symbol, which @@ -47,16 +47,20 @@ $echo $n "Checking to see if your system supports off64_t...$c" >&4 $cat >try.c < #include -off64_t foo() { off64_t x; x = 7; return x; }' +int main() { off64_t x = 7; }' EOCP -if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then +set try +if eval $compile; then val="$define" - echo " Yup, it does." >&4 + echo " Yup, it does." else val="$undef" - echo " Nope, it doesn't." >&4 + echo " Nope, it doesn't." + case "$lseeksize" in + 8) echo "(This is okay because your off_t is 64 bits wide.)" ;; + esac fi -$rm -f try.* +$rm -f try.* try set d_off64_t eval $setvar @@ -65,16 +69,20 @@ echo " " $echo $n "Checking to see if your system supports fpos64_t...$c" >&4 $cat >try.c < -fpos64_t foo() { fpos64_t x; x = 7; return x; }' +int main() { fpos64_t x x = 7; }' EOCP -if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then +set try +if eval $compile; then val="$define" - echo " Yup, it does." >&4 + echo " Yup, it does." else val="$undef" - echo " Nope, it doesn't." >&4 + echo " Nope, it doesn't." + case "$lseeksize" in + 8) echo "(This is okay because your off_t is 64 bits wide.)" ;; + esac fi -$rm -f try.* +$rm -f try.* try set d_fpos64_t eval $setvar diff --git a/U/threads/d_pthreadj.U b/U/threads/d_pthreadj.U index 19091cc..975ba8b 100644 --- a/U/threads/d_pthreadj.U +++ b/U/threads/d_pthreadj.U @@ -54,16 +54,16 @@ EOCP if eval $compile; then yyy=`./try` case "$yyy" in - detached) echo "Nope, they aren't." >&4 ;; - *) echo "Yup, they are." >&4 ;; + detached) echo "Nope, they aren't." ;; + *) echo "Yup, they are." ;; esac else set try -DPTHREAD_ATTR_GETDETACHSTATE_INT if eval $compile; then yyy=`./try` case "$yyy" in - detached) echo "Nope, they aren't." >&4 ;; - *) echo "Yup, they are." >&4 ;; + detached) echo "Nope, they aren't." ;; + *) echo "Yup, they are." ;; esac else echo " " -- 1.8.3.1