summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:55:31 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:55:31 +0000
commit1ae93c94429de697fb17f7067367fbf32fd3b6fc (patch)
treedc02b0f8e2682908655ebf27ee5d9e6796ab84f1 /methods
parentd955fe80937173f6e4c609ae58a916b61137583d (diff)
HP-UX fixes
Author: jgg Date: 1999-12-10 23:40:29 GMT HP-UX fixes
Diffstat (limited to 'methods')
-rw-r--r--methods/gzip.cc18
-rw-r--r--methods/http.cc4
2 files changed, 7 insertions, 15 deletions
diff --git a/methods/gzip.cc b/methods/gzip.cc
index f1bf60ce6..337219316 100644
--- a/methods/gzip.cc
+++ b/methods/gzip.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: gzip.cc,v 1.8 1999/07/30 05:37:00 jgg Exp $
+// $Id: gzip.cc,v 1.9 1999/12/10 23:40:29 jgg Exp $
/* ######################################################################
GZip method - Take a file URI in and decompress it into the target
@@ -17,7 +17,6 @@
#include <sys/stat.h>
#include <unistd.h>
#include <utime.h>
-#include <wait.h>
#include <stdio.h>
/*}}}*/
@@ -73,19 +72,12 @@ bool GzipMethod::Fetch(FetchItem *Itm)
From.Close();
// Wait for gzip to finish
- int Status;
- if (waitpid(Process,&Status,0) != Process)
+ if (ExecWait(Process,_config->Find("Dir::bin::gzip","gzip").c_str(),false) == false)
{
To.OpFail();
- return _error->Errno("wait","Waiting for gzip failed");
- }
-
- if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0)
- {
- To.OpFail();
- return _error->Error("gzip failed, perhaps the disk is full or the directory permissions are wrong.");
- }
-
+ return false;
+ }
+
To.Close();
// Transfer the modification times
diff --git a/methods/http.cc b/methods/http.cc
index 536a23b67..7a9a97a1d 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: http.cc,v 1.42 1999/12/10 08:53:43 jgg Exp $
+// $Id: http.cc,v 1.43 1999/12/10 23:40:29 jgg Exp $
/* ######################################################################
HTTP Aquire Method - This is the HTTP aquire method for APT.
@@ -635,7 +635,7 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out)
if (stat(Itm->DestFile.c_str(),&SBuf) >= 0 && SBuf.st_size > 0)
{
// In this case we send an if-range query with a range header
- sprintf(Buf,"Range: bytes=%li-\r\nIf-Range: %s\r\n",SBuf.st_size - 1,
+ sprintf(Buf,"Range: bytes=%li-\r\nIf-Range: %s\r\n",(long)SBuf.st_size - 1,
TimeRFC1123(SBuf.st_mtime).c_str());
Req += Buf;
}