diff options
author | Jean-Yves Lefort <jylefort@FreeBSD.org> | 2005-05-22 17:35:42 +0000 |
---|---|---|
committer | Jean-Yves Lefort <jylefort@FreeBSD.org> | 2005-05-22 17:35:42 +0000 |
commit | 5dfbb203a194649eea83db41d9a63e587e5f2403 (patch) | |
tree | 56d35c28c26b590c2be98382357444248bb357f0 /security/pft | |
parent | 10093852bd94b85326e66c38b5b450b02521bd81 (diff) | |
download | ports-5dfbb203a194649eea83db41d9a63e587e5f2403.tar.gz ports-5dfbb203a194649eea83db41d9a63e587e5f2403.zip |
Notes
Diffstat (limited to 'security/pft')
-rw-r--r-- | security/pft/Makefile | 16 | ||||
-rw-r--r-- | security/pft/distinfo | 4 | ||||
-rw-r--r-- | security/pft/files/patch-Makefile | 11 | ||||
-rw-r--r-- | security/pft/files/patch-commands.h | 8 | ||||
-rw-r--r-- | security/pft/files/patch-exceptions.h | 8 | ||||
-rw-r--r-- | security/pft/files/patch-fxstrings.cpp | 45 | ||||
-rw-r--r-- | security/pft/files/patch-fxstrings.h | 8 | ||||
-rw-r--r-- | security/pft/files/patch-llist.cpp | 17 | ||||
-rw-r--r-- | security/pft/files/patch-llist.h | 8 | ||||
-rw-r--r-- | security/pft/files/patch-pft:Makefile | 9 | ||||
-rw-r--r-- | security/pft/files/patch-pft:main.cpp | 127 | ||||
-rw-r--r-- | security/pft/files/patch-pft_main.cpp | 10 | ||||
-rw-r--r-- | security/pft/files/patch-pjllists.cpp | 15 | ||||
-rw-r--r-- | security/pft/files/patch-pjllists.h | 8 | ||||
-rw-r--r-- | security/pft/files/patch-pjlsession.cpp | 411 | ||||
-rw-r--r-- | security/pft/files/patch-pjlsession.h | 21 | ||||
-rw-r--r-- | security/pft/files/patch-rawmem.cpp | 24 | ||||
-rw-r--r-- | security/pft/files/patch-rawmem.h | 8 | ||||
-rw-r--r-- | security/pft/files/patch-tcpcon.cpp | 158 | ||||
-rw-r--r-- | security/pft/files/patch-tcpcon.h | 17 | ||||
-rw-r--r-- | security/pft/pkg-plist | 2 |
21 files changed, 33 insertions, 902 deletions
diff --git a/security/pft/Makefile b/security/pft/Makefile index 7e584b68b8a1..7bb8426af8a9 100644 --- a/security/pft/Makefile +++ b/security/pft/Makefile @@ -6,7 +6,7 @@ # PORTNAME= pft -PORTVERSION= 1.2 +PORTVERSION= 1.3 CATEGORIES= security MASTER_SITES= http://www.phenoelit.de/hp/ DISTNAME= libPJL-${PORTVERSION}-src @@ -17,13 +17,21 @@ COMMENT= Printer Job Language library and tool NO_WRKSUBDIR= yes ALL_TARGET= libPJL.a +USE_REINPLACE= yes USE_GMAKE= yes +MAKE_ENV= CXX="${CXX}" + +PLIST_FILES= bin/pft lib/libPJL.a + +post-patch: + @${REINPLACE_CMD} -e 's|g++|${CXX} ${CXXFLAGS}|' \ + ${WRKSRC}/pft/Makefile post-build: - @cd ${WRKSRC}/pft; ${GMAKE} pft + @(cd ${WRKSRC}/pft; ${SETENV} ${MAKE_ENV} ${GMAKE} pft) do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/pft/pft ${PREFIX}/bin/ - ${INSTALL_DATA} ${WRKSRC}/libPJL.a ${PREFIX}/lib/ + ${INSTALL_PROGRAM} ${WRKSRC}/pft/pft ${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/libPJL.a ${PREFIX}/lib .include <bsd.port.mk> diff --git a/security/pft/distinfo b/security/pft/distinfo index 57dc49de074f..1d72ea28edf9 100644 --- a/security/pft/distinfo +++ b/security/pft/distinfo @@ -1,2 +1,2 @@ -MD5 (libPJL-1.2-src.tgz) = 51aba61d1cbfde5c31278bfb41bafdbb -SIZE (libPJL-1.2-src.tgz) = 73194 +MD5 (libPJL-1.3-src.tgz) = dfbba7e711c5e9af05cf119648b96283 +SIZE (libPJL-1.3-src.tgz) = 73227 diff --git a/security/pft/files/patch-Makefile b/security/pft/files/patch-Makefile deleted file mode 100644 index bc7738925407..000000000000 --- a/security/pft/files/patch-Makefile +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.orig Wed Jan 30 14:47:32 2002 -+++ Makefile Thu Aug 5 19:29:52 2004 -@@ -3,7 +3,7 @@ - # - # - --CPPFLAGS= -Wall -g -DUNIX -D_DEBUG -+CPPFLAGS= -Wall -g -DUNIX -D_DEBUG ${CXXFLAGS} - AR=ar rcs - RM=rm -f - diff --git a/security/pft/files/patch-commands.h b/security/pft/files/patch-commands.h deleted file mode 100644 index ba262898bb6d..000000000000 --- a/security/pft/files/patch-commands.h +++ /dev/null @@ -1,8 +0,0 @@ ---- commands.h.orig Thu Aug 5 13:31:46 2004 -+++ commands.h Thu Aug 5 13:31:54 2004 -@@ -31,4 +31,4 @@ - #define PJLFS_FILE 1 - - --#endif __COMMANDS_H__ -+#endif // __COMMANDS_H__ diff --git a/security/pft/files/patch-exceptions.h b/security/pft/files/patch-exceptions.h deleted file mode 100644 index 06284267f2b1..000000000000 --- a/security/pft/files/patch-exceptions.h +++ /dev/null @@ -1,8 +0,0 @@ ---- exceptions.h.orig Thu Aug 5 13:32:19 2004 -+++ exceptions.h Thu Aug 5 13:32:30 2004 -@@ -16,4 +16,4 @@ - class ExInvalid{}; - }; - --#endif __EXCPETIONS_H__ -+#endif // __EXCPETIONS_H__ diff --git a/security/pft/files/patch-fxstrings.cpp b/security/pft/files/patch-fxstrings.cpp deleted file mode 100644 index 3eb6b4b51133..000000000000 --- a/security/pft/files/patch-fxstrings.cpp +++ /dev/null @@ -1,45 +0,0 @@ ---- fxstrings.cpp.orig Sat Jul 6 18:36:20 2002 -+++ fxstrings.cpp Thu Aug 5 15:17:58 2004 -@@ -3,12 +3,14 @@ - * $Id: fxstrings.cpp,v 1.3 2002/01/19 19:23:50 fx Exp $ - */ - --#include <iostream.h> -+#include <iostream> - #include <string.h> - #include <stdlib.h> - - #include "fxstrings.h" - -+using namespace std; -+ - /* Initializes the protected variables */ - String::String(void) { - str=NULL; -@@ -58,7 +60,7 @@ - if ((str=(char*)malloc(strlen(s)+1))==NULL) { - #ifdef _DEBUG - cerr << "String::set(): malloc failed\n"; --#endif _DEBUG -+#endif // _DEBUG - throw ExMalloc(); - } - memset(str,0,strlen(s)+1); -@@ -79,7 +81,7 @@ - if ((p=(char *)malloc(length+1))==NULL) { - #ifdef _DEBUG - cerr << "String::set(char,len): malloc failed\n" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExMalloc(); - } - -@@ -93,7 +95,7 @@ - if ((str=(char*)malloc(strlen(p)+1))==NULL) { - #ifdef _DEBUG - cerr << "String::set(char,len): malloc failed\n"; --#endif _DEBUG -+#endif // _DEBUG - throw ExMalloc(); - } - memset(str,0,strlen(p)+1); diff --git a/security/pft/files/patch-fxstrings.h b/security/pft/files/patch-fxstrings.h deleted file mode 100644 index 2ccdcd17a05c..000000000000 --- a/security/pft/files/patch-fxstrings.h +++ /dev/null @@ -1,8 +0,0 @@ ---- fxstrings.h.orig Thu Aug 5 13:34:15 2004 -+++ fxstrings.h Thu Aug 5 13:34:26 2004 -@@ -64,4 +64,4 @@ - }; - - --#endif __FXSTRINGS_H__ -+#endif // __FXSTRINGS_H__ diff --git a/security/pft/files/patch-llist.cpp b/security/pft/files/patch-llist.cpp deleted file mode 100644 index 57f03c369343..000000000000 --- a/security/pft/files/patch-llist.cpp +++ /dev/null @@ -1,17 +0,0 @@ ---- llist.cpp.orig Sat Jul 6 18:36:20 2002 -+++ llist.cpp Thu Aug 5 15:22:51 2004 -@@ -4,11 +4,13 @@ - * $Id: llist.cpp,v 1.2 2002/01/07 17:18:49 fx Exp $ - */ - --#include <iostream.h> -+#include <iostream> - #include <string.h> - #include <stdlib.h> - - #include "llist.h" -+ -+using namespace std; - - LinkList::LinkList() { - anchor=current=NULL; diff --git a/security/pft/files/patch-llist.h b/security/pft/files/patch-llist.h deleted file mode 100644 index cedbd571457c..000000000000 --- a/security/pft/files/patch-llist.h +++ /dev/null @@ -1,8 +0,0 @@ ---- llist.h.orig Thu Aug 5 13:37:24 2004 -+++ llist.h Thu Aug 5 13:37:32 2004 -@@ -88,4 +88,4 @@ - }; - - --#endif __LLIST_H__ -+#endif // __LLIST_H__ diff --git a/security/pft/files/patch-pft:Makefile b/security/pft/files/patch-pft:Makefile deleted file mode 100644 index 465a66368c4b..000000000000 --- a/security/pft/files/patch-pft:Makefile +++ /dev/null @@ -1,9 +0,0 @@ ---- pft/Makefile.orig Mon Jan 7 17:15:36 2002 -+++ pft/Makefile Thu Aug 5 19:31:12 2004 -@@ -1,5 +1,5 @@ - CPP=g++ --CPPFLAGS= -Wall -g -DUNIX -L../ -I../ -+CPPFLAGS= -Wall -g -DUNIX -L../ -I../ ${CXXFLAGS} - DEBUGGING= -D_DEBUG - AR=ar rcs - RM=rm -f diff --git a/security/pft/files/patch-pft:main.cpp b/security/pft/files/patch-pft:main.cpp deleted file mode 100644 index fe0708c6ece2..000000000000 --- a/security/pft/files/patch-pft:main.cpp +++ /dev/null @@ -1,127 +0,0 @@ ---- pft/main.cpp.orig Sat Jul 6 18:36:30 2002 -+++ pft/main.cpp Thu Aug 5 19:33:12 2004 -@@ -8,7 +8,7 @@ - * - * $Id: main.cpp,v 1.8 2002/07/06 15:36:29 fx Exp fx $ - */ --#include <iostream.h> -+#include <iostream> - #include <stdio.h> // cant live without printf() ;) - - #ifndef UNIX -@@ -27,12 +27,15 @@ - #include <sys/types.h> // open(), close(), write() - #include <sys/stat.h> - #include <fcntl.h> --#endif UNIX -+#include <string.h> // memset() -+#endif // UNIX - - #include "fxstrings.h" - #include "pjlsession.h" - #include "commands.h" - -+using namespace std; -+ - #define SPLASH "PFT - PJL file transfer\n" \ - "\tFX of Phenoelit <fx@phenoelit.de>\n"\ - "\tVersion 0.7 ($Revision: 1.8 $)\n" -@@ -89,7 +92,7 @@ - void commandline_ident(void); - #ifdef UNIX - void sighandl(int s); --#endif UNIX -+#endif // UNIX - - - class Program_config { -@@ -102,7 +105,7 @@ - bool pause; - #ifdef UNIX - bool ctrlc; --#endif UNIX -+#endif // UNIX - }; - - Program_config cfg; -@@ -122,7 +125,7 @@ - } - #else - cfg.lpwd=_getcwd(NULL,0); --#endif UNIX -+#endif // UNIX - - if (argc>3) { - usage(argv[0]); -@@ -148,7 +151,7 @@ - void sighandl(int s) { - cfg.ctrlc=true; - } --#endif UNIX -+#endif // UNIX - - void cmdloop(void) { - String cmd; -@@ -209,7 +212,7 @@ - #ifdef UNIX - // endable default handler for ctrl-c during connect() call - signal(SIGINT,SIG_DFL); --#endif UNIX -+#endif // UNIX - - - if (sess.connected()) { -@@ -238,7 +241,7 @@ - } - #ifdef UNIX - signal(SIGINT,&sighandl); --#endif UNIX -+#endif // UNIX - } - - // close connection -@@ -486,7 +489,7 @@ - if (_kbhit()) break; - #else - if (cfg.ctrlc) break; --#endif UNIX -+#endif // UNIX - - if (++di==dx) { - cout << "try " << p << endl; -@@ -523,7 +526,7 @@ - if (_kbhit()) break; - #else - if (cfg.ctrlc) break; --#endif UNIX -+#endif // UNIX - } - - // env invalid -@@ -826,7 +829,7 @@ - } else { - cerr << "lcd failed" << endl; - } --#endif UNIX -+#endif // UNIX - } - // get command - else if (basecmd==CMD_GET) { -@@ -949,7 +952,7 @@ - cout << sess.filebuffer.length() - << " bytes read from local file " << cmd.token(' ',1)<< endl; - } --#endif UNIX -+#endif // UNIX - - try { - sess.append_file(targ.get()); -@@ -1193,7 +1196,7 @@ - #ifdef UNIX - // endable default handler for ctrl-c during connect() call - signal(SIGINT,SIG_DFL); --#endif UNIX -+#endif // UNIX - - try { - sess.initiate(cfg.server.get(),cfg.port); diff --git a/security/pft/files/patch-pft_main.cpp b/security/pft/files/patch-pft_main.cpp new file mode 100644 index 000000000000..66cc7edae26a --- /dev/null +++ b/security/pft/files/patch-pft_main.cpp @@ -0,0 +1,10 @@ +--- pft/main.cpp.orig Tue Jan 4 13:01:00 2005 ++++ pft/main.cpp Sun May 22 19:22:22 2005 +@@ -28,6 +28,7 @@ + #include <sys/types.h> // open(), close(), write() + #include <sys/stat.h> + #include <fcntl.h> ++#include <string.h> + #endif //UNIX + + #include "fxstrings.h" diff --git a/security/pft/files/patch-pjllists.cpp b/security/pft/files/patch-pjllists.cpp deleted file mode 100644 index 9f0bb171a598..000000000000 --- a/security/pft/files/patch-pjllists.cpp +++ /dev/null @@ -1,15 +0,0 @@ ---- pjllists.cpp.orig Thu Aug 5 15:21:00 2004 -+++ pjllists.cpp Thu Aug 5 15:21:15 2004 -@@ -2,9 +2,11 @@ - * - * $Id: pjllists.cpp,v 1.3 2002/07/05 16:41:26 fx Exp $ - */ --#include <iostream.h> -+#include <iostream> - - #include "pjllists.h" -+ -+using namespace std; - - /* ************************** - * PJLenv diff --git a/security/pft/files/patch-pjllists.h b/security/pft/files/patch-pjllists.h deleted file mode 100644 index 103f91131732..000000000000 --- a/security/pft/files/patch-pjllists.h +++ /dev/null @@ -1,8 +0,0 @@ ---- pjllists.h.orig Thu Aug 5 13:38:09 2004 -+++ pjllists.h Thu Aug 5 13:38:19 2004 -@@ -152,4 +152,4 @@ - }; - - --#endif __PJLLISTS_H__ -+#endif // __PJLLISTS_H__ diff --git a/security/pft/files/patch-pjlsession.cpp b/security/pft/files/patch-pjlsession.cpp index 9aab242e0e0d..8761fc802750 100644 --- a/security/pft/files/patch-pjlsession.cpp +++ b/security/pft/files/patch-pjlsession.cpp @@ -1,412 +1,11 @@ ---- pjlsession.cpp.orig Sat Jul 6 18:36:21 2002 -+++ pjlsession.cpp Mon Aug 9 11:39:10 2004 -@@ -3,7 +3,7 @@ - * - * $Id: pjlsession.cpp,v 1.7 2002/07/05 16:41:26 fx Exp $ - */ --#include <iostream.h> -+#include <iostream> - #include <stdio.h> - #include <stdlib.h> - -@@ -21,13 +21,14 @@ - #include <sys/types.h> // open(), close(), write() - #include <sys/stat.h> - #include <fcntl.h> --#endif UNIX -+#endif // UNIX - - - #include "pjlsession.h" - #include "pjllists.h" - #include "commands.h" - -+using namespace std; - - PJLsession::PJLsession() { - // nothing so far -@@ -69,7 +70,7 @@ - if (ts.stoken("@PJL INFO VARIABLES",0)==NULL) { - #ifdef _DEBUG - cerr << "PJLsession::read_env(): did not receive command echo" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } - -@@ -167,7 +168,7 @@ - if (ts.stoken("@PJL INFO ID",0)==NULL) { - #ifdef _DEBUG - cerr << "PJLsession::read_devive_id(): did not receive command echo" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } - -@@ -186,7 +187,7 @@ - _snprintf(numb,49,"%u",pass); - #else - snprintf(numb,49,"%u",pass); --#endif UNIX -+#endif // UNIX - - connection.clear(); - connection.sendbuf.set(PJL_START); -@@ -206,7 +207,7 @@ - if (ts.findstr("@PJL DINQUIRE PASSWORD")==NULL) { - #ifdef _DEBUG - cerr << "PJLsession::disable_pjl_password(): did not receive command echo" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } - -@@ -219,7 +220,7 @@ - - #ifdef _DEBUG - cerr << "PJLsession::disable_pjl_password(): DINQUIRE didn't return result" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - - } -@@ -234,7 +235,7 @@ - _snprintf(numb,49,"%u",pass); - #else - snprintf(numb,49,"%u",pass); --#endif UNIX -+#endif // UNIX - - connection.clear(); - connection.sendbuf.set(PJL_START); -@@ -277,7 +278,7 @@ - if (ts.findstr("@PJL DINQUIRE PASSWORD")==NULL) { - #ifdef _DEBUG - cerr << "PJLsession::chk_pjl_password(): did not receive command echo" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } - -@@ -290,7 +291,7 @@ - - #ifdef _DEBUG - cerr << "PJLsession::chk_pjl_password(): DINQUIRE didn't return result" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - - } -@@ -353,7 +354,7 @@ - if (ts.stoken("@PJL INFO FILESYS",0)==NULL) { - #ifdef _DEBUG - cerr << "PJLsession::read_volumes(): did not receive command echo" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } - -@@ -404,14 +405,14 @@ - if (ts.stoken("@PJL FSDIRLIST",0)==NULL) { - #ifdef _DEBUG - cerr << "PJLsession::read_dir(): did not receive command echo" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } - - if (ts.stoken("\r\n",1)==NULL) { - #ifdef _DEBUG - cerr << "PJLsession::read_dir(): strange! got echo but no more lines" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } else { - String err=ts.stoken("\r\n",1); -@@ -419,7 +420,7 @@ - if (err.findstr("FILEERROR")!=NULL) { - #ifdef _DEBUG - cerr << "PJLsession::read_dir(): Filesystem error " << err.token('=',1) << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } - } -@@ -495,7 +496,7 @@ - if (ts.findstr("@PJL FSQUERY")==NULL) { - #ifdef _DEBUG - cerr << "PJLsession::stat(): did not receive command echo" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } - -@@ -514,7 +515,7 @@ - #ifdef _DEBUG - cerr << "PJLsession::stat(): strange answer: '" - << ts.get() << "'" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } - // failure ... -@@ -524,13 +525,13 @@ - if (err.findstr("FILEERROR")!=NULL) { - #ifdef _DEBUG - cerr << "PJLsession::stat(): Filesystem error " << err.token('=',1) << endl; --#endif _DEBUG -+#endif // _DEBUG - return (-1); - } else { - #ifdef _DEBUG - cerr << "PJLsession::does_exist(): strange answer: '" - << ts.get() << "'" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } - } -@@ -578,7 +579,7 @@ - _snprintf(numb,49,"%u",expsize); - #else - snprintf(numb,49,"%u",expsize); --#endif UNIX -+#endif // UNIX - - filebuffer.clear(); - connection.clear(); -@@ -602,7 +603,7 @@ - if (ts.findstr("@PJL FSUPLOAD")==NULL) { - #ifdef _DEBUG - cerr << "PJLsession::recv_file(): did not receive command echo" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } - if (ts.findstr("SIZE=")==NULL) { -@@ -614,13 +615,13 @@ - if (ts.findstr("FILEERROR")!=NULL) { - #ifdef _DEBUG - cerr << "PJLsession::recv_file(): Filesystem error " << ts.token('=',1) << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } else { - #ifdef _DEBUG - cerr << "PJLsession::recv_file(): strange answer: '" - << ts.get() << "'" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } - } else { -@@ -633,7 +634,7 @@ - fsi=fsi.token('=',1); - #ifdef _DEBUG - //cout << "DEBUG: expected size: " << expsize << ", reported: " << atoi(fsi.get()) << endl; --#endif _DEBUG -+#endif // _DEBUG - - // timeout depends on size (of course) ;) - connection.recvatleast((unsigned int)atoi(fsi.get()), -@@ -658,7 +659,7 @@ - if ((fd=open(filename,_O_WRONLY | _O_CREAT | _O_TRUNC | _O_BINARY))<0) { - #ifdef _DEBUG - cerr << "PJLsession::recv_file(): Could not open local file "<<filename<<endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExInvalid(); - } - #else -@@ -666,10 +667,10 @@ - if ((fd=open(filename,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP))<0) { - #ifdef _DEBUG - cerr << "PJLsession::recv_file(): Could not open local file "<<filename<<endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExInvalid(); - } --#endif UNIX -+#endif // UNIX - - connection.clear(); - connection.sendbuf.set(PJL_START); -@@ -692,7 +693,7 @@ - if (ts.findstr("@PJL FSUPLOAD")==NULL) { - #ifdef _DEBUG - cerr << "PJLsession::recv_file(): did not receive command echo" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } - if (ts.findstr("SIZE=")==NULL) { -@@ -704,13 +705,13 @@ - if (ts.findstr("FILEERROR")!=NULL) { - #ifdef _DEBUG - cerr << "PJLsession::recv_file(): Filesystem error " << ts.token('=',1) << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } else { - #ifdef _DEBUG - cerr << "PJLsession::recv_file(): strange answer: '" - << ts.get() << "'" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExPJLerror(); - } - } else { -@@ -723,7 +724,7 @@ - fsi=fsi.token('=',1); - #ifdef _DEBUG - //cout << "DEBUG: expected size: " << expsize << ", reported: " << atoi(fsi.get()) << endl; --#endif _DEBUG -+#endif // _DEBUG - - - for (unsigned int i=0;i<expsize;i++) { -@@ -735,7 +736,7 @@ - if ((bw=_write(fd,connection.recvbuf.get(),connection.recvbuf.length()))<0) { - #ifdef _DEBUG - cerr << "PJLsession::recv_file(): _write() to local file failed" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExInvalid(); - } - } catch (TCPcon::ExTimeout) { -@@ -746,14 +747,14 @@ - if ((bw=write(fd,connection.recvbuf.get(),connection.recvbuf.length()))<0) { - #ifdef _DEBUG - cerr << "PJLsession::recv_file(): _write() to local file failed" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExInvalid(); - } - } catch (TCPcon::ExTimeout) { -- std::close(fd); -+ ::close(fd); - } - } --#endif UNIX -+#endif // UNIX - - connection.recvbuf.clear(); - // recv the final <FF> (\x0c) from device and discard it -@@ -771,7 +772,7 @@ - _snprintf(numb,49,"%u",filebuffer.length()); - #else - snprintf(numb,49,"%u",filebuffer.length()); --#endif UNIX -+#endif // UNIX - - connection.clear(); - connection.sendbuf.set(PJL_START); -@@ -808,7 +809,7 @@ - #ifdef _DEBUG - cerr << "PJLsession::send_file(2): could not stat file " - << filename << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExInvalid(); - } - -@@ -817,7 +818,7 @@ - #ifdef _DEBUG - cerr << "PJLsession::send_file(2) Could not open local file " - << filename <<endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExInvalid(); - } else { - _snprintf(numb,49,"%u",statbuf.st_size); -@@ -854,11 +855,11 @@ - int fd,br=0; - char rb[1025]; - -- if (std::stat(filename,&statbuf)!=0) { -+ if (::stat(filename,&statbuf)!=0) { - #ifdef _DEBUG - cerr << "PJLsession::send_file(2): could not stat file " - << filename << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExInvalid(); - } - -@@ -866,10 +867,10 @@ - #ifdef _DEBUG - cerr << "PJLsession::send_file(2) Could not open local file " - << filename <<endl; --#endif _DEBUG -+#endif // _DEBUG +--- pjlsession.cpp.orig Sun May 22 14:06:23 2005 ++++ pjlsession.cpp Sun May 22 14:06:52 2005 +@@ -871,7 +871,7 @@ + #endif //_DEBUG throw ExInvalid(); } else { - snprintf(numb,49,"%lu",statbuf.st_size); -+ snprintf(numb,49,"%lu",(long int)statbuf.st_size); ++ snprintf(numb,49,"%llu",statbuf.st_size); connection.clear(); connection.sendbuf.set(PJL_START); connection.sendbuf.append(PJL_FSDOWNLOAD); -@@ -885,12 +886,12 @@ - connection.sendbuf.set(rb,br); - connection.senddata(); - } -- std::close(fd); -+ ::close(fd); - } - connection.clear(); - } - --#endif UNIX -+#endif // UNIX - - - void PJLsession::append_file(char *str) { -@@ -900,7 +901,7 @@ - _snprintf(numb,49,"%u",filebuffer.length()); - #else - snprintf(numb,49,"%u",filebuffer.length()); --#endif UNIX -+#endif // UNIX - - connection.clear(); - connection.sendbuf.set(PJL_START); -@@ -942,7 +943,7 @@ - #ifdef _DEBUG - cerr << "PJLsession::upload_RFU_firmware() Could not open local file " - << rfu_file <<endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExInvalid(); - } else { - while ((br=_read(fd,rb,1024))>0) { -@@ -960,7 +961,7 @@ - #ifdef _DEBUG - cerr << "PJLsession::upload_RFU_firmware() Could not open local file " - << rfu_file <<endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExInvalid(); - } else { - while ((br=read(fd,rb,1024))>0) { -@@ -968,10 +969,10 @@ - connection.sendbuf.set(rb,br); - connection.senddata(); - } -- std::close(fd); -+ ::close(fd); - } - --#endif UNIX -+#endif // UNIX - - connection.clear(); - } -@@ -1016,7 +1017,7 @@ - if ((sttype==0)||(sttype>7)) { - #ifdef _DEBUG - cerr << "PJLsession::print_selftest(): out of range" << endl; --#endif _DEBUG -+#endif // _DEBUG - throw ExInvalid(); - } - diff --git a/security/pft/files/patch-pjlsession.h b/security/pft/files/patch-pjlsession.h deleted file mode 100644 index 71f886634cf7..000000000000 --- a/security/pft/files/patch-pjlsession.h +++ /dev/null @@ -1,21 +0,0 @@ ---- pjlsession.h.orig Sat Jul 6 18:36:21 2002 -+++ pjlsession.h Thu Aug 5 15:25:00 2004 -@@ -70,10 +70,10 @@ - - // reads the volume information from device - void read_volumes(void); -- // reads an directory into the dir list -+ /* reads an directory into the dir list - // this method expects an absolute directory - // path like 0:\webserver\ -- // it also updates pwd (which can be see by get_pwd() -+ // it also updates pwd (which can be see by get_pwd() */ - void read_dir(char *str); - // returns the existence of a file or directory (return - // type is one of PJLFS_* or -1 for not found -@@ -133,4 +133,4 @@ - }; - - --#endif __PJLSESSION_H__ -+#endif // __PJLSESSION_H__ diff --git a/security/pft/files/patch-rawmem.cpp b/security/pft/files/patch-rawmem.cpp index 0279e9a8d7ff..0bb36edf3d1d 100644 --- a/security/pft/files/patch-rawmem.cpp +++ b/security/pft/files/patch-rawmem.cpp @@ -1,27 +1,11 @@ ---- rawmem.cpp.orig Sat Jul 6 18:36:21 2002 -+++ rawmem.cpp Thu Aug 5 18:53:38 2004 -@@ -2,7 +2,7 @@ - * - * $Id: rawmem.cpp,v 1.2 2002/01/07 17:18:49 fx Exp $ - */ --#include <iostream.h> -+#include <iostream> - #include <stdio.h> - #include <string.h> - #include <stdlib.h> -@@ -10,10 +10,14 @@ +--- rawmem.cpp.orig Sun May 22 19:17:40 2005 ++++ rawmem.cpp Sun May 22 19:18:34 2005 +@@ -11,6 +11,8 @@ #ifndef UNIX #include <winsock2.h> #else +#include <sys/types.h> +#include <sys/socket.h> #include <netinet/in.h> --#endif UNIX -+#endif // UNIX + #endif //UNIX - #include "rawmem.h" -+ -+using namespace std; - - Rawmem::Rawmem() { - mem=NULL; diff --git a/security/pft/files/patch-rawmem.h b/security/pft/files/patch-rawmem.h deleted file mode 100644 index 37448ca690f1..000000000000 --- a/security/pft/files/patch-rawmem.h +++ /dev/null @@ -1,8 +0,0 @@ ---- rawmem.h.orig Thu Aug 5 13:40:01 2004 -+++ rawmem.h Thu Aug 5 13:40:10 2004 -@@ -52,4 +52,4 @@ - - }; - --#endif __RAWMEM_H__ -+#endif // __RAWMEM_H__ diff --git a/security/pft/files/patch-tcpcon.cpp b/security/pft/files/patch-tcpcon.cpp deleted file mode 100644 index cb564223d886..000000000000 --- a/security/pft/files/patch-tcpcon.cpp +++ /dev/null @@ -1,158 +0,0 @@ ---- tcpcon.cpp.orig Sat Jul 6 18:36:21 2002 -+++ tcpcon.cpp Thu Aug 5 18:54:27 2004 -@@ -2,7 +2,7 @@ - * - * $Id: tcpcon.cpp,v 1.2 2002/01/07 17:18:49 fx Exp $ - */ --#include <iostream.h> -+#include <iostream> - #include <string.h> - #include <time.h> - -@@ -17,15 +17,17 @@ - // defined on Windows but not on UNIX - #define INVALID_SOCKET (-1) - #define SOCKET_ERROR (-1) --#endif UNIX -+#endif // UNIX - - #include "tcpcon.h" - -+using namespace std; -+ - TCPcon::TCPcon() { - #ifndef UNIX - WORD wVersionRequested; - WSADATA wsaData; --#endif UNIX -+#endif // UNIX - - // initialize values - memset(&dest,0,sizeof(dest)); -@@ -40,10 +42,10 @@ - if (WSAStartup(wVersionRequested, &wsaData)!=0) { - #ifdef _DEBUG - cerr << "TCPcon::TCPcon() starting WSA failed\n"; --#endif _DEBUG -+#endif // _DEBUG - throw ExWinSock(); - } --#endif UNIX -+#endif // UNIX - } - - -@@ -51,7 +53,7 @@ - if (connected) closeconnection(); - #ifndef UNIX - WSACleanup(); --#endif UNIX -+#endif // UNIX - } - - -@@ -61,7 +63,7 @@ - if ((he=gethostbyname(host))==NULL) { - #ifdef _DEBUG - cerr << "TCPcon::set_host(): gethostbyname() failed\n"; --#endif _DEBUG -+#endif // _DEBUG - throw ExResolver(); - } - -@@ -75,7 +77,7 @@ - if ((port<=0)||(port>65535)) { - #ifdef _DEBUG - cerr << "TCPcon::set_port(): port out of range\n"; --#endif _DEBUG -+#endif // _DEBUG - throw ExInvalid(); - } - dest.sin_port=htons(port); -@@ -92,21 +94,21 @@ - if ( ntohs(*((unsigned short *)(&(dest.sin_port))))==0 ) { - #ifdef _DEBUG - cerr << "TCPcon::startconnection(): port not set\n"; --#endif _DEBUG -+#endif // _DEBUG - throw ExInvalid(); - } - - if ((sfd=socket(AF_INET,SOCK_STREAM,0))==INVALID_SOCKET) { - #ifdef _DEBUG - cerr << "TCPcon::startconnection(): socket() failed\n"; --#endif _DEBUG -+#endif // _DEBUG - throw ExSocket(); - } - - if (connect(sfd,(struct sockaddr *)&dest,sizeof(dest))!=0) { - #ifdef _DEBUG - cerr << "TCPcon::startconnection(): connect() failed\n"; --#endif _DEBUG -+#endif // _DEBUG - throw ExSocket(); - } - -@@ -120,7 +122,7 @@ - closesocket(sfd); - #else - close(sfd); --#endif UNIX -+#endif // UNIX - } - connected=false; - } -@@ -152,14 +154,14 @@ - if (sendbuf.length()==0) { - #ifdef _DEBUG - cerr << "TCPcon::send(): send buffer empty\n"; --#endif _DEBUG -+#endif // _DEBUG - throw ExInvalid(); - } - - if (send(sfd,(char *)sendbuf.get(),sendbuf.length(),0)==SOCKET_ERROR) { - #ifdef _DEBUG - cerr << "TCPcon::send(): send() failed\n"; --#endif _DEBUG -+#endif // _DEBUG - throw ExSocket(); - } - } -@@ -173,7 +175,7 @@ - if ((tp=(char *)malloc(TPSIZE))==NULL) { - #ifdef _DEBUG - cerr << "TCPcon::recvdata(): malloc() failed\n"; --#endif _DEBUG -+#endif // _DEBUG - throw ExMalloc(); - } - -@@ -240,7 +242,7 @@ - throw ExTimeout(); - #ifdef _DEBUG - cerr << "TCPcon::recvuntilchr(): timed out\n"; --#endif _DEBUG -+#endif // _DEBUG - } - } - -@@ -263,7 +265,7 @@ - throw ExTimeout(); - #ifdef _DEBUG - cerr << "TCPcon::recvuntilstr(): timed out\n"; --#endif _DEBUG -+#endif // _DEBUG - } - } - -@@ -286,7 +288,7 @@ - throw ExTimeout(); - #ifdef _DEBUG - cerr << "TCPcon::recvatleast(): timed out\n"; --#endif _DEBUG -+#endif // _DEBUG - } - } - diff --git a/security/pft/files/patch-tcpcon.h b/security/pft/files/patch-tcpcon.h deleted file mode 100644 index 6031e5a188f8..000000000000 --- a/security/pft/files/patch-tcpcon.h +++ /dev/null @@ -1,17 +0,0 @@ ---- tcpcon.h.orig Thu Aug 5 13:40:47 2004 -+++ tcpcon.h Thu Aug 5 13:40:58 2004 -@@ -9,7 +9,7 @@ - #else - #include <netinet/in.h> - #include <sys/time.h> --#endif UNIX -+#endif // UNIX - - #include "rawmem.h" - #include "exceptions.h" -@@ -101,4 +101,4 @@ - bool connected; - }; - --#endif __TCPCON_H__ -+#endif // __TCPCON_H__ diff --git a/security/pft/pkg-plist b/security/pft/pkg-plist index e27a4458e8c4..e69de29bb2d1 100644 --- a/security/pft/pkg-plist +++ b/security/pft/pkg-plist @@ -1,2 +0,0 @@ -bin/pft -lib/libPJL.a |