Репозиторий Sisyphus
Последнее обновление: 7 апреля 2020 | Пакетов: 17566 | Посещений: 17843050
en ru br
Репозитории ALT
S:0.1.8-alt2.2.qa1
5.1: 0.1.8-alt2
4.1: 0.1.8-alt2
4.0: 0.1.8-alt1.M40.1
www.altlinux.org/Changes

Группа :: Мониторинг
Пакет: cban

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: cban-0.1.8-alt_optflags-int.diff
Скачать


--- cban/src/Makefile.orig	2001-12-19 18:29:37 +0200
+++ cban/src/Makefile	2007-10-02 20:16:57 +0300
@@ -3,7 +3,7 @@ CC=gcc
 BIN=../bin
 #CFLAGS= -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -march=i686 -fno-strict-aliasing -fno-strength-reduce
 #CFLAGS= -O4 -D NDEBUG -fomit-frame-pointer -pipe -march=i686 -fno-strict-aliasing -fno-strength-reduce
-CFLAGS= -O4 -D NDEBUG
+CFLAGS= $(OPTFLAGS) -O4 -D NDEBUG
 DEBUG= -g1
 #Makefile
 all: cban
--- cban/src/cban.c.orig	2001-11-04 20:56:15 +0200
+++ cban/src/cban.c	2007-10-02 21:18:01 +0300
@@ -153,8 +153,8 @@ void monitor_interface()
 	    {
 		sleep(update);
 		process_data(&current);
-		incoming = (current.incoming - previous.incoming) / update * 1000 / 1024;
-		outgoing = (current.outgoing - previous.outgoing) / update * 1000 / 1024;
+		incoming = (int) (current.incoming - previous.incoming) / update * (1000. / 1024.);
+		outgoing = (int) (current.outgoing - previous.outgoing) / update * (1000. / 1024.);
 		
 		printf("%c[H",27); // use escape to put the cursor up
 		
@@ -186,8 +186,8 @@ void monitor_interface()
 		    //mrtg
 	    	    sleep(update);
 		    process_data(&current);
-		    incoming = (current.incoming - previous.incoming) / update * 1000 / 1024;
-		    outgoing = (current.outgoing - previous.outgoing) / update * 1000 / 1024;
+		    incoming = (int) (current.incoming - previous.incoming) / update * (1000. / 1024.);
+		    outgoing = (int) (current.outgoing - previous.outgoing) / update * (1000. / 1024.);
 		    printf( "%lu\n%lu\n", 
 		    incoming*bits/divisor, 
 		    outgoing*bits/divisor );
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin