Package: ftpgrab
Version: N/A; reported 2001-11-06

This rolls up the various changes and allows ftpgrab to build
on ia64, i386, and hppa. I make no claims as to its functionality
on any platform.

Note that the removal of the #ifndef constructs around header
file inclusions is superficial (and incomplete), but performing
that check in both the header file itself and in the including
file is pointless and error-prone.

# uncommented by CTS
#diff -Naur ftpgrab.orig/Makefile ftpgrab-0.1.2r/Makefile
#--- ftpgrab.orig/Makefile	Tue Nov  6 13:04:10 2001
#+++ ftpgrab-0.1.2r/Makefile	Wed Apr 26 23:55:16 2000
#@@ -1,4 +1,4 @@
#-CC	=	g++-2.95
#+CC	=	g++
# CFLAGS	=	-O2 -Wall
# 
# #LIBS	=	-lefence
#
#diff -Naur ftpgrab.orig/debian/control ftpgrab-0.1.2r/debian/control
#--- ftpgrab.orig/debian/control	Tue Nov  6 13:04:10 2001
#+++ ftpgrab-0.1.2r/debian/control	Tue Nov  6 13:00:42 2001
#@@ -3,7 +3,7 @@
# Priority: optional
# Maintainer: Christian T. Steigies <cts@debian.org>
# Standards-Version: 3.5.5
#-Build-Depends: debhelper, g++-2.95
#+Build-Depends: debhelper
# 
# Package: ftpgrab
# Architecture: any

diff -Naur ftpgrab.orig/fgfilegrab.cc ftpgrab-0.1.2r/fgfilegrab.cc
--- ftpgrab.orig/fgfilegrab.cc	Wed Apr 26 23:16:23 2000
+++ ftpgrab-0.1.2r/fgfilegrab.cc	Tue Nov  6 13:00:42 2001
@@ -3,49 +3,28 @@
 #include "fgfilegrab.h"
 
 // Possible protocol interface derived classes
-#ifndef _FGFTPCON_H
 #include "fgftpcon.h"
-#endif
 
 // Possible picker interface derived classes
-#ifndef _FGPICKALL_H
 #include "fgpickall.h"
-#endif
 
-#ifndef _FGPICKALLSYNC_H
 #include "fgpickallsync.h"
-#endif
-
-#ifndef _FGPICKBEST_H
 #include "fgpickbest.h"
-#endif
-
-#ifndef _FGPICKREGEXP_H
 #include "fgpickregexp.h"
-#endif
-
-#ifndef _FGPICKREGEXPSYNC_H
 #include "fgpickregexpsync.h"
-#endif
+
 
 // Directory listings
-#ifndef _FGDLIST_H
 #include "fgdlist.h"
-#endif
 
 // Local filesystem helper
-#ifndef _FGFSHELP_H
 #include "fgfshelp.h"
-#endif
 
 // Action lists
-#ifndef _FGALIST_H
 #include "fgalist.h"
-#endif
 
-#ifndef _FGLOGGER_H
 #include "fglogger.h"
-#endif
+#include "fgexc.h"
 
 #include <assert.h>
 
diff -Naur ftpgrab.orig/fgfilelist.h ftpgrab-0.1.2r/fgfilelist.h
--- ftpgrab.orig/fgfilelist.h	Wed Apr 26 23:22:24 2000
+++ ftpgrab-0.1.2r/fgfilelist.h	Tue Nov  6 13:00:42 2001
@@ -10,6 +10,7 @@
 class FGString;
 
 class FGFileList {
+friend void* ThreadStartPoint(void* pArg);
 public:
   // Constructor, desctructor
   FGFileList();
diff -Naur ftpgrab.orig/fgstring.cc ftpgrab-0.1.2r/fgstring.cc
--- ftpgrab.orig/fgstring.cc	Thu Apr 27 01:26:43 2000
+++ ftpgrab-0.1.2r/fgstring.cc	Tue Nov  6 13:00:42 2001
@@ -139,7 +139,7 @@
 }
 
 char
-FGString::operator[](unsigned int pos) const
+FGString::operator[](int pos) const
 {
   assert(pos <= mLength);
 
diff -Naur ftpgrab.orig/fgstring.h ftpgrab-0.1.2r/fgstring.h
--- ftpgrab.orig/fgstring.h	Thu Apr 27 01:25:50 2000
+++ ftpgrab-0.1.2r/fgstring.h	Tue Nov  6 13:00:42 2001
@@ -36,7 +36,7 @@
 
   // Get methods
   unsigned int GetLength(void) const;
-  char operator[](unsigned int pos) const;
+  char operator[](int pos) const;
 
   // Substring methods
   FGString Left(unsigned int num) const;
diff -Naur ftpgrab.orig/main.cc ftpgrab-0.1.2r/main.cc
--- ftpgrab.orig/main.cc	Thu Jun  1 13:42:58 2000
+++ ftpgrab-0.1.2r/main.cc	Tue Nov  6 13:00:42 2001
@@ -1,14 +1,7 @@
-#ifndef _FGSTRING_H
 #include "fgstring.h"
-#endif
-
-#ifndef _FGFILELIST_H
 #include "fgfilelist.h"
-#endif
-
-#ifndef _FGLOGGER_H
 #include "fglogger.h"
-#endif
+#include "fgexc.h"
 
 #include <stdlib.h>
 #include <unistd.h>
@@ -19,9 +12,7 @@
 #include <sys/utsname.h>
 
 // Globals
-#ifndef _FGGLOB_H
 #include "fgglob.h"
-#endif
 
 FGString FGGlob::gHostName;
 bool FGGlob::gLogDisabled = false;
@@ -86,13 +77,9 @@
     // Initialize signal handling
     struct sigaction pipeAction;
     // Safety
-    memset(&pipeAction, '\0', sizeof(pipeAction));
+    memset(&pipeAction, 0, sizeof(pipeAction));
     pipeAction.sa_handler = SIG_IGN;
     pipeAction.sa_flags = 0;
-    // Thanks to Christian T. Steigies
-#if !defined(__alpha)
-    pipeAction.sa_restorer = NULL;
-#endif
     sigemptyset(&pipeAction.sa_mask);
 
     sigaction(SIGPIPE, &pipeAction, NULL);

-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux minerva 2.2.19 #1 Sat Oct 20 18:09:49 EST 2001 i686
Locale: LANG=C, LC_CTYPE=C


