]>
Commit | Line | Data |
---|---|---|
f95c3da2 | 1 | diff -urN -x CVS arts.orig/admin/acinclude.m4.in arts/admin/acinclude.m4.in |
2 | --- arts.orig/admin/acinclude.m4.in 2005-02-09 23:21:09.000000000 +0100 | |
3 | +++ arts/admin/acinclude.m4.in 2005-03-09 11:53:14.000000000 +0100 | |
4 | @@ -3194,6 +3194,51 @@ | |
5 | ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), []) | |
6 | ]) | |
7 | ||
8 | +AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG], | |
9 | + [ | |
10 | + AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug, | |
11 | + [ | |
12 | + AC_LANG_SAVE | |
13 | + AC_LANG_CPLUSPLUS | |
14 | + | |
15 | + safe_CXXFLAGS=$CXXFLAGS | |
16 | + safe_LDFLAGS=$LDFLAGS | |
17 | + CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0" | |
18 | + LDFLAGS="$LDFLAGS -shared -fPIC" | |
19 | + | |
20 | + AC_TRY_LINK( | |
21 | + [ | |
22 | + /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */ | |
23 | + template<typename CharT> | |
24 | + struct VisTest | |
25 | + { | |
26 | + inline VisTest (); | |
27 | + }; | |
28 | + template<typename CharT> | |
29 | + inline VisTest<CharT>::VisTest() | |
30 | + {} | |
31 | + extern template class VisTest<char>; // It works if we drop that line | |
32 | + int some_function( int do_something ) __attribute__ ((visibility("default"))); | |
33 | + int some_function( int ) | |
34 | + { | |
35 | + VisTest<char> a; | |
36 | + return 0; | |
37 | + } | |
38 | + ], [/* elvis is alive */], | |
39 | + kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes) | |
40 | + | |
41 | + CXXFLAGS=$safe_CXXFLAGS | |
42 | + LDFLAGS=$safe_LDFLAGS | |
43 | + AC_LANG_RESTORE | |
44 | + ] | |
45 | + ) | |
46 | + | |
47 | + if test x$kde_cv_val_gcc_visibility_bug = xno; then | |
48 | + CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden" | |
49 | + fi | |
50 | + ] | |
51 | +) | |
52 | + | |
53 | AC_DEFUN([KDE_CHECK_AND_ADD_HIDDEN_VISIBILITY], | |
54 | [ | |
55 | if test "$GXX" = "yes"; then | |
56 | @@ -3202,7 +3247,9 @@ | |
57 | KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"]) | |
58 | KDE_CHECK_COMPILER_FLAG(fvisibility=hidden, | |
59 | [ | |
60 | - CXXFLAGS="$CXXFLAGS -fvisibility=hidden -fvisibility-inlines-hidden" | |
61 | + CXXFLAGS="$CXXFLAGS -fvisibility=hidden" | |
62 | + KDE_CHECK_VISIBILITY_GCC_BUG | |
63 | + | |
64 | HAVE_GCC_VISIBILITY=1 | |
65 | AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported]) | |
66 | ]) | |
67 | diff -urN -x CVS arts.orig/flow/audioioalsa9.cc arts/flow/audioioalsa9.cc | |
68 | --- arts.orig/flow/audioioalsa9.cc 2004-05-26 20:50:18.000000000 +0200 | |
69 | +++ arts/flow/audioioalsa9.cc 2005-03-09 15:07:43.000000000 +0100 | |
70 | @@ -394,7 +394,9 @@ | |
71 | int frames = snd_pcm_bytes_to_frames(m_pcm_capture, size); | |
72 | int length; | |
73 | while ((length = snd_pcm_readi(m_pcm_capture, buffer, frames)) < 0) { | |
74 | - if (length == -EPIPE) | |
75 | + if (length == -EINTR) | |
76 | + continue; // Try again | |
77 | + else if (length == -EPIPE) | |
78 | length = xrun(m_pcm_capture); | |
79 | #ifdef HAVE_SND_PCM_RESUME | |
80 | else if (length == -ESTRPIPE) | |
81 | @@ -413,7 +415,9 @@ | |
82 | int frames = snd_pcm_bytes_to_frames(m_pcm_playback, size); | |
83 | int length; | |
84 | while ((length = snd_pcm_writei(m_pcm_playback, buffer, frames)) < 0) { | |
85 | - if (length == -EPIPE) | |
86 | + if (length == -EINTR) | |
87 | + continue; // Try again | |
88 | + else if (length == -EPIPE) | |
89 | length = xrun(m_pcm_playback); | |
90 | #ifdef HAVE_SND_PCM_RESUME | |
91 | else if (length == -ESTRPIPE) | |
92 | diff -urN -x CVS arts.orig/flow/audioioalsa.cc arts/flow/audioioalsa.cc | |
93 | --- arts.orig/flow/audioioalsa.cc 2001-11-05 18:29:57.000000000 +0100 | |
94 | +++ arts/flow/audioioalsa.cc 2005-03-09 15:07:43.000000000 +0100 | |
95 | @@ -374,7 +374,10 @@ | |
96 | ||
97 | int AudioIOALSA::read(void *buffer, int size) | |
98 | { | |
99 | - int length = snd_pcm_read(m_pcm_handle, buffer, size); | |
100 | + int length; | |
101 | + do { | |
102 | + length = snd_pcm_read(m_pcm_handle, buffer, size); | |
103 | + } while (length == -EINTR); | |
104 | if(length == -EPIPE) { | |
105 | snd_pcm_channel_status_t status; | |
106 | (void)memset(&status, 0, sizeof(status)); | |
107 | @@ -409,7 +412,10 @@ | |
108 | ||
109 | int AudioIOALSA::write(void *buffer, int size) | |
110 | { | |
111 | - while(snd_pcm_write(m_pcm_handle, buffer, size) != size) { | |
112 | + int length; | |
113 | + while((length = snd_pcm_write(m_pcm_handle, buffer, size)) != size) { | |
114 | + if (length == -EINTR) | |
115 | + continue; // Try again | |
116 | snd_pcm_channel_status_t status; | |
117 | (void)memset(&status, 0, sizeof(status)); | |
118 | status.channel = SND_PCM_CHANNEL_PLAYBACK; |