aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-12-06 06:05:54 +0000
committerUlrich Drepper <drepper@redhat.com>2008-12-06 06:05:54 +0000
commitf3721ab2dce137e67579959d8992a251d35dcdb7 (patch)
tree34e9828ca4104af4300036c691ca938ce2508e9a
parent25a34eb737fa25391f8c6d2915fff80b218a1524 (diff)
downloadglibc-f3721ab2dce137e67579959d8992a251d35dcdb7.zip
glibc-f3721ab2dce137e67579959d8992a251d35dcdb7.tar.gz
glibc-f3721ab2dce137e67579959d8992a251d35dcdb7.tar.bz2
* posix/globtest.sh: Use mktemp to create temporary file and
directory.
-rw-r--r--ChangeLog3
-rwxr-xr-xposix/globtest.sh9
-rw-r--r--sysdeps/unix/sysv/linux/bits/sched.h22
3 files changed, 17 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index d02615b..4e18b54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/posix/globtest.sh b/posix/globtest.sh
index ad47508..aadac87 100755
--- a/posix/globtest.sh
+++ b/posix/globtest.sh
@@ -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
diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h
index 696b8dd..95d05b4 100644
--- a/sysdeps/unix/sysv/linux/bits/sched.h
+++ b/sysdeps/unix/sysv/linux/bits/sched.h
@@ -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) \