diff options
Diffstat (limited to 'meta/packages/gcc/gcc-4.3.1/debian/pr24170.dpatch')
-rw-r--r-- | meta/packages/gcc/gcc-4.3.1/debian/pr24170.dpatch | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-4.3.1/debian/pr24170.dpatch b/meta/packages/gcc/gcc-4.3.1/debian/pr24170.dpatch new file mode 100644 index 0000000000..028291ed6f --- /dev/null +++ b/meta/packages/gcc/gcc-4.3.1/debian/pr24170.dpatch | |||
@@ -0,0 +1,88 @@ | |||
1 | #! /bin/sh -e | ||
2 | |||
3 | # DP: Fix PR libgcj/24170. | ||
4 | |||
5 | dir= | ||
6 | if [ $# -eq 3 -a "$2" = '-d' ]; then | ||
7 | pdir="-d $3" | ||
8 | dir="$3/" | ||
9 | elif [ $# -ne 1 ]; then | ||
10 | echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" | ||
11 | exit 1 | ||
12 | fi | ||
13 | case "$1" in | ||
14 | -patch) | ||
15 | patch $pdir -f --no-backup-if-mismatch -p0 < $0 | ||
16 | cd ${dir}libjava && autoconf | ||
17 | ;; | ||
18 | -unpatch) | ||
19 | patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 | ||
20 | rm -f ${dir}libjava/configure | ||
21 | ;; | ||
22 | *) | ||
23 | echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" | ||
24 | exit 1 | ||
25 | esac | ||
26 | exit 0 | ||
27 | |||
28 | 2008-02-20 Tom Tromey <tromey@redhat.com> | ||
29 | |||
30 | PR libgcj/24170: | ||
31 | * java/io/natFilePosix.cc (File::performList): Don't use | ||
32 | readdir_r. | ||
33 | * configure, include/config.h.in: Rebuilt. | ||
34 | * configure.ac: Don't check for readdir_r. | ||
35 | |||
36 | Index: libjava/configure.ac | ||
37 | =================================================================== | ||
38 | --- libjava/configure.ac (revision 132490) | ||
39 | +++ libjava/configure.ac (revision 132491) | ||
40 | @@ -1023,7 +1023,7 @@ | ||
41 | PLATFORMNET=NoNet | ||
42 | else | ||
43 | AC_CHECK_FUNCS([strerror_r select fstat open fsync sleep opendir \ | ||
44 | - localtime_r readdir_r getpwuid_r getcwd \ | ||
45 | + localtime_r getpwuid_r getcwd \ | ||
46 | access stat lstat mkdir rename rmdir unlink utime chmod readlink \ | ||
47 | nl_langinfo setlocale \ | ||
48 | inet_pton uname inet_ntoa \ | ||
49 | Index: libjava/include/config.h.in | ||
50 | =================================================================== | ||
51 | --- libjava/include/config.h.in (revision 132490) | ||
52 | +++ libjava/include/config.h.in (revision 132491) | ||
53 | @@ -214,9 +214,6 @@ | ||
54 | /* Define to 1 if you have the <pwd.h> header file. */ | ||
55 | #undef HAVE_PWD_H | ||
56 | |||
57 | -/* Define to 1 if you have the `readdir_r' function. */ | ||
58 | -#undef HAVE_READDIR_R | ||
59 | - | ||
60 | /* Define to 1 if you have the `readlink' function. */ | ||
61 | #undef HAVE_READLINK | ||
62 | |||
63 | Index: libjava/java/io/natFilePosix.cc | ||
64 | =================================================================== | ||
65 | --- libjava/java/io/natFilePosix.cc (revision 132490) | ||
66 | +++ libjava/java/io/natFilePosix.cc (revision 132491) | ||
67 | @@ -1,6 +1,6 @@ | ||
68 | // natFile.cc - Native part of File class for POSIX. | ||
69 | |||
70 | -/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006 | ||
71 | +/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2008 | ||
72 | Free Software Foundation | ||
73 | |||
74 | This file is part of libgcj. | ||
75 | @@ -292,13 +292,7 @@ | ||
76 | |||
77 | java::util::ArrayList *list = new java::util::ArrayList (); | ||
78 | struct dirent *d; | ||
79 | -#if defined(HAVE_READDIR_R) && defined(_POSIX_PTHREAD_SEMANTICS) | ||
80 | - int name_max = pathconf (buf, _PC_NAME_MAX); | ||
81 | - char dbuf[sizeof (struct dirent) + name_max + 1]; | ||
82 | - while (readdir_r (dir, (struct dirent *) dbuf, &d) == 0 && d != NULL) | ||
83 | -#else /* HAVE_READDIR_R */ | ||
84 | while ((d = readdir (dir)) != NULL) | ||
85 | -#endif /* HAVE_READDIR_R */ | ||
86 | { | ||
87 | // Omit "." and "..". | ||
88 | if (d->d_name[0] == '.' | ||