FreeBSD Bugzilla – Attachment 194365 Details for
Bug 229115
sysutils/bbcp: Fix build, mark Un'BROKEN
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
svn diff for sysutils/bbcp
sysutils_bbcp.diff (text/plain), 44.63 KB, created by
Chris Hutchinson
on 2018-06-18 17:16:03 UTC
(
hide
)
Description:
svn diff for sysutils/bbcp
Filename:
MIME Type:
Creator:
Chris Hutchinson
Created:
2018-06-18 17:16:03 UTC
Size:
44.63 KB
patch
obsolete
>Index: bbcp/Makefile >=================================================================== >--- bbcp/Makefile (revision 472669) >+++ bbcp/Makefile (working copy) >@@ -3,6 +3,7 @@ > > PORTNAME= bbcp > PORTVERSION= 20150116 >+PORTREVISION= 1 > CATEGORIES= sysutils net > MASTER_SITES= http://BSDforge.com/projects/source/sysutils/bbcp/ > >@@ -13,9 +14,10 @@ > LICENSE_FILE= ${WRKSRC}/src/COPYING.LESSER > > USES= tar:xz >+USE_CXXSTD= c++98 > > PLIST_FILES= bin/bbcp >-PORTDOCS= ${PORTNAME}.pdf >+PORTDOCS= FREEBSDUSERS ${PORTNAME}.pdf > > BUILD_WRKSRC= ${WRKSRC}/src > >@@ -28,7 +30,21 @@ > do-install: > ${INSTALL_PROGRAM} ${WRKSRC}/bin/FreeBSD/bbcp ${STAGEDIR}${PREFIX}/bin > @${MKDIR} ${STAGEDIR}${DOCSDIR} >+ ${INSTALL_DATA} ${FILESDIR}/FREEBSDUSERS \ >+ ${STAGEDIR}${DOCSDIR}/FREEBSDUSERS > ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.pdf \ > ${STAGEDIR}${DOCSDIR}/${PORTNAME}.pdf > >+post-install: >+ @${ECHO_MSG} "********************************************************" >+ @${ECHO_MSG} "* IMPORTANT IMPORTANT *" >+ @${ECHO_MSG} "********************************************************" >+ @${ECHO_MSG} "* Please read ${DOCSDIR}/FREEBSDUSERS" >+ @${ECHO_MSG} "* for valuable information regarding some of the" >+ @${ECHO_MSG} "* problems users have reported running ${PORTNAME} on" >+ @${ECHO_MSG} "* FreeBSD, and the solutions to many, if not all" >+ @${ECHO_MSG} "* of them." >+ @${ECHO_MSG} "*" >+ @${ECHO_MSG} "********************************************************" >+ > .include <bsd.port.mk> >Index: bbcp/files/FREEBSDUSERS >=================================================================== >--- bbcp/files/FREEBSDUSERS (nonexistent) >+++ bbcp/files/FREEBSDUSERS (working copy) >@@ -0,0 +1,58 @@ >+First off a HUGE thanks go out to fjwcash@ >+for his relentless, and tireless work with this. I can't thank you enough! >+ >+That said, and for all others whom claim it doesn't work; >+The answer(s) are as follows: >+ >+The following makes things work: >+ >+On the receiving server: >+ sysctl net.inet6.ip6.v6only=0 >+ install bbcp-20150116.txz >+ >+On the sending server: >+ sysctl net.inet6.ip6.v6only=0 >+ install bbcp-20150116.txz >+ add "-4 c" to the start of the bbcp command >+ >+With the above, I am able to use the latest version of the bbcp package >+to send data between servers. >+ >+Command-line used: >+ >+bbcp -4 c -N io "zfs send -I ${localpool}/${localfs}/${site}@${lastsnap} \ >+ ${localpool}/${localfs}/${site}@${yesterday}" \ >+ ${user}@${remotehost}:"${zfs} recv ${recvopts} ${rempool}" >+ >+ >+Taken from the bbcp website (when in doubt, google it out): >+ >+--ipv4 [who] | -4 [who] >+uses the IPv4 TCP stack for command processing and source-target connections. >+This option is incompatible with IPv6 addresses. The optional who argument >+restricts IPv4 mode to the command if c is specified, the source if s is >+specified or the target if t is specified. The default is cst (i.e. everywhere). >+If who is omitted and â-ipv4 is the last option on the command line it must >+be followed by the -- option (double dash). >+ >+So, it looks like the "-h" output should be updated to use: >+ >+[-4 [cst]] >+ >+Or similar, with an explanation of what c, s, and t stand for? >+ >+ -c ( Compression ) >+ >+ -s ( Streams ) >+ >+ -t ( tlim - (timelimit) ) >+ >+On another note, "-4 s" and "-4 t" end with segmentation faults. >+The only option that works is "-4 c". >+ >+So, until, or unless I'm able to overcome the problems with the -s, and >+-t switches; don't use them. >+ >+Thanks again, fjwcash@ ! >+ >+--Chris >Index: bbcp/files/patch-src__bbcp_Args.C >=================================================================== >--- bbcp/files/patch-src__bbcp_Args.C (revision 472669) >+++ bbcp/files/patch-src__bbcp_Args.C (nonexistent) >@@ -1,20 +0,0 @@ >---- src/bbcp_Args.C.orig 2015-01-16 13:16:09.000000000 -0800 >-+++ src/bbcp_Args.C 2015-01-16 13:17:22.000000000 -0800 >-@@ -58,7 +58,7 @@ >- bbcp_Opt *p = this; >- do if (i <= p->Optmaxl && i >= p->Optminl && >- !strncmp(p->Optword, optarg, i)) return p->Optvalu; >-- while(p = p->Optnext); >-+ while((p = p->Optnext)); >- return 0; >- } >- >-@@ -203,7 +203,7 @@ >- if (optspec[1] == '.') >- {if (argval && *argval == '-') >- if (inStream) arg_stream.RetToken(); >-- else Aloc--; >-+ }else{ Aloc--; >- argval = 0; >- return *optspec; >- } >Index: bbcp/files/patch-src__bbcp_BuffPool.C >=================================================================== >--- bbcp/files/patch-src__bbcp_BuffPool.C (revision 472669) >+++ bbcp/files/patch-src__bbcp_BuffPool.C (nonexistent) >@@ -1,28 +0,0 @@ >---- src/bbcp_BuffPool.C.orig 2015-01-16 13:30:31.000000000 -0800 >-+++ src/bbcp_BuffPool.C 2015-01-16 13:33:14.000000000 -0800 >-@@ -32,7 +32,7 @@ >- #include <inttypes.h> >- #include <sys/mman.h> >- >--#if defined(MACOS) || defined(AIX) >-+#if defined(MACOS) || defined(AIX) || defined(FREEBSD) >- #define memalign(pgsz,amt) valloc(amt) >- #else >- #include <malloc.h> >-@@ -84,14 +84,14 @@ >- >- // Free all of the buffers in the empty queue >- // >-- while(currp = last_empty) >-+ while((currp = last_empty)) >- {last_empty = last_empty->next; delete currp;} >- //cerr <<bbcp_Debug.Who <<"Bdestroy num " <<j++ <<" @ " <<hex <<(int)currp <<dec <<endl; >- >- // Free all full buffers >- // >- FullPool.Lock(); >-- while(currp = next_full) >-+ while((currp = next_full)) >- {next_full = next_full->next; delete currp;} >- FullPool.UnLock(); >- } >Index: bbcp/files/patch-src__bbcp_Config.C >=================================================================== >--- bbcp/files/patch-src__bbcp_Config.C (revision 472669) >+++ bbcp/files/patch-src__bbcp_Config.C (nonexistent) >@@ -1,39 +0,0 @@ >---- src/bbcp_Config.C.orig 2015-01-16 13:59:00.000000000 -0800 >-+++ src/bbcp_Config.C 2015-01-16 14:04:21.000000000 -0800 >-@@ -265,7 +265,7 @@ >- >- // Process the options >- // >-- while (c=arglist.getopt()) >-+ while ((c=arglist.getopt())) >- { switch(c) >- { >- case 'a': Options |= bbcp_APPEND | bbcp_ORDER; >-@@ -775,8 +775,8 @@ >- >- // Use the config file, if present >- // >-- if (ConfigFN = getenv("bbcp_CONFIGFN")) >-- {if (retc = Configure(ConfigFN)) return retc;} >-+ if ((ConfigFN = getenv("bbcp_CONFIGFN"))) >-+ {if ((retc = Configure(ConfigFN))) return retc;} >- else { >- // Use configuration file in the home directory, if any >- // >-@@ -786,7 +786,7 @@ >- strcpy(ConfigFN, homedir); strcat(ConfigFN, cfn); >- if (stat(ConfigFN, &buf)) >- {retc = 0; free(ConfigFN); ConfigFN = 0;} >-- else if (retc = Configure(ConfigFN)) return retc; >-+ else if ((retc = Configure(ConfigFN))) return retc; >- } >- >- // Establish the FD limit >-@@ -1361,7 +1361,7 @@ >- if (*hn == ':' && hn++ && *hn) >- {errno = 0; >- pnum = strtol(hn, (char **)NULL, 10); >-- if (!pnum && errno || pnum > 65535) >-+ if ((!pnum && errno) || pnum > 65535) >- {bbcp_Fmsg("Config",what,"port invalid -", hn); return -1;} >- } >Index: bbcp/files/patch-src__bbcp_File.C >=================================================================== >--- bbcp/files/patch-src__bbcp_File.C (revision 472669) >+++ bbcp/files/patch-src__bbcp_File.C (nonexistent) >@@ -1,20 +0,0 @@ >---- src/bbcp_File.C.orig 2015-01-15 18:41:10.000000000 -0800 >-+++ src/bbcp_File.C 2015-01-15 18:43:04.000000000 -0800 >-@@ -44,7 +44,7 @@ >- >- #ifdef FREEBSD >- #undef ENODATA >--#define ENODATA ENOATTRR >-+#define ENODATA ENOATTR >- #endif >- >- /******************************************************************************/ >-@@ -153,7 +153,7 @@ >- >- // Find a buffer >- // >-- if (bp = nextbuff) >-+ if ((bp = nextbuff)) >- while(bp && bp->boff != offset) {pp = bp; bp = bp->next;} >- >- // If we found a buffer, unchain it >Index: bbcp/files/patch-src__bbcp_FileSpec.C >=================================================================== >--- bbcp/files/patch-src__bbcp_FileSpec.C (revision 472669) >+++ bbcp/files/patch-src__bbcp_FileSpec.C (nonexistent) >@@ -1,38 +0,0 @@ >---- src/bbcp_FileSpec.C.orig 2015-01-16 14:34:11.000000000 -0800 >-+++ src/bbcp_FileSpec.C 2015-01-16 14:36:54.000000000 -0800 >-@@ -174,7 +174,7 @@ >- >- // Get the current state of the file or directory >- // >-- if (retc = FSp->Stat(targpath, &Targ)) targetsz = 0; >-+ if ((retc = FSp->Stat(targpath, &Targ))) targetsz = 0; >- else if (Targ.Otype == 'p' && (bbcp_Config.Options & bbcp_XPIPE)) >- {targetsz = 0; return 0;} >- else if (Targ.Otype != 'f') {targetsz = -1; return 0;} >-@@ -211,7 +211,7 @@ >- // in the directory. This will later be set to the true mode if it differs. >- // >- DEBUG("Make link " <<targpath <<" -> " <<Info.SLink); >-- if (retc = FSp->MKLnk(Info.SLink, targpath)) >-+ if ((retc = FSp->MKLnk(Info.SLink, targpath))) >- return bbcp_Emsg("Create_Link", retc, "creating link", targpath); >- >- // All done >-@@ -232,7 +232,7 @@ >- // in the directory. This will later be set to the true mode if it differs. >- // >- DEBUG("Make path " <<Info.mode <<' ' <<targpath); >-- if (retc = FSp->MKDir(targpath, bbcp_Config.ModeDC)) >-+ if ((retc = FSp->MKDir(targpath, bbcp_Config.ModeDC))) >- if (retc == -EEXIST) return 0; >- else return bbcp_Emsg("Create_Path", retc, "creating path", targpath); >- >-@@ -764,7 +764,7 @@ >- else bbcp_Config.srcPath = PS_New; >- PS_Prv = PS_New; PS_Cur = PS_New->next; >- } >-- if (*cp = delim) cp++; >-+ if ((*cp = delim)) cp++; >- } >- } >- >Index: bbcp/files/patch-src__bbcp_NetAddr.C >=================================================================== >--- bbcp/files/patch-src__bbcp_NetAddr.C (revision 472669) >+++ bbcp/files/patch-src__bbcp_NetAddr.C (nonexistent) >@@ -1,11 +0,0 @@ >---- src/bbcp_NetAddr.C.orig 2015-01-14 12:13:30.000000000 -0800 >-+++ src/bbcp_NetAddr.C 2015-01-14 12:25:34.000000000 -0800 >-@@ -49,7 +49,7 @@ >- #ifndef s6_addr32 >- #if defined(SUN) >- #define s6_addr32 _S6_un._S6_u32 >--#elif defined(MACOS) >-+#elif defined(MACOS) || defined(FREEBSD) >- #define s6_addr32 __u6_addr.__u6_addr32 >- #endif >- #endif >Index: bbcp/files/patch-src__bbcp_NetAddrInfo.C >=================================================================== >--- bbcp/files/patch-src__bbcp_NetAddrInfo.C (revision 472669) >+++ bbcp/files/patch-src__bbcp_NetAddrInfo.C (nonexistent) >@@ -1,11 +0,0 @@ >---- src/bbcp_NetAddrInfo.C.orig 2015-01-14 12:14:07.000000000 -0800 >-+++ src/bbcp_NetAddrInfo.C 2015-01-14 12:26:37.000000000 -0800 >-@@ -67,7 +67,7 @@ >- #ifndef s6_addr32 >- #if defined(SUN) >- #define s6_addr32 _S6_un._S6_u32 >--#elif defined(MACOS) >-+#elif defined(MACOS) || defined(FREEBSD) >- #define s6_addr32 __u6_addr.__u6_addr32 >- #endif >- #endif >Index: bbcp/files/patch-src__bbcp_Node.C >=================================================================== >--- bbcp/files/patch-src__bbcp_Node.C (revision 472669) >+++ bbcp/files/patch-src__bbcp_Node.C (nonexistent) >@@ -1,76 +0,0 @@ >---- src/bbcp_Node.C.orig 2015-01-15 22:20:08.000000000 -0800 >-+++ src/bbcp_Node.C 2015-01-15 22:31:02.000000000 -0800 >-@@ -94,7 +94,7 @@ >- bbcp_Link *link; >- int retc; >- >-- if (link = bbcp_Net.Connect(bbcp_Config.CBhost, bbcp_Config.CBport)) >-+ if ((link = bbcp_Net.Connect(bbcp_Config.CBhost, bbcp_Config.CBport))) >- {if ((retc = protocol->Login(link, 0)) < 0) >- {delete link; link = 0;} >- } >-@@ -354,8 +354,8 @@ >- oflag = O_WRONLY | O_CREAT | O_TRUNC; >- } >- else if (bbcp_Config.Options & bbcp_APPEND) >-- {if (retc = fp->WriteSigFile()) return retc; >-- if (startoff = fp->targetsz) oflag = O_WRONLY; >-+ {if ((retc = fp->WriteSigFile())) return retc; >-+ if ((startoff = fp->targetsz)) oflag = O_WRONLY; >- else oflag = O_CREAT | O_WRONLY; >- } >- else oflag = O_WRONLY | O_CREAT | O_EXCL; >-@@ -368,7 +368,7 @@ >- >- // Tell the user what we are bout to do >- // >-- if (bbcp_Config.Options & bbcp_BLAB | bbcp_Config.Progint) >-+ if ((bbcp_Config.Options & bbcp_BLAB) | bbcp_Config.Progint) >- if (bbcp_Config.Options & bbcp_APPEND) >- {char buff[32]; >- sprintf(buff, "%lld", startoff); >-@@ -464,7 +464,7 @@ >- // Wait for the expansion thread to end >- // >- if (bbcp_Config.Options & bbcp_COMPRESS) >-- {if (tretc = (long)bbcp_Thread_Wait(cxp->TID)) retc = 128; >-+ {if ((tretc = (long)bbcp_Thread_Wait(cxp->TID))) retc = 128; >- DEBUG("File expansion ended; rc=" <<tretc); >- } >- >-@@ -478,7 +478,7 @@ >- // Make sure each thread has terminated normally >- // >- for (i = 0; i < dlcount; i++) >-- {if (tretc = (long)bbcp_Thread_Wait(link_tid[i])) retc = 128; >-+ {if ((tretc = (long)bbcp_Thread_Wait(link_tid[i]))) retc = 128; >- DEBUG("Thread " <<link_tid[i] <<" stream " <<i <<" ended; rc=" <<tretc); >- } >- >-@@ -618,7 +618,7 @@ >- // Wait for compression thread to end >- // >- if (bbcp_Config.Options & bbcp_COMPRESS) >-- {if (tretc = (long)bbcp_Thread_Wait(cxp->TID)) retc = 128; >-+ {if ((tretc = (long)bbcp_Thread_Wait(cxp->TID))) retc = 128; >- DEBUG("File compression ended; rc=" <<tretc); >- delete cxp; >- } >-@@ -626,7 +626,7 @@ >- // Make sure each link thread has terminated normally. >- // >- for (i = 0; i < iocount; i++) >-- {if (tretc = (long)bbcp_Thread_Wait(link_tid[i])) retc = 128; >-+ {if ((tretc = (long)bbcp_Thread_Wait(link_tid[i]))) retc = 128; >- DEBUG("Thread " <<link_tid[i] <<" stream " <<i <<" ended; rc=" <<tretc); >- } >- >-@@ -735,7 +735,7 @@ >- >- // Establish the control connection first >- // >-- if (link = bbcp_Net.Connect(bbcp_Config.CBhost, bbcp_Config.CBport, 3)) >-+ if ((link = bbcp_Net.Connect(bbcp_Config.CBhost, bbcp_Config.CBport, 3))) >- if ((retc = protocol->Login(link, 0)) < 0) >- {delete link; link = 0;} >- >Index: bbcp/files/patch-src__bbcp_ProcMon.C >=================================================================== >--- bbcp/files/patch-src__bbcp_ProcMon.C (revision 472669) >+++ bbcp/files/patch-src__bbcp_ProcMon.C (nonexistent) >@@ -1,20 +0,0 @@ >---- src/bbcp_ProcMon.C.orig 2015-01-15 22:40:09.000000000 -0800 >-+++ src/bbcp_ProcMon.C 2015-01-15 22:41:33.000000000 -0800 >-@@ -132,7 +132,7 @@ >- >- // Run a thread to start the monitor >- // >-- if (retc = bbcp_Thread_Run(bbcp_MonProc, (void *)this, &mytid)) >-+ if ((retc = bbcp_Thread_Run(bbcp_MonProc, (void *)this, &mytid))) >- {DEBUG("Error " <<retc <<" starting MonProc thread.");} >- else {DEBUG("Thread " <<mytid <<" monitoring process " <<monPID);} >- return; >-@@ -154,7 +154,7 @@ >- >- // Run a thread to start the monitor >- // >-- if (retc = bbcp_Thread_Run(bbcp_MonProc, (void *)this, &mytid)) >-+ if ((retc = bbcp_Thread_Run(bbcp_MonProc, (void *)this, &mytid))) >- {DEBUG("Error " <<retc <<" starting buffpool monitor thread.");} >- else {DEBUG("Thread " <<mytid <<" monitoring buffpool.");} >- return; >Index: bbcp/files/patch-src__bbcp_ProgMon.C >=================================================================== >--- bbcp/files/patch-src__bbcp_ProgMon.C (revision 472669) >+++ bbcp/files/patch-src__bbcp_ProgMon.C (nonexistent) >@@ -1,11 +0,0 @@ >---- src/bbcp_ProgMon.C.orig 2015-01-15 22:47:57.000000000 -0800 >-+++ src/bbcp_ProgMon.C 2015-01-15 22:49:27.000000000 -0800 >-@@ -146,7 +146,7 @@ >- >- // Run a thread to start the monitor >- // >-- if (retc = bbcp_Thread_Run(bbcp_MonProg, (void *)this, &mytid)) >-+ if ((retc = bbcp_Thread_Run(bbcp_MonProg, (void *)this, &mytid))) >- {DEBUG("Error " <<retc <<" starting progress monitor thread.");} >- else {DEBUG("Thread " <<mytid <<" monitoring progress.");} >- return; >Index: bbcp/files/patch-src__bbcp_Protocol.C >=================================================================== >--- bbcp/files/patch-src__bbcp_Protocol.C (revision 472669) >+++ bbcp/files/patch-src__bbcp_Protocol.C (nonexistent) >@@ -1,77 +0,0 @@ >---- src/bbcp_Protocol.C.orig 2015-01-16 11:37:43.000000000 -0800 >-+++ src/bbcp_Protocol.C 2015-01-16 11:41:33.000000000 -0800 >-@@ -86,7 +86,7 @@ >- >- // Start-up the first node >- // >-- if (retc = Fnode->Run(Ffs->username, Ffs->hostname, Fcmd, Ftype)) >-+ if ((retc = Fnode->Run(Ffs->username, Ffs->hostname, Fcmd, Ftype))) >- return retc; >- >- // Determine additional options >-@@ -101,15 +101,15 @@ >- >- // Send the arguments >- // >-- if (retc = SendArgs(Fnode, Ffs, (char *)"none", 0, addOpt[0])) return retc; >-+ if ((retc = SendArgs(Fnode, Ffs, (char *)"none", 0, addOpt[0]))) return retc; >- >- // Get the callback port from the first host >- // >-- if (retc = getCBPort(Fnode)) return retc; >-+ if ((retc = getCBPort(Fnode))) return retc; >- >- // Start the second node >- // >-- if (retc = Lnode->Run(Lfs->username, Lfs->hostname, Lcmd, Ltype)) >-+ if ((retc = Lnode->Run(Lfs->username, Lfs->hostname, Lcmd, Ltype))) >- return retc; >- >- // Compute callback hostname and reset callback port >-@@ -152,7 +152,7 @@ >- >- // The remote program should hve started, get the call back port >- // >-- if (wp = Node->GetLine()) >-+ if ((wp = Node->GetLine())) >- {if ((wp = Node->GetToken()) && !strcmp(wp, "200") >- && (wp = Node->GetToken()) && !strcmp(wp, "Port:") >- && (wp = Node->GetToken()) >-@@ -408,7 +408,7 @@ >- >- // Get the optional offset >- // >-- if (wp = Remote->GetToken()) >-+ if ((wp = Remote->GetToken())) >- {if (bbcp_Config.a2ll("file offset", wp, foffset, 0, -1)) return 22; >- if (foffset > fp->Info.size) >- {char buff[128]; >-@@ -447,7 +447,7 @@ >- // Get the first line of the login stream >- // >- if (!(np->GetLine())) >-- {if (retc = np->LastError()) >-+ {if ((retc = np->LastError())) >- return bbcp_Emsg("Process_Login", retc, "processing login from", >- Net->LinkName()); >- return bbcp_Fmsg("Process_Login", "Bad login from", Net->LinkName()); >-@@ -549,8 +549,8 @@ >- if (texists && bbcp_Config.snkSpec->Info.Otype == 'd') >- tdir = bbcp_Config.snkSpec->pathname; >- else {int plen; >-- if (plen = bbcp_Config.snkSpec->filename - >-- bbcp_Config.snkSpec->pathname) >-+ if ((plen = bbcp_Config.snkSpec->filename - >-+ bbcp_Config.snkSpec->pathname)) >- strncpy(buff, bbcp_Config.snkSpec->pathname, plen-1); >- else {buff[0] = '.'; plen = 2;} >- tdir = buff; buff[plen-1] = '\0'; >-@@ -562,7 +562,7 @@ >- tdir_id = bbcp_Config.snkSpec->Info.fileid; >- else {bbcp_FileInfo Tinfo; >- if (!fs_obj || (!(retc = fs_obj->Stat(tdir, &Tinfo)) >-- && Tinfo.Otype != 'd') && outDir) retc = ENOTDIR; >-+ && (Tinfo.Otype != 'd') && outDir)) retc = ENOTDIR; >- if (retc) {bbcp_Fmsg("Request","Target directory", >- bbcp_Config.snkSpec->pathname,"not found"); >- return Request_exit(2, dRM); >Index: bbcp/files/patch-src__bbcp_Pthread.C >=================================================================== >--- bbcp/files/patch-src__bbcp_Pthread.C (revision 472669) >+++ bbcp/files/patch-src__bbcp_Pthread.C (nonexistent) >@@ -1,20 +0,0 @@ >---- src/bbcp_Pthread.C.orig 2015-01-16 13:38:06.000000000 -0800 >-+++ src/bbcp_Pthread.C 2015-01-16 13:39:48.000000000 -0800 >-@@ -128,7 +128,7 @@ >- /* C o n d W a i t */ >- /******************************************************************************/ >- >--#if defined(MACOS) || defined(AIX) >-+#if defined(MACOS) || defined(AIX) || defined(FREEBSD) >- >- int bbcp_Semaphore::CondWait() >- { >-@@ -215,7 +215,7 @@ >- void *bbcp_Thread_Wait(pthread_t tid) >- {long retc; >- void *tstat; >-- if (retc = pthread_join(tid, (void **)&tstat)) tstat = (void *)retc; >-+ if ((retc = pthread_join(tid, (void **)&tstat))) tstat = (void *)retc; >- return tstat; >- } >- >Index: bbcp/files/patch-src__bbcp_Pthread.h >=================================================================== >--- bbcp/files/patch-src__bbcp_Pthread.h (revision 472669) >+++ bbcp/files/patch-src__bbcp_Pthread.h (nonexistent) >@@ -1,11 +0,0 @@ >---- src/bbcp_Pthread.h.orig 2015-01-16 13:41:31.000000000 -0800 >-+++ src/bbcp_Pthread.h 2015-01-16 13:42:14.000000000 -0800 >-@@ -108,7 +108,7 @@ >- bbcp_Mutex *monMutex; >- }; >- >--#if defined(MACOS) || defined(AIX) >-+#if defined(MACOS) || defined(AIX) || defined(FREEBSD) >- class bbcp_Semaphore >- { >- public: >Index: bbcp/files/patch-src__bbcp_Stream.C >=================================================================== >--- bbcp/files/patch-src__bbcp_Stream.C (revision 472669) >+++ bbcp/files/patch-src__bbcp_Stream.C (nonexistent) >@@ -1,20 +0,0 @@ >---- src/bbcp_Stream.C.orig 2015-01-16 11:52:58.000000000 -0800 >-+++ src/bbcp_Stream.C 2015-01-16 11:55:23.000000000 -0800 >-@@ -206,7 +206,7 @@ >- return bbcp_Emsg("Exec",errno,"creating a pipe for",parm[0]); >- Child_In=fildes_In[0]; Child_Out=fildes_Out[1]; Child_Err=fildes_Err[1]; >- fildes_Out[1] = (inrd ? fildes_In[1] : -1); >-- if (retc = Attach(fildes_Out)) return retc; >-+ if ((retc = Attach(fildes_Out))) return retc; >- } >- >- // Fork a process first so we can pick up the next request. >-@@ -436,7 +436,7 @@ >- // If we have a token, return it >- // >- xline = 1; >-- if (wp = GetToken(lowcase)) return wp; >-+ if ((wp = GetToken(lowcase))) return wp; >- >- // If no continuation allowed, return a null (but only once) >- // >Index: bbcp/files/patch-src__bbcp_System.C >=================================================================== >--- bbcp/files/patch-src__bbcp_System.C (revision 472669) >+++ bbcp/files/patch-src__bbcp_System.C (nonexistent) >@@ -1,47 +0,0 @@ >---- src/bbcp_System.C.orig 2015-01-16 11:58:47.000000000 -0800 >-+++ src/bbcp_System.C 2015-01-16 12:01:30.000000000 -0800 >-@@ -108,7 +108,7 @@ >- // Convert the group name to a gid >- // >- Glookup.Lock(); >-- if (gp = getgrnam(group)) gid = gp->gr_gid; >-+ if ((gp = getgrnam(group))) gid = gp->gr_gid; >- else gid = (gid_t)-1; >- Glookup.UnLock(); >- return gid; >-@@ -126,7 +126,7 @@ >- // Get the group name >- // >- Glookup.Lock(); >-- if (gp = getgrgid(gid)) gnmp = gp->gr_name; >-+ if ((gp = getgrgid(gid))) gnmp = gp->gr_name; >- else gnmp = (char *)"nogroup"; >- Glookup.UnLock(); >- >-@@ -151,7 +151,7 @@ >- >- // Get the password entry for this uid >- // >-- if (pwp = getpwuid(myuid)) homedir = pwp->pw_dir; >-+ if ((pwp = getpwuid(myuid))) homedir = pwp->pw_dir; >- else homedir = (char *)"/tmp"; >- >- // Return a copy of the directory >-@@ -170,7 +170,7 @@ >- int rc, grandpa; >- >- sprintf(cmd, PS_CMD, getppid()); >-- if (rc = cmdstream.Exec(cmd)) rc = cmdstream.LastError(); >-+ if ((rc = cmdstream.Exec(cmd))) rc = cmdstream.LastError(); >- else if (!cmdstream.GetLine() || !(lp = cmdstream.GetLine())) rc = -33; >- else {errno = 0; >- grandpa = strtol(lp, (char **)NULL, 10); >-@@ -218,7 +218,7 @@ >- >- // Get the password entry for this uid >- // >-- if (pwp = getpwuid(myuid)) uname = pwp->pw_name; >-+ if ((pwp = getpwuid(myuid))) uname = pwp->pw_name; >- else uname = (char *)"anonymous"; >- >- // Return a copy of the directory >Index: bbcp/files/patch-src__bbcp_ZCX.C >=================================================================== >--- bbcp/files/patch-src__bbcp_ZCX.C (revision 472669) >+++ bbcp/files/patch-src__bbcp_ZCX.C (nonexistent) >@@ -1,11 +0,0 @@ >---- src/bbcp_ZCX.C.orig 2015-01-16 12:06:04.000000000 -0800 >-+++ src/bbcp_ZCX.C 2015-01-16 12:06:59.000000000 -0800 >-@@ -144,7 +144,7 @@ >- >- // If we have gotten here then all went well so far flush output >- // >-- if (obp->blen = outsz - ZStream.avail_out) >-+ if ((obp->blen = outsz - ZStream.avail_out)) >- {obp->boff = outbytes; outbytes += obp->blen; >- Obuff->putFullBuff(obp); >- if (!(obp = Obuff->getEmptyBuff())) return ENOBUFS; >Index: bbcp/files/patch-src_bbcp_Args.C >=================================================================== >--- bbcp/files/patch-src_bbcp_Args.C (nonexistent) >+++ bbcp/files/patch-src_bbcp_Args.C (working copy) >@@ -0,0 +1,20 @@ >+--- src/bbcp_Args.C.orig 2018-06-18 04:17:54 UTC >++++ src/bbcp_Args.C >+@@ -58,7 +58,7 @@ char *operator%(char *optarg) >+ bbcp_Opt *p = this; >+ do if (i <= p->Optmaxl && i >= p->Optminl && >+ !strncmp(p->Optword, optarg, i)) return p->Optvalu; >+- while(p = p->Optnext); >++ while((p = p->Optnext)); >+ return 0; >+ } >+ >+@@ -203,7 +203,7 @@ char bbcp_Args::getopt() >+ if (optspec[1] == '.') >+ {if (argval && *argval == '-') >+ if (inStream) arg_stream.RetToken(); >+- else Aloc--; >++ }else{ Aloc--; >+ argval = 0; >+ return *optspec; >+ } >Index: bbcp/files/patch-src_bbcp_BuffPool.C >=================================================================== >--- bbcp/files/patch-src_bbcp_BuffPool.C (nonexistent) >+++ bbcp/files/patch-src_bbcp_BuffPool.C (working copy) >@@ -0,0 +1,28 @@ >+--- src/bbcp_BuffPool.C.orig 2018-06-18 04:18:26 UTC >++++ src/bbcp_BuffPool.C >+@@ -32,7 +32,7 @@ >+ #include <inttypes.h> >+ #include <sys/mman.h> >+ >+-#if defined(MACOS) || defined(AIX) >++#if defined(MACOS) || defined(AIX) || defined(FREEBSD) >+ #define memalign(pgsz,amt) valloc(amt) >+ #else >+ #include <malloc.h> >+@@ -84,14 +84,14 @@ bbcp_BuffPool::~bbcp_BuffPool() >+ >+ // Free all of the buffers in the empty queue >+ // >+- while(currp = last_empty) >++ while((currp = last_empty)) >+ {last_empty = last_empty->next; delete currp;} >+ //cerr <<bbcp_Debug.Who <<"Bdestroy num " <<j++ <<" @ " <<hex <<(int)currp <<dec <<endl; >+ >+ // Free all full buffers >+ // >+ FullPool.Lock(); >+- while(currp = next_full) >++ while((currp = next_full)) >+ {next_full = next_full->next; delete currp;} >+ FullPool.UnLock(); >+ } >Index: bbcp/files/patch-src_bbcp_Config.C >=================================================================== >--- bbcp/files/patch-src_bbcp_Config.C (nonexistent) >+++ bbcp/files/patch-src_bbcp_Config.C (working copy) >@@ -0,0 +1,40 @@ >+--- src/bbcp_Config.C.orig 2018-06-18 04:18:52 UTC >++++ src/bbcp_Config.C >+@@ -265,7 +265,7 @@ void bbcp_Config::Arguments(int argc, char **argv, int >+ >+ // Process the options >+ // >+- while (c=arglist.getopt()) >++ while ((c=arglist.getopt())) >+ { switch(c) >+ { >+ case 'a': Options |= bbcp_APPEND | bbcp_ORDER; >+@@ -775,8 +775,8 @@ int bbcp_Config::ConfigInit(int argc, char **argv) >+ >+ // Use the config file, if present >+ // >+- if (ConfigFN = getenv("bbcp_CONFIGFN")) >+- {if (retc = Configure(ConfigFN)) return retc;} >++ if ((ConfigFN = getenv("bbcp_CONFIGFN"))) >++ {if ((retc = Configure(ConfigFN))) return retc;} >+ else { >+ // Use configuration file in the home directory, if any >+ // >+@@ -786,7 +786,7 @@ int bbcp_Config::ConfigInit(int argc, char **argv) >+ strcpy(ConfigFN, homedir); strcat(ConfigFN, cfn); >+ if (stat(ConfigFN, &buf)) >+ {retc = 0; free(ConfigFN); ConfigFN = 0;} >+- else if (retc = Configure(ConfigFN)) return retc; >++ else if ((retc = Configure(ConfigFN))) return retc; >+ } >+ >+ // Establish the FD limit >+@@ -1361,7 +1361,7 @@ int bbcp_Config::HostAndPort(const char *what, char *p >+ if (*hn == ':' && hn++ && *hn) >+ {errno = 0; >+ pnum = strtol(hn, (char **)NULL, 10); >+- if (!pnum && errno || pnum > 65535) >++ if ((!pnum && errno) || pnum > 65535) >+ {bbcp_Fmsg("Config",what,"port invalid -", hn); return -1;} >+ } >+ >Index: bbcp/files/patch-src_bbcp_File.C >=================================================================== >--- bbcp/files/patch-src_bbcp_File.C (nonexistent) >+++ bbcp/files/patch-src_bbcp_File.C (working copy) >@@ -0,0 +1,20 @@ >+--- src/bbcp_File.C.orig 2018-06-18 04:19:20 UTC >++++ src/bbcp_File.C >+@@ -44,7 +44,7 @@ >+ >+ #ifdef FREEBSD >+ #undef ENODATA >+-#define ENODATA ENOATTRR >++#define ENODATA ENOATTR >+ #endif >+ >+ /******************************************************************************/ >+@@ -153,7 +153,7 @@ bbcp_Buffer *bbcp_File::getBuffer(long long offset) >+ >+ // Find a buffer >+ // >+- if (bp = nextbuff) >++ if ((bp = nextbuff)) >+ while(bp && bp->boff != offset) {pp = bp; bp = bp->next;} >+ >+ // If we found a buffer, unchain it >Index: bbcp/files/patch-src_bbcp_FileSpec.C >=================================================================== >--- bbcp/files/patch-src_bbcp_FileSpec.C (nonexistent) >+++ bbcp/files/patch-src_bbcp_FileSpec.C (working copy) >@@ -0,0 +1,38 @@ >+--- src/bbcp_FileSpec.C.orig 2018-06-18 04:19:54 UTC >++++ src/bbcp_FileSpec.C >+@@ -174,7 +174,7 @@ int bbcp_FileSpec::Compose(long long did, char *dpath, >+ >+ // Get the current state of the file or directory >+ // >+- if (retc = FSp->Stat(targpath, &Targ)) targetsz = 0; >++ if ((retc = FSp->Stat(targpath, &Targ))) targetsz = 0; >+ else if (Targ.Otype == 'p' && (bbcp_Config.Options & bbcp_XPIPE)) >+ {targetsz = 0; return 0;} >+ else if (Targ.Otype != 'f') {targetsz = -1; return 0;} >+@@ -211,7 +211,7 @@ int bbcp_FileSpec::Create_Link() >+ // in the directory. This will later be set to the true mode if it differs. >+ // >+ DEBUG("Make link " <<targpath <<" -> " <<Info.SLink); >+- if (retc = FSp->MKLnk(Info.SLink, targpath)) >++ if ((retc = FSp->MKLnk(Info.SLink, targpath))) >+ return bbcp_Emsg("Create_Link", retc, "creating link", targpath); >+ >+ // All done >+@@ -232,7 +232,7 @@ int bbcp_FileSpec::Create_Path() >+ // in the directory. This will later be set to the true mode if it differs. >+ // >+ DEBUG("Make path " <<Info.mode <<' ' <<targpath); >+- if (retc = FSp->MKDir(targpath, bbcp_Config.ModeDC)) >++ if ((retc = FSp->MKDir(targpath, bbcp_Config.ModeDC))) >+ if (retc == -EEXIST) return 0; >+ else return bbcp_Emsg("Create_Path", retc, "creating path", targpath); >+ >+@@ -764,7 +764,7 @@ void bbcp_FileSpec::BuildPaths() >+ else bbcp_Config.srcPath = PS_New; >+ PS_Prv = PS_New; PS_Cur = PS_New->next; >+ } >+- if (*cp = delim) cp++; >++ if ((*cp = delim)) cp++; >+ } >+ } >+ >Index: bbcp/files/patch-src_bbcp_NetAddr.C >=================================================================== >--- bbcp/files/patch-src_bbcp_NetAddr.C (nonexistent) >+++ bbcp/files/patch-src_bbcp_NetAddr.C (working copy) >@@ -0,0 +1,11 @@ >+--- src/bbcp_NetAddr.C.orig 2018-06-18 04:21:20 UTC >++++ src/bbcp_NetAddr.C >+@@ -49,7 +49,7 @@ >+ #ifndef s6_addr32 >+ #if defined(SUN) >+ #define s6_addr32 _S6_un._S6_u32 >+-#elif defined(MACOS) >++#elif defined(MACOS) || defined(FREEBSD) >+ #define s6_addr32 __u6_addr.__u6_addr32 >+ #endif >+ #endif >Index: bbcp/files/patch-src_bbcp_NetAddrInfo.C >=================================================================== >--- bbcp/files/patch-src_bbcp_NetAddrInfo.C (nonexistent) >+++ bbcp/files/patch-src_bbcp_NetAddrInfo.C (working copy) >@@ -0,0 +1,11 @@ >+--- src/bbcp_NetAddrInfo.C.orig 2018-06-18 04:30:09 UTC >++++ src/bbcp_NetAddrInfo.C >+@@ -67,7 +67,7 @@ >+ #ifndef s6_addr32 >+ #if defined(SUN) >+ #define s6_addr32 _S6_un._S6_u32 >+-#elif defined(MACOS) >++#elif defined(MACOS) || defined(FREEBSD) >+ #define s6_addr32 __u6_addr.__u6_addr32 >+ #endif >+ #endif >Index: bbcp/files/patch-src_bbcp_Node.C >=================================================================== >--- bbcp/files/patch-src_bbcp_Node.C (nonexistent) >+++ bbcp/files/patch-src_bbcp_Node.C (working copy) >@@ -0,0 +1,76 @@ >+--- src/bbcp_Node.C.orig 2018-06-18 04:30:55 UTC >++++ src/bbcp_Node.C >+@@ -94,7 +94,7 @@ void *bbcp_Connect(void *protp) >+ bbcp_Link *link; >+ int retc; >+ >+- if (link = bbcp_Net.Connect(bbcp_Config.CBhost, bbcp_Config.CBport)) >++ if ((link = bbcp_Net.Connect(bbcp_Config.CBhost, bbcp_Config.CBport))) >+ {if ((retc = protocol->Login(link, 0)) < 0) >+ {delete link; link = 0;} >+ } >+@@ -354,8 +354,8 @@ int bbcp_Node::RecvFile(bbcp_FileSpec *fp, bbcp_Node * >+ oflag = O_WRONLY | O_CREAT | O_TRUNC; >+ } >+ else if (bbcp_Config.Options & bbcp_APPEND) >+- {if (retc = fp->WriteSigFile()) return retc; >+- if (startoff = fp->targetsz) oflag = O_WRONLY; >++ {if ((retc = fp->WriteSigFile())) return retc; >++ if ((startoff = fp->targetsz)) oflag = O_WRONLY; >+ else oflag = O_CREAT | O_WRONLY; >+ } >+ else oflag = O_WRONLY | O_CREAT | O_EXCL; >+@@ -368,7 +368,7 @@ int bbcp_Node::RecvFile(bbcp_FileSpec *fp, bbcp_Node * >+ >+ // Tell the user what we are bout to do >+ // >+- if (bbcp_Config.Options & bbcp_BLAB | bbcp_Config.Progint) >++ if ((bbcp_Config.Options & bbcp_BLAB) | bbcp_Config.Progint) >+ if (bbcp_Config.Options & bbcp_APPEND) >+ {char buff[32]; >+ sprintf(buff, "%lld", startoff); >+@@ -464,7 +464,7 @@ int bbcp_Node::RecvFile(bbcp_FileSpec *fp, bbcp_Node * >+ // Wait for the expansion thread to end >+ // >+ if (bbcp_Config.Options & bbcp_COMPRESS) >+- {if (tretc = (long)bbcp_Thread_Wait(cxp->TID)) retc = 128; >++ {if ((tretc = (long)bbcp_Thread_Wait(cxp->TID))) retc = 128; >+ DEBUG("File expansion ended; rc=" <<tretc); >+ } >+ >+@@ -478,7 +478,7 @@ int bbcp_Node::RecvFile(bbcp_FileSpec *fp, bbcp_Node * >+ // Make sure each thread has terminated normally >+ // >+ for (i = 0; i < dlcount; i++) >+- {if (tretc = (long)bbcp_Thread_Wait(link_tid[i])) retc = 128; >++ {if ((tretc = (long)bbcp_Thread_Wait(link_tid[i]))) retc = 128; >+ DEBUG("Thread " <<link_tid[i] <<" stream " <<i <<" ended; rc=" <<tretc); >+ } >+ >+@@ -618,7 +618,7 @@ int bbcp_Node::SendFile(bbcp_FileSpec *fp) >+ // Wait for compression thread to end >+ // >+ if (bbcp_Config.Options & bbcp_COMPRESS) >+- {if (tretc = (long)bbcp_Thread_Wait(cxp->TID)) retc = 128; >++ {if ((tretc = (long)bbcp_Thread_Wait(cxp->TID))) retc = 128; >+ DEBUG("File compression ended; rc=" <<tretc); >+ delete cxp; >+ } >+@@ -626,7 +626,7 @@ int bbcp_Node::SendFile(bbcp_FileSpec *fp) >+ // Make sure each link thread has terminated normally. >+ // >+ for (i = 0; i < iocount; i++) >+- {if (tretc = (long)bbcp_Thread_Wait(link_tid[i])) retc = 128; >++ {if ((tretc = (long)bbcp_Thread_Wait(link_tid[i]))) retc = 128; >+ DEBUG("Thread " <<link_tid[i] <<" stream " <<i <<" ended; rc=" <<tretc); >+ } >+ >+@@ -735,7 +735,7 @@ int bbcp_Node::Outgoing(bbcp_Protocol *protocol) >+ >+ // Establish the control connection first >+ // >+- if (link = bbcp_Net.Connect(bbcp_Config.CBhost, bbcp_Config.CBport, 3)) >++ if ((link = bbcp_Net.Connect(bbcp_Config.CBhost, bbcp_Config.CBport, 3))) >+ if ((retc = protocol->Login(link, 0)) < 0) >+ {delete link; link = 0;} >+ >Index: bbcp/files/patch-src_bbcp_ProcMon.C >=================================================================== >--- bbcp/files/patch-src_bbcp_ProcMon.C (nonexistent) >+++ bbcp/files/patch-src_bbcp_ProcMon.C (working copy) >@@ -0,0 +1,20 @@ >+--- src/bbcp_ProcMon.C.orig 2018-06-18 04:31:41 UTC >++++ src/bbcp_ProcMon.C >+@@ -132,7 +132,7 @@ void bbcp_ProcMon::Start(pid_t monit, bbcp_Node *Remot >+ >+ // Run a thread to start the monitor >+ // >+- if (retc = bbcp_Thread_Run(bbcp_MonProc, (void *)this, &mytid)) >++ if ((retc = bbcp_Thread_Run(bbcp_MonProc, (void *)this, &mytid))) >+ {DEBUG("Error " <<retc <<" starting MonProc thread.");} >+ else {DEBUG("Thread " <<mytid <<" monitoring process " <<monPID);} >+ return; >+@@ -154,7 +154,7 @@ void bbcp_ProcMon::Start(int seclim, bbcp_BuffPool *bu >+ >+ // Run a thread to start the monitor >+ // >+- if (retc = bbcp_Thread_Run(bbcp_MonProc, (void *)this, &mytid)) >++ if ((retc = bbcp_Thread_Run(bbcp_MonProc, (void *)this, &mytid))) >+ {DEBUG("Error " <<retc <<" starting buffpool monitor thread.");} >+ else {DEBUG("Thread " <<mytid <<" monitoring buffpool.");} >+ return; >Index: bbcp/files/patch-src_bbcp_ProgMon.C >=================================================================== >--- bbcp/files/patch-src_bbcp_ProgMon.C (nonexistent) >+++ bbcp/files/patch-src_bbcp_ProgMon.C (working copy) >@@ -0,0 +1,11 @@ >+--- src/bbcp_ProgMon.C.orig 2018-06-18 04:32:15 UTC >++++ src/bbcp_ProgMon.C >+@@ -146,7 +146,7 @@ void bbcp_ProgMon::Start(bbcp_File *fs_obj, bbcp_ZCX * >+ >+ // Run a thread to start the monitor >+ // >+- if (retc = bbcp_Thread_Run(bbcp_MonProg, (void *)this, &mytid)) >++ if ((retc = bbcp_Thread_Run(bbcp_MonProg, (void *)this, &mytid))) >+ {DEBUG("Error " <<retc <<" starting progress monitor thread.");} >+ else {DEBUG("Thread " <<mytid <<" monitoring progress.");} >+ return; >Index: bbcp/files/patch-src_bbcp_Protocol.C >=================================================================== >--- bbcp/files/patch-src_bbcp_Protocol.C (nonexistent) >+++ bbcp/files/patch-src_bbcp_Protocol.C (working copy) >@@ -0,0 +1,77 @@ >+--- src/bbcp_Protocol.C.orig 2018-06-18 04:39:39 UTC >++++ src/bbcp_Protocol.C >+@@ -86,7 +86,7 @@ int bbcp_Protocol::Schedule(bbcp_Node *Fnode, bbcp_Fil >+ >+ // Start-up the first node >+ // >+- if (retc = Fnode->Run(Ffs->username, Ffs->hostname, Fcmd, Ftype)) >++ if ((retc = Fnode->Run(Ffs->username, Ffs->hostname, Fcmd, Ftype))) >+ return retc; >+ >+ // Determine additional options >+@@ -101,15 +101,15 @@ int bbcp_Protocol::Schedule(bbcp_Node *Fnode, bbcp_Fil >+ >+ // Send the arguments >+ // >+- if (retc = SendArgs(Fnode, Ffs, (char *)"none", 0, addOpt[0])) return retc; >++ if ((retc = SendArgs(Fnode, Ffs, (char *)"none", 0, addOpt[0]))) return retc; >+ >+ // Get the callback port from the first host >+ // >+- if (retc = getCBPort(Fnode)) return retc; >++ if ((retc = getCBPort(Fnode))) return retc; >+ >+ // Start the second node >+ // >+- if (retc = Lnode->Run(Lfs->username, Lfs->hostname, Lcmd, Ltype)) >++ if ((retc = Lnode->Run(Lfs->username, Lfs->hostname, Lcmd, Ltype))) >+ return retc; >+ >+ // Compute callback hostname and reset callback port >+@@ -152,7 +152,7 @@ int bbcp_Protocol::getCBPort(bbcp_Node *Node) >+ >+ // The remote program should hve started, get the call back port >+ // >+- if (wp = Node->GetLine()) >++ if ((wp = Node->GetLine())) >+ {if ((wp = Node->GetToken()) && !strcmp(wp, "200") >+ && (wp = Node->GetToken()) && !strcmp(wp, "Port:") >+ && (wp = Node->GetToken()) >+@@ -408,7 +408,7 @@ int bbcp_Protocol::Process_get() >+ >+ // Get the optional offset >+ // >+- if (wp = Remote->GetToken()) >++ if ((wp = Remote->GetToken())) >+ {if (bbcp_Config.a2ll("file offset", wp, foffset, 0, -1)) return 22; >+ if (foffset > fp->Info.size) >+ {char buff[128]; >+@@ -447,7 +447,7 @@ int bbcp_Protocol::Process_login(bbcp_Link *Net) >+ // Get the first line of the login stream >+ // >+ if (!(np->GetLine())) >+- {if (retc = np->LastError()) >++ {if ((retc = np->LastError())) >+ return bbcp_Emsg("Process_Login", retc, "processing login from", >+ Net->LinkName()); >+ return bbcp_Fmsg("Process_Login", "Bad login from", Net->LinkName()); >+@@ -549,8 +549,8 @@ int bbcp_Protocol::Request(bbcp_Node *Node) >+ if (texists && bbcp_Config.snkSpec->Info.Otype == 'd') >+ tdir = bbcp_Config.snkSpec->pathname; >+ else {int plen; >+- if (plen = bbcp_Config.snkSpec->filename - >+- bbcp_Config.snkSpec->pathname) >++ if ((plen = bbcp_Config.snkSpec->filename - >++ bbcp_Config.snkSpec->pathname)) >+ strncpy(buff, bbcp_Config.snkSpec->pathname, plen-1); >+ else {buff[0] = '.'; plen = 2;} >+ tdir = buff; buff[plen-1] = '\0'; >+@@ -562,7 +562,7 @@ int bbcp_Protocol::Request(bbcp_Node *Node) >+ tdir_id = bbcp_Config.snkSpec->Info.fileid; >+ else {bbcp_FileInfo Tinfo; >+ if (!fs_obj || (!(retc = fs_obj->Stat(tdir, &Tinfo)) >+- && Tinfo.Otype != 'd') && outDir) retc = ENOTDIR; >++ && (Tinfo.Otype != 'd') && outDir)) retc = ENOTDIR; >+ if (retc) {bbcp_Fmsg("Request","Target directory", >+ bbcp_Config.snkSpec->pathname,"not found"); >+ return Request_exit(2, dRM); >Index: bbcp/files/patch-src_bbcp_Pthread.C >=================================================================== >--- bbcp/files/patch-src_bbcp_Pthread.C (nonexistent) >+++ bbcp/files/patch-src_bbcp_Pthread.C (working copy) >@@ -0,0 +1,20 @@ >+--- src/bbcp_Pthread.C.orig 2018-06-18 04:40:04 UTC >++++ src/bbcp_Pthread.C >+@@ -128,7 +128,7 @@ int bbcp_CondVar::WaitMS(int msec) >+ /* C o n d W a i t */ >+ /******************************************************************************/ >+ >+-#if defined(MACOS) || defined(AIX) >++#if defined(MACOS) || defined(AIX) || defined(FREEBSD) >+ >+ int bbcp_Semaphore::CondWait() >+ { >+@@ -215,7 +215,7 @@ int bbcp_Thread_Start(void *(*proc)(void *), void *ar >+ void *bbcp_Thread_Wait(pthread_t tid) >+ {long retc; >+ void *tstat; >+- if (retc = pthread_join(tid, (void **)&tstat)) tstat = (void *)retc; >++ if ((retc = pthread_join(tid, (void **)&tstat))) tstat = (void *)retc; >+ return tstat; >+ } >+ >Index: bbcp/files/patch-src_bbcp_Pthread.h >=================================================================== >--- bbcp/files/patch-src_bbcp_Pthread.h (nonexistent) >+++ bbcp/files/patch-src_bbcp_Pthread.h (working copy) >@@ -0,0 +1,11 @@ >+--- src/bbcp_Pthread.h.orig 2018-06-18 14:31:39 UTC >++++ src/bbcp_Pthread.h >+@@ -108,7 +108,7 @@ void UnLock() {if (monMutex) {monMutex->UnLock(); m >+ bbcp_Mutex *monMutex; >+ }; >+ >+-#if defined(MACOS) || defined(AIX) >++#if defined(MACOS) || defined(AIX) || defined(FREEBSD) >+ class bbcp_Semaphore >+ { >+ public: >Index: bbcp/files/patch-src_bbcp_Stream.C >=================================================================== >--- bbcp/files/patch-src_bbcp_Stream.C (nonexistent) >+++ bbcp/files/patch-src_bbcp_Stream.C (working copy) >@@ -0,0 +1,20 @@ >+--- src/bbcp_Stream.C.orig 2018-06-18 04:50:56 UTC >++++ src/bbcp_Stream.C >+@@ -206,7 +206,7 @@ int bbcp_Stream::Exec(char **parm, int inrd, int inerr >+ return bbcp_Emsg("Exec",errno,"creating a pipe for",parm[0]); >+ Child_In=fildes_In[0]; Child_Out=fildes_Out[1]; Child_Err=fildes_Err[1]; >+ fildes_Out[1] = (inrd ? fildes_In[1] : -1); >+- if (retc = Attach(fildes_Out)) return retc; >++ if ((retc = Attach(fildes_Out))) return retc; >+ } >+ >+ // Fork a process first so we can pick up the next request. >+@@ -436,7 +436,7 @@ char *bbcp_Stream::GetWord(int lowcase) >+ // If we have a token, return it >+ // >+ xline = 1; >+- if (wp = GetToken(lowcase)) return wp; >++ if ((wp = GetToken(lowcase))) return wp; >+ >+ // If no continuation allowed, return a null (but only once) >+ // >Index: bbcp/files/patch-src_bbcp_System.C >=================================================================== >--- bbcp/files/patch-src_bbcp_System.C (nonexistent) >+++ bbcp/files/patch-src_bbcp_System.C (working copy) >@@ -0,0 +1,47 @@ >+--- src/bbcp_System.C.orig 2018-06-18 04:51:20 UTC >++++ src/bbcp_System.C >+@@ -108,7 +108,7 @@ gid_t bbcp_System::getGID(const char *group) >+ // Convert the group name to a gid >+ // >+ Glookup.Lock(); >+- if (gp = getgrnam(group)) gid = gp->gr_gid; >++ if ((gp = getgrnam(group))) gid = gp->gr_gid; >+ else gid = (gid_t)-1; >+ Glookup.UnLock(); >+ return gid; >+@@ -126,7 +126,7 @@ char *bbcp_System::getGNM(gid_t gid) >+ // Get the group name >+ // >+ Glookup.Lock(); >+- if (gp = getgrgid(gid)) gnmp = gp->gr_name; >++ if ((gp = getgrgid(gid))) gnmp = gp->gr_name; >+ else gnmp = (char *)"nogroup"; >+ Glookup.UnLock(); >+ >+@@ -151,7 +151,7 @@ char *bbcp_System::getHomeDir() >+ >+ // Get the password entry for this uid >+ // >+- if (pwp = getpwuid(myuid)) homedir = pwp->pw_dir; >++ if ((pwp = getpwuid(myuid))) homedir = pwp->pw_dir; >+ else homedir = (char *)"/tmp"; >+ >+ // Return a copy of the directory >+@@ -170,7 +170,7 @@ pid_t bbcp_System::getGrandP() >+ int rc, grandpa; >+ >+ sprintf(cmd, PS_CMD, getppid()); >+- if (rc = cmdstream.Exec(cmd)) rc = cmdstream.LastError(); >++ if ((rc = cmdstream.Exec(cmd))) rc = cmdstream.LastError(); >+ else if (!cmdstream.GetLine() || !(lp = cmdstream.GetLine())) rc = -33; >+ else {errno = 0; >+ grandpa = strtol(lp, (char **)NULL, 10); >+@@ -218,7 +218,7 @@ char *bbcp_System::UserName() >+ >+ // Get the password entry for this uid >+ // >+- if (pwp = getpwuid(myuid)) uname = pwp->pw_name; >++ if ((pwp = getpwuid(myuid))) uname = pwp->pw_name; >+ else uname = (char *)"anonymous"; >+ >+ // Return a copy of the directory >Index: bbcp/files/patch-src_bbcp_ZCX.C >=================================================================== >--- bbcp/files/patch-src_bbcp_ZCX.C (nonexistent) >+++ bbcp/files/patch-src_bbcp_ZCX.C (working copy) >@@ -0,0 +1,11 @@ >+--- src/bbcp_ZCX.C.orig 2018-06-18 04:51:49 UTC >++++ src/bbcp_ZCX.C >+@@ -144,7 +144,7 @@ int bbcp_ZCX::Process() >+ >+ // If we have gotten here then all went well so far flush output >+ // >+- if (obp->blen = outsz - ZStream.avail_out) >++ if ((obp->blen = outsz - ZStream.avail_out)) >+ {obp->boff = outbytes; outbytes += obp->blen; >+ Obuff->putFullBuff(obp); >+ if (!(obp = Obuff->getEmptyBuff())) return ENOBUFS;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
portmaster
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 229115
:
194365
|
194367
|
200359
|
200361
|
200482
|
200542