Репозитории ALT
Группа :: Сети/Передача файлов
Пакет: uucp
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: uucp-1.06.1-sigfpe.patch
Скачать
Скачать
--- unix/serial.c Sun Feb 13 13:34:55 2000
+++ unix/serial.c Sun Feb 13 13:36:12 2000
@@ -2371,8 +2371,17 @@
else
csleepchars = MAX_INPUT - 10;
+#ifndef BUG
+ if (q->ibaud) {
+ isleep = (int) (((long) csleepchars * 10000L) / q->ibaud);
+ isleep -= 10;
+ } else {
+ isleep = 1000; /* I hope, a second is right... */
+ }
+#else
isleep = (int) (((long) csleepchars * 10000L) / q->ibaud);
isleep -= 10;
+#endif
if (isleep > 10)
{
@@ -2773,9 +2782,20 @@
/ baud bits/sec)
* 10 bits/byte)
*/
+#ifndef BUG
+ if (q->ibaud) {
+ stime.tv_sec = (long) 10240 / q->ibaud;
+ stime.tv_usec = ((((long) 1024000000 / q->ibaud) * (long) 10)
+ % (long) 1000000);
+ } else {
+ stime.tv_sec = 1;
+ stime.tv_usec = 0;
+ }
+#else
stime.tv_sec = (long) 10240 / q->ibaud;
stime.tv_usec = ((((long) 1024000000 / q->ibaud) * (long) 10)
% (long) 1000000);
+#endif
imask = 1 << q->o;
if (imask == 0)
@@ -2846,7 +2866,14 @@
we don't need to use the catch stuff, since we know
that HAVE_RESTARTABLE_SYSCALLS is 0. */
usset_signal (SIGALRM, usalarm, TRUE, (boolean *) NULL);
+#ifndef BUG
+ if (q->ibaud)
+ alarm ((int) ((long) 10240 / q->ibaud) + 1);
+ else
+ alarm (1);
+#else
alarm ((int) ((long) 10240 / q->ibaud) + 1);
+#endif
/* There is a race condition here: on a severely loaded
system, we could get the alarm before we start the