diff options
| author | Andreas Schwab | 2001-11-05 14:09:32 +0000 |
|---|---|---|
| committer | Andreas Schwab | 2001-11-05 14:09:32 +0000 |
| commit | 3297e2a11e2b09fd7e20af8bc56681e5a0750b25 (patch) | |
| tree | 610ddb820c39a02c4a8bf9836be354a95b32dd94 /src | |
| parent | 9212319ff00686e992e767c88083ca84863604bb (diff) | |
| download | emacs-3297e2a11e2b09fd7e20af8bc56681e5a0750b25.tar.gz emacs-3297e2a11e2b09fd7e20af8bc56681e5a0750b25.zip | |
(sound_perror): Save errno from being clobbered.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/sound.c | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ece278922f1..4b65a631218 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2001-11-05 Andreas Schwab <schwab@suse.de> | ||
| 2 | |||
| 3 | * sound.c (sound_perror): Save errno from being clobbered. | ||
| 4 | |||
| 1 | 2001-11-05 Dale Hagglund <rdh@yottayotta.com> | 5 | 2001-11-05 Dale Hagglund <rdh@yottayotta.com> |
| 2 | 6 | ||
| 3 | * unexelf.c (unexec): Don't use `mmap'. Instead, read and write | 7 | * unexelf.c (unexec): Don't use `mmap'. Instead, read and write |
diff --git a/src/sound.c b/src/sound.c index b3c075ba831..d9fd55966a5 100644 --- a/src/sound.c +++ b/src/sound.c | |||
| @@ -262,12 +262,14 @@ static void | |||
| 262 | sound_perror (msg) | 262 | sound_perror (msg) |
| 263 | char *msg; | 263 | char *msg; |
| 264 | { | 264 | { |
| 265 | int saved_errno = errno; | ||
| 266 | |||
| 265 | turn_on_atimers (1); | 267 | turn_on_atimers (1); |
| 266 | #ifdef SIGIO | 268 | #ifdef SIGIO |
| 267 | sigunblock (sigmask (SIGIO)); | 269 | sigunblock (sigmask (SIGIO)); |
| 268 | #endif | 270 | #endif |
| 269 | if (errno != 0) | 271 | if (saved_errno != 0) |
| 270 | error ("%s: %s", msg, strerror (errno)); | 272 | error ("%s: %s", msg, strerror (saved_errno)); |
| 271 | else | 273 | else |
| 272 | error ("%s", msg); | 274 | error ("%s", msg); |
| 273 | } | 275 | } |