diff options
Diffstat (limited to 'methods')
-rw-r--r-- | methods/ftp.cc | 15 | ||||
-rw-r--r-- | methods/makefile | 4 | ||||
-rw-r--r-- | methods/rfc2553emu.h | 9 |
3 files changed, 8 insertions, 20 deletions
diff --git a/methods/ftp.cc b/methods/ftp.cc index a7fa83233..1780ac740 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: ftp.cc,v 1.17 1999/12/09 03:45:56 jgg Exp $ +// $Id: ftp.cc,v 1.18 1999/12/10 07:21:52 jgg Exp $ /* ###################################################################### HTTP Aquire Method - This is the FTP aquire method for APT. @@ -498,18 +498,7 @@ bool FTPConn::ModTime(const char *Path, time_t &Time) return true; // Parse it - struct tm tm; - memset(&tm,0,sizeof(tm)); - if (sscanf(Msg.c_str(),"%4d%2d%2d%2d%2d%2d",&tm.tm_year,&tm.tm_mon, - &tm.tm_mday,&tm.tm_hour,&tm.tm_min,&tm.tm_sec) != 6) - return true; - - tm.tm_year -= 1900; - tm.tm_mon--; - - /* We use timegm from the GNU C library, libapt-pkg will provide this - symbol if it does not exist */ - Time = timegm(&tm); + StrToTime(Msg,Time); return true; } /*}}}*/ diff --git a/methods/makefile b/methods/makefile index addaf23c9..e8eaec230 100644 --- a/methods/makefile +++ b/methods/makefile @@ -36,14 +36,14 @@ include $(PROGRAM_H) # The http method PROGRAM=http -SLIBS = -lapt-pkg $SOCKETLIBS +SLIBS = -lapt-pkg $(SOCKETLIBS) LIB_MAKES = apt-pkg/makefile SOURCE = http.cc rfc2553emu.cc connect.cc include $(PROGRAM_H) # The ftp method PROGRAM=ftp -SLIBS = -lapt-pkg $SOCKETLIBS +SLIBS = -lapt-pkg $(SOCKETLIBS) LIB_MAKES = apt-pkg/makefile SOURCE = ftp.cc rfc2553emu.cc connect.cc include $(PROGRAM_H) diff --git a/methods/rfc2553emu.h b/methods/rfc2553emu.h index 5b9abbd84..86765b3cc 100644 --- a/methods/rfc2553emu.h +++ b/methods/rfc2553emu.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: rfc2553emu.h,v 1.2 1999/05/26 04:08:39 jgg Exp $ +// $Id: rfc2553emu.h,v 1.3 1999/12/10 07:21:52 jgg Exp $ /* ###################################################################### RFC 2553 Emulation - Provides emulation for RFC 2553 getaddrinfo, @@ -38,8 +38,6 @@ // getaddrinfo support? #ifndef HAVE_GETADDRINFO - #error Boink - // Renamed to advoid type clashing.. (for debugging) struct addrinfo_emu { @@ -50,9 +48,9 @@ size_t ai_addrlen; /* length of ai_addr */ char *ai_canonname; /* canonical name for nodename */ struct sockaddr *ai_addr; /* binary address */ - struct addrinfo *ai_next; /* next structure in linked list */ + struct addrinfo_emu *ai_next; /* next structure in linked list */ }; - #define addinfo addrinfo_emu + #define addrinfo addrinfo_emu int getaddrinfo(const char *nodename, const char *servname, const struct addrinfo *hints, @@ -73,6 +71,7 @@ #define EAI_SERVICE -7 #define EAI_ADDRFAMILY -8 #define EAI_SYSTEM -10 + #define EAI_MEMORY -11 #endif #endif |