mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 14:30:06 +00:00
* posix/globtest.sh: Use mktemp to create temporary file and
directory.
This commit is contained in:
parent
25a34eb737
commit
f3721ab2dc
@ -1,5 +1,8 @@
|
||||
2008-12-05 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* posix/globtest.sh: Use mktemp to create temporary file and
|
||||
directory.
|
||||
|
||||
* sysdeps/unix/sysv/linux/bits/sched.h (__CPU_SET_S): Handle large
|
||||
sets correctly.
|
||||
(__CPU_CLR_S): Likewise.
|
||||
|
@ -1,4 +1,4 @@
|
||||
#! /bin/sh
|
||||
#! /bin/bash
|
||||
|
||||
common_objpfx=$1; shift
|
||||
elf_objpfx=$1; shift
|
||||
@ -28,14 +28,11 @@ export LANG
|
||||
|
||||
# Create the arena
|
||||
: ${TMPDIR=/tmp}
|
||||
testdir=$TMPDIR/globtest-dir
|
||||
testout=$TMPDIR/globtest-out
|
||||
testdir=$(mktemp -d $TMPDIR/globtest-dir.XXXXXX)
|
||||
testout=$(mktemp $TMPDIR/globtest-out.XXXXXX)
|
||||
|
||||
trap 'chmod 777 $testdir/noread; rm -fr $testdir $testout' 1 2 3 15
|
||||
|
||||
test -d $testdir/noread && chmod 777 $testdir/noread
|
||||
rm -fr $testdir 2>/dev/null
|
||||
mkdir $testdir
|
||||
echo 1 > $testdir/file1
|
||||
echo 2 > $testdir/file2
|
||||
echo 3 > $testdir/-file3
|
||||
|
@ -131,30 +131,30 @@ typedef struct
|
||||
do { \
|
||||
size_t __i; \
|
||||
size_t __imax = (setsize) / sizeof (__cpu_mask); \
|
||||
cpu_set_t *__arr = (cpusetp); \
|
||||
__cpu_mask *__bits = (cpusetp)->__bits; \
|
||||
for (__i = 0; __i < __imax; ++__i) \
|
||||
__arr->__bits[__i] = 0; \
|
||||
__bits[__i] = 0; \
|
||||
} while (0)
|
||||
# endif
|
||||
# define __CPU_SET_S(cpu, setsize, cpusetp) \
|
||||
(__extension__ \
|
||||
({ size_t __cpu = (cpu); \
|
||||
__cpu < 8 * (setsize) \
|
||||
? (((cpu_set_t *) (cpusetp))->__bits[__CPUELT (__cpu)] \
|
||||
? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
|
||||
|= __CPUMASK (__cpu)) \
|
||||
: 0; }))
|
||||
# define __CPU_CLR_S(cpu, setsize, cpusetp) \
|
||||
(__extension__ \
|
||||
({ size_t __cpu = (cpu); \
|
||||
__cpu < 8 * (setsize) \
|
||||
? (((cpu_set_t *) (cpusetp))->__bits[__CPUELT (__cpu)] \
|
||||
? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
|
||||
&= ~__CPUMASK (__cpu)) \
|
||||
: 0; }))
|
||||
# define __CPU_ISSET_S(cpu, setsize, cpusetp) \
|
||||
(__extension__ \
|
||||
({ size_t __cpu = (cpu); \
|
||||
__cpu < 8 * (setsize) \
|
||||
? ((((cpu_set_t *) (cpusetp))->__bits[__CPUELT (__cpu)] \
|
||||
? ((((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
|
||||
& __CPUMASK (__cpu))) != 0 \
|
||||
: 0; }))
|
||||
|
||||
@ -167,12 +167,12 @@ typedef struct
|
||||
# else
|
||||
# define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
|
||||
(__extension__ \
|
||||
({ cpu_set_t *__arr1 = (cpusetp1); \
|
||||
cpu_set_t *__arr2 = (cpusetp2); \
|
||||
({ __cpu_mask *__arr1 = (cpusetp1)->__bits; \
|
||||
__cpu_mask *__arr2 = (cpusetp2)->__bits; \
|
||||
size_t __imax = (setsize) / sizeof (__cpu_mask); \
|
||||
size_t __i; \
|
||||
for (__i = 0; __i < __imax; ++__i) \
|
||||
if (__arr1->__bits[__i] != __arr2->__bits[__i]) \
|
||||
if (__bits[__i] != __bits[__i]) \
|
||||
break; \
|
||||
__i == __imax; }))
|
||||
# endif
|
||||
@ -180,12 +180,12 @@ typedef struct
|
||||
# define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \
|
||||
(__extension__ \
|
||||
({ cpu_set_t *__dest = (destset); \
|
||||
cpu_set_t *__arr1 = (srcset1); \
|
||||
cpu_set_t *__arr2 = (srcset2); \
|
||||
__cpu_mask *__arr1 = (srcset1)->__bits; \
|
||||
__cpu_mask *__arr2 = (srcset2)->__bits; \
|
||||
size_t __imax = (setsize) / sizeof (__cpu_mask); \
|
||||
size_t __i; \
|
||||
for (__i = 0; __i < __imax; ++__i) \
|
||||
__dest->__bits[__i] = __arr1->__bits[__i] op __arr2->__bits[__i]; \
|
||||
((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; \
|
||||
__dest; }))
|
||||
|
||||
# define __CPU_ALLOC_SIZE(count) \
|
||||
|
Loading…
Reference in New Issue
Block a user