summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/acqprogress.cc12
-rw-r--r--cmdline/apt-get.cc6
2 files changed, 6 insertions, 12 deletions
diff --git a/cmdline/acqprogress.cc b/cmdline/acqprogress.cc
index fd80ea126..1ccb08804 100644
--- a/cmdline/acqprogress.cc
+++ b/cmdline/acqprogress.cc
@@ -163,7 +163,7 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner)
ScreenWidth = sizeof(Buffer)-1;
// Put in the percent done
- sprintf(S,"%ld%%",long(double((CurrentBytes + CurrentItems)*100.0)/double(TotalBytes+TotalItems)));
+ sprintf(S,"%.0f%%",((CurrentBytes + CurrentItems)*100.0)/(TotalBytes+TotalItems));
bool Shown = false;
for (pkgAcquire::Worker *I = Owner->WorkersBegin(); I != 0;
@@ -214,11 +214,11 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner)
if (I->TotalSize > 0 && I->CurrentItem->Owner->Complete == false)
{
if (Mode == Short)
- snprintf(S,End-S," %lu%%",
- long(double(I->CurrentSize*100.0)/double(I->TotalSize)));
+ snprintf(S,End-S," %.0f%%",
+ (I->CurrentSize*100.0)/I->TotalSize);
else
- snprintf(S,End-S,"/%sB %lu%%",SizeToStr(I->TotalSize).c_str(),
- long(double(I->CurrentSize*100.0)/double(I->TotalSize)));
+ snprintf(S,End-S,"/%sB %.0f%%",SizeToStr(I->TotalSize).c_str(),
+ (I->CurrentSize*100.0)/I->TotalSize);
}
S += strlen(S);
snprintf(S,End-S,"]");
@@ -238,7 +238,7 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner)
if (CurrentCPS != 0)
{
char Tmp[300];
- unsigned long ETA = (unsigned long)((TotalBytes - CurrentBytes)/CurrentCPS);
+ unsigned long long ETA = (TotalBytes - CurrentBytes)/CurrentCPS;
sprintf(Tmp," %sB/s %s",SizeToStr(CurrentCPS).c_str(),TimeToStr(ETA).c_str());
unsigned int Len = strlen(Buffer);
unsigned int LenT = strlen(Tmp);
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 1bf4cf6f9..9b9c0f0b0 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -27,9 +27,6 @@
// Include Files /*{{{*/
#include <config.h>
-#define _LARGEFILE_SOURCE
-#define _LARGEFILE64_SOURCE
-
#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/error.h>
#include <apt-pkg/cmndline.h>
@@ -68,9 +65,6 @@
#include <sstream>
#include <apti18n.h>
-
-#define statfs statfs64
-#define statvfs statvfs64
/*}}}*/
#define RAMFS_MAGIC 0x858458f6