1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-01 05:45:45 +00:00

Fix build on FreeBSD/i386 8-CURRENT. (7.0 building with GCC 4.2)

This commit is contained in:
David E. O'Brien 2008-09-01 17:56:05 +00:00
parent 2d13c2055f
commit 1348e3ff59
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=219602
20 changed files with 196 additions and 468 deletions

View File

@ -37,10 +37,6 @@ LATEST_LINK= pgp6
BROKEN= Does not compile on !i386
.endif
.if ${OSVERSION} >= 700042
BROKEN?= Does not compile with GCC 4.2
.endif
# the distfile is actually a tar of three compressed tars and their
# signatures
post-extract:
@ -56,6 +52,11 @@ post-extract:
.endif
${CP} ${FILESDIR}/build.Makefile ${WRKSRC}/Makefile
pre-patch:
${REINPLACE_CMD} -e 's,-fwritable-strings,,' \
${WRKSRC}/libs/network/ldaplib/Make-common \
${WRKSRC}/libs/network/ldaplib/*/Makefile
do-install:
cd ${WRKSRC}/clients/pgp/cmdline ; ${GMAKE} install ; \
${INSTALL_MAN} packaging/pgp-6.0/man/man1/pgp.1 ${PREFIX}/man/man1

View File

@ -0,0 +1,10 @@
--- libs/network/ldaplib/build/platforms/freebsd-gcc/Make-platform.orig 2008-08-31 01:19:49.000000000 -0700
+++ libs/network/ldaplib/build/platforms/freebsd-gcc/Make-platform 2008-08-31 01:19:52.000000000 -0700
@@ -11,6 +11,6 @@
# -------------------------------------------------------------------------
# you will probably not need to edit anything below this point
# -------------------------------------------------------------------------
-CC = gcc
+#CC = gcc
PLATFORMCFLAGS= -Dfreebsd

View File

@ -0,0 +1,63 @@
--- libs/pfl/common/classes/StPGPRefs.h.orig 1999-08-05 01:22:16.000000000 -0700
+++ libs/pfl/common/classes/StPGPRefs.h 2008-08-31 01:11:35.000000000 -0700
@@ -64,27 +64,27 @@ protected:
#ifdef Included_pgpKeys_h
typedef StPGPRef<PGPKeySetRef> StPGPKeySetRef;
- inline void StPGPKeySetRef::Dispose() { PGPFreeKeySet(mRef); }
+ template <> inline void StPGPKeySetRef::Dispose() { PGPFreeKeySet(mRef); }
typedef StPGPRef<PGPKeyListRef> StPGPKeyListRef;
- inline void StPGPKeyListRef::Dispose() { PGPFreeKeyList(mRef); }
+ template <> inline void StPGPKeyListRef::Dispose() { PGPFreeKeyList(mRef); }
typedef StPGPRef<PGPKeyIterRef> StPGPKeyIterRef;
- inline void StPGPKeyIterRef::Dispose() { PGPFreeKeyIter(mRef); }
+ template <> inline void StPGPKeyIterRef::Dispose() { PGPFreeKeyIter(mRef); }
#endif
#ifdef Included_pgpHashing_h
typedef StPGPRef<PGPHashContextRef> StPGPHashContextRef;
- inline void StPGPHashContextRef::Dispose() { PGPFreeHashContext(mRef); }
+ template <> inline void StPGPHashContextRef::Dispose() { PGPFreeHashContext(mRef); }
#endif
#ifdef Included_PGPtls_h
typedef StPGPRef<PGPtlsSessionRef> StPGPtlsSessionRef;
- inline void StPGPtlsSessionRef::Dispose() { PGPFreeTLSSession(mRef); }
+ template <> inline void StPGPtlsSessionRef::Dispose() { PGPFreeTLSSession(mRef); }
#endif
#ifdef Included_pgpMemoryMgr_h
- inline void StPGPRef<PGPByte *>::Dispose() { PGPFreeData(mRef); }
+ template <> inline void StPGPRef<PGPByte *>::Dispose() { PGPFreeData(mRef); }
class StPGPDataRef : public StPGPRef<PGPByte *> {
public:
StPGPDataRef() { }
@@ -104,22 +104,22 @@ protected:
};
typedef StPGPRef<PGPMemoryMgrRef> StPGPMemoryMgrRef;
- inline void StPGPMemoryMgrRef::Dispose() { PGPFreeMemoryMgr(mRef); }
+ template <> inline void StPGPMemoryMgrRef::Dispose() { PGPFreeMemoryMgr(mRef); }
#endif
#ifdef Included_pgpSockets_h
typedef StPGPRef<PGPSocketRef> StPGPSocketRef;
- inline void StPGPSocketRef::Dispose() { PGPCloseSocket(mRef); }
+ template <> inline void StPGPSocketRef::Dispose() { PGPCloseSocket(mRef); }
#endif
#ifdef Included_pflPrefs_h
typedef StPGPRef<PGPPrefRef> StPGPPrefRef;
- inline void StPGPPrefRef::Dispose() { PGPClosePrefFile(mRef); }
+ template <> inline void StPGPPrefRef::Dispose() { PGPClosePrefFile(mRef); }
#endif
#ifdef Included_pgpIO_h
typedef StPGPRef<PGPIORef> StPGPIORef;
- inline void StPGPIORef::Dispose() { PGPFreeIO(mRef); }
+ template <> inline void StPGPIORef::Dispose() { PGPFreeIO(mRef); }
#endif
#undef STATIC_CAST

View File

@ -1,25 +0,0 @@
*** libs/pfl/common/pgpRMWOLock.c 2000/01/25 23:30:04 1.1.1.1
--- libs/pfl/common/pgpRMWOLock.c 2000/01/25 23:32:31 1.1.1.2
***************
*** 8,15 ****
____________________________________________________________________________*/
#include "pgpBase.h"
#include "pgpRMWOLock.h"
#if PGP_UNIX_SOLARIS
/*
--- 8,19 ----
____________________________________________________________________________*/
#include "pgpBase.h"
#include "pgpRMWOLock.h"
+
+ #ifdef __FreeBSD__
+ #define NULL 0 /* undefined for some reason */
+ #endif
#if PGP_UNIX_SOLARIS
/*

View File

@ -1,25 +1,14 @@
*** libs/pgpcdk/priv/crypto/bignum/bni80386_aout.s 2000/01/26 03:23:29 1.1
--- libs/pgpcdk/priv/crypto/bignum/bni80386_aout.s 2000/01/26 03:23:59 1.2
***************
*** 16,24 ****
--- libs/pgpcdk/priv/crypto/bignum/bni80386_aout.s.orig 1998-07-31 15:03:37.000000000 -0700
+++ libs/pgpcdk/priv/crypto/bignum/bni80386_aout.s 2008-08-31 16:41:34.000000000 -0700
@@ -17,7 +17,8 @@
# Different assemblers have different conventions here
# These conventions are for a.out format assembler
! align4=2 # could be 2 or 4
! align8=3 # could be 3 or 8
! align16=4 # cound be 4 or 16
-align4=2 # could be 2 or 4
-align8=3 # could be 3 or 8
-align16=4 # cound be 4 or 16
+# Changed from 2,3,4 to 4,8,16 for FreeBSD
+align4=4 # could be 2 or 4
+align8=8 # could be 3 or 8
+align16=16 # cound be 4 or 16
.text
--- 16,26 ----
# Different assemblers have different conventions here
# These conventions are for a.out format assembler
!
! # Changed from 2,3,4 to 4,8,16 for FreeBSD
! align4=4 # could be 2 or 4
! align8=8 # could be 3 or 8
! align16=16 # cound be 4 or 16
.text

View File

@ -1,15 +1,11 @@
*** libs/pgpcdk/pub/include/pgpSockets.h 2000/01/26 03:10:46 1.1.1.1
--- libs/pgpcdk/pub/include/pgpSockets.h 2000/01/26 03:13:58 1.1.1.2
***************
*** 30,35 ****
--- 30,39 ----
# include <netdb.h>
#endif
+ #ifdef __FreeBSD__
+ # include <sys/ioctl.h> /* Need FIONREAD */
+ #endif
+
#if PGP_WIN32
# include <winsock.h>
#endif
--- libs/pgpcdk/pub/include/pgpSockets.h.orig 1999-08-04 11:36:04.000000000 -0700
+++ libs/pgpcdk/pub/include/pgpSockets.h 2008-08-31 00:37:11.000000000 -0700
@@ -20,7 +20,7 @@ ________________________________________
#if PGP_UNIX
# include <sys/types.h>
# include <sys/socket.h>
-#if PGP_UNIX_LINUX
+#if PGP_UNIX_LINUX || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
# include <sys/time.h> /* Needed for unknown reason */
# include <sys/ioctl.h> /* Need FIONREAD */
#elif PGP_UNIX_SOLARIS

View File

@ -1,70 +0,0 @@
*** libs/pgpcdk/priv/networklib/keyserver/CCRSEntrustServer.cpp 2000/01/26 03:10:44 1.1.1.1
--- libs/pgpcdk/priv/networklib/keyserver/CCRSEntrustServer.cpp 2000/01/26 03:13:47 1.1.1.2
***************
*** 147,153 ****
if (! PGPKeySetRefIsValid(inCAsKeySet)) {
ThrowPGPError_(kPGPError_OptionNotFound);
}
! if (accumulatedCRLs == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
pgpErr = PGPGetCRLDistributionPoints(inCAKey, inCAsKeySet, &numPoints, &points,
--- 147,153 ----
if (! PGPKeySetRefIsValid(inCAsKeySet)) {
ThrowPGPError_(kPGPError_OptionNotFound);
}
! if (accumulatedCRLs == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
pgpErr = PGPGetCRLDistributionPoints(inCAKey, inCAsKeySet, &numPoints, &points,
***************
*** 173,179 ****
#if PGP_COMPILER_SUN
pgpCopyMemory(static_cast<PGPByte *>(crl), static_cast<PGPByte *>(accumulatedCRLs) + accumulatedSize, crlSize);
#else
! pgpCopyMemory(crl, static_cast<PGPByte *>(accumulatedCRLs) + accumulatedSize, crlSize);
#endif
accumulatedSize += crlSize;
currPoint += *currPointSize;
--- 173,179 ----
#if PGP_COMPILER_SUN
pgpCopyMemory(static_cast<PGPByte *>(crl), static_cast<PGPByte *>(accumulatedCRLs) + accumulatedSize, crlSize);
#else
! pgpCopyMemory((void *) crl, static_cast<PGPByte *>(accumulatedCRLs) + accumulatedSize, crlSize);
#endif
accumulatedSize += crlSize;
currPoint += *currPointSize;
***************
*** 215,221 ****
PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxBase64EncodedBufferSize(inMessageLength),
kPGPMemoryMgrFlags_None));
! if (encodedBuffer == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
encodedSize = Base64Encode( static_cast<const PGPByte *>(inMessage),
--- 215,221 ----
PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxBase64EncodedBufferSize(inMessageLength),
kPGPMemoryMgrFlags_None));
! if (encodedBuffer == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
encodedSize = Base64Encode( static_cast<const PGPByte *>(inMessage),
***************
*** 226,232 ****
PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxURLEncodedBufferSize(encodedSize) + bufSize,
kPGPMemoryMgrFlags_None));
! if (encodedBuffer == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
strcpy(urlEncodedBuffer, kMessagePrefix);
--- 226,232 ----
PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxURLEncodedBufferSize(encodedSize) + bufSize,
kPGPMemoryMgrFlags_None));
! if (encodedBuffer == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
strcpy(urlEncodedBuffer, kMessagePrefix);

View File

@ -1,31 +0,0 @@
*** libs/pgpcdk/priv/networklib/keyserver/CHTTPKeyServer.cpp 2000/01/26 03:10:44 1.1.1.1
--- libs/pgpcdk/priv/networklib/keyserver/CHTTPKeyServer.cpp 2000/01/26 03:13:48 1.1.1.2
***************
*** 341,353 ****
tempStorage = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
kTempStorageSize,
kPGPMemoryMgrFlags_None));
! if (tempStorage == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
buffer = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
result + 1,
kPGPMemoryMgrFlags_None));
! if (buffer == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
socketResult = PGPReceive( mSocket,
--- 341,353 ----
tempStorage = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
kTempStorageSize,
kPGPMemoryMgrFlags_None));
! if (tempStorage == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
buffer = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
result + 1,
kPGPMemoryMgrFlags_None));
! if (buffer == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
socketResult = PGPReceive( mSocket,

View File

@ -1,36 +0,0 @@
*** libs/pgpcdk/priv/networklib/keyserver/CHTTPPGPKeyServer.cpp 2000/01/26 03:10:44 1.1.1.1
--- libs/pgpcdk/priv/networklib/keyserver/CHTTPPGPKeyServer.cpp 2000/01/26 03:13:48 1.1.1.2
***************
*** 92,98 ****
path = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
strlen(kQueryPrefix) + strlen(query) + 1,
kPGPMemoryMgrFlags_None));
! if (path == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
sprintf(path, "%s%s", kQueryPrefix, static_cast<char *>(query));
--- 92,98 ----
path = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
strlen(kQueryPrefix) + strlen(query) + 1,
kPGPMemoryMgrFlags_None));
! if (path == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
sprintf(path, "%s%s", kQueryPrefix, static_cast<char *>(query));
***************
*** 188,194 ****
PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxURLEncodedBufferSize(bufSize) + postPrefixSize,
kPGPMemoryMgrFlags_None));
! if (urlEncodedBuffer == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
strcpy(urlEncodedBuffer, kPostPrefix);
--- 188,194 ----
PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxURLEncodedBufferSize(bufSize) + postPrefixSize,
kPGPMemoryMgrFlags_None));
! if (urlEncodedBuffer == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
strcpy(urlEncodedBuffer, kPostPrefix);

View File

@ -1,220 +0,0 @@
*** libs/pgpcdk/priv/networklib/keyserver/CHTTPXcertServer.cpp 2000/01/26 03:10:44 1.1.1.1
--- libs/pgpcdk/priv/networklib/keyserver/CHTTPXcertServer.cpp 2000/01/26 03:13:49 1.1.1.2
***************
*** 89,95 ****
digest = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxDigestedKeyBufferSize(),
kPGPMemoryMgrFlags_None));
! if (digest == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
digestSize = DigestKey(inCAKey, digest);
--- 89,95 ----
digest = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxDigestedKeyBufferSize(),
kPGPMemoryMgrFlags_None));
! if (digest == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
digestSize = DigestKey(inCAKey, digest);
***************
*** 98,104 ****
PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxBase64EncodedBufferSize(inBufferSize),
kPGPMemoryMgrFlags_None));
! if (encodedBuffer == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
bufSize = Base64Encode( static_cast<const PGPByte *>(inBuffer),
--- 98,104 ----
PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxBase64EncodedBufferSize(inBufferSize),
kPGPMemoryMgrFlags_None));
! if (encodedBuffer == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
bufSize = Base64Encode( static_cast<const PGPByte *>(inBuffer),
***************
*** 109,115 ****
cnk = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
cnkSize,
kPGPMemoryMgrFlags_None));
! if (cnk == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
pgpErr = PGPGetKeyPropertyBuffer( inRequestKey,
--- 109,115 ----
cnk = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
cnkSize,
kPGPMemoryMgrFlags_None));
! if (cnk == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
pgpErr = PGPGetKeyPropertyBuffer( inRequestKey,
***************
*** 121,127 ****
encodedCNK = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxHexEncodedBufferSize(cnkSize),
kPGPMemoryMgrFlags_None));
! if (encodedCNK == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
cnkSize = HexEncode(cnk, cnkSize, encodedCNK);
--- 121,127 ----
encodedCNK = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxHexEncodedBufferSize(cnkSize),
kPGPMemoryMgrFlags_None));
! if (encodedCNK == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
cnkSize = HexEncode(cnk, cnkSize, encodedCNK);
***************
*** 131,137 ****
strlen(kCA) + digestSize + strlen(kCNK) + cnkSize
+ strlen(kPKCS10_input) + GetMaxURLEncodedBufferSize(bufSize),
kPGPMemoryMgrFlags_None));
! if (post == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
postSize = sprintf(post, "%s%s%s%s%s", kCA, static_cast<char *>(digest), kCNK,
--- 131,137 ----
strlen(kCA) + digestSize + strlen(kCNK) + cnkSize
+ strlen(kPKCS10_input) + GetMaxURLEncodedBufferSize(bufSize),
kPGPMemoryMgrFlags_None));
! if (post == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
postSize = sprintf(post, "%s%s%s%s%s", kCA, static_cast<char *>(digest), kCNK,
***************
*** 196,202 ****
path = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
strlen(prefix) + strlen(query) + 1,
kPGPMemoryMgrFlags_None));
! if (path == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
sprintf(path, "%s%s", prefix, static_cast<char *>(query));
--- 196,202 ----
path = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
strlen(prefix) + strlen(query) + 1,
kPGPMemoryMgrFlags_None));
! if (path == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
sprintf(path, "%s%s", prefix, static_cast<char *>(query));
***************
*** 258,271 ****
digest = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxDigestedKeyBufferSize(),
kPGPMemoryMgrFlags_None));
! if (digest == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
digestSize = DigestKey(inCAKey, digest);
path = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
strlen(prefix) + digestSize + 1,
kPGPMemoryMgrFlags_None));
! if (path == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
sprintf(path, "%s%s", prefix, static_cast<char *>(digest));
--- 258,271 ----
digest = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxDigestedKeyBufferSize(),
kPGPMemoryMgrFlags_None));
! if (digest == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
digestSize = DigestKey(inCAKey, digest);
path = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
strlen(prefix) + digestSize + 1,
kPGPMemoryMgrFlags_None));
! if (path == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
}
sprintf(path, "%s%s", prefix, static_cast<char *>(digest));
***************
*** 323,329 ****
PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxBase64EncodedBufferSize(bufSize),
kPGPMemoryMgrFlags_None));
! if (encodedBuffer == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
bufSize = Base64Encode( static_cast<const PGPByte *>(buffer),
--- 323,329 ----
PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxBase64EncodedBufferSize(bufSize),
kPGPMemoryMgrFlags_None));
! if (encodedBuffer == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
bufSize = Base64Encode( static_cast<const PGPByte *>(buffer),
***************
*** 351,357 ****
buffer = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
bufSize,
kPGPMemoryMgrFlags_None));
! if (buffer == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
pgpErr = PGPFinalizeHash(hashContext, static_cast<char *>(buffer));
--- 351,357 ----
buffer = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
bufSize,
kPGPMemoryMgrFlags_None));
! if (buffer == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
pgpErr = PGPFinalizeHash(hashContext, static_cast<char *>(buffer));
***************
*** 400,406 ****
result = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
resultSize + 1,
kPGPMemoryMgrFlags_None));
! if (result == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
pgpCopyMemory(inResult, static_cast<char *>(result), resultSize + 1);
--- 400,406 ----
result = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
resultSize + 1,
kPGPMemoryMgrFlags_None));
! if (result == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
pgpCopyMemory(inResult, static_cast<char *>(result), resultSize + 1);
***************
*** 426,432 ****
decodedResult = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxBase64DecodedBufferSize(end - found),
kPGPMemoryMgrFlags_None));
! if (decodedResult == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
--- 426,432 ----
decodedResult = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxBase64DecodedBufferSize(end - found),
kPGPMemoryMgrFlags_None));
! if (decodedResult == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
***************
*** 470,476 ****
result = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxBase64DecodedBufferSize(end - found),
kPGPMemoryMgrFlags_None));
! if (result == 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};
--- 470,476 ----
result = static_cast<PGPByte *>(PGPNewData( PGPGetContextMemoryMgr(mContext),
GetMaxBase64DecodedBufferSize(end - found),
kPGPMemoryMgrFlags_None));
! if (result == (StPGPDataRef) 0) {
ThrowPGPError_(kPGPError_OutOfMemory);
};

View File

@ -1,15 +1,11 @@
*** libs/network/ldaplib/include/ldap.h 2000/01/26 03:10:31 1.1.1.1
--- libs/network/ldaplib/include/ldap.h 2000/01/26 03:12:53 1.1.1.2
***************
*** 90,95 ****
--- 90,99 ----
--- libs/network/ldaplib/include/ldap.h.orig 1999-08-04 11:35:42.000000000 -0700
+++ libs/network/ldaplib/include/ldap.h 2008-08-31 00:47:21.000000000 -0700
@@ -86,7 +86,7 @@ extern __declspec(dllimport) unsigned lo
#define GetThreadID GetCurrentThreadId
#elif PGP_UNIX_SOLARIS
#define GetThreadID thr_self
-#elif PGP_UNIX_LINUX || PGP_UNIX_AIX || PGP_UNIX_HPUX
+#elif PGP_UNIX_LINUX || PGP_UNIX_AIX || PGP_UNIX_HPUX || defined(__FreeBSD__)
/* This is for all pthreads systems, including Linux and AIX. */
#define GetThreadID pthread_self
#endif
+ #ifdef __FreeBSD__
+ #define GetThreadID pthread_self
+ #endif
+
#if PGP_MACINTOSH
#define Debug( level, fmt, arg1, arg2, arg3 ) {} /* Nothing */
#else

View File

@ -1,14 +1,11 @@
--- libs/pfl/common/lthread/pgpThreads.h.orig Mon Apr 19 10:59:53 1999
+++ libs/pfl/common/lthread/pgpThreads.h Thu Jan 22 12:34:15 2004
@@ -138,7 +138,9 @@
--- libs/pfl/common/lthread/pgpThreads.h.orig 1999-04-19 10:59:53.000000000 -0700
+++ libs/pfl/common/lthread/pgpThreads.h 2008-08-31 17:22:17.000000000 -0700
@@ -138,7 +138,7 @@ typedef pthread_key_t PGPThreadKey_t;
#endif /* end HAVE_PTHREAD_ATTR_CREATE */
/* My version of Linux has sem_init in pthreads.so, but *zero* headers ?? */
-#if HAVE_SEM_INIT && !PGP_UNIX_LINUX
+/* #if HAVE_SEM_INIT && !PGP_UNIX_LINUX
+ commented out for FreeBSD */
+#if 0
+#if HAVE_SEM_INIT && !PGP_UNIX_LINUX && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
#undef HAVE_SEMGET /* prefer POSIX sem_init over semget */
#define HAVE_SEMGET 0

View File

@ -1,13 +1,11 @@
--- libs/pfl/common/lthread/pgpSemaphore.c.old Tue Mar 17 21:08:17 1998
+++ libs/pfl/common/lthread/pgpSemaphore.c Thu Jan 22 13:00:16 2004
@@ -41,7 +41,9 @@
--- libs/pfl/common/lthread/pgpSemaphore.c.orig 1998-03-17 21:08:17.000000000 -0800
+++ libs/pfl/common/lthread/pgpSemaphore.c 2008-09-01 10:01:39.000000000 -0700
@@ -41,7 +41,7 @@ int PGPSemDestroy(PGPSem_t *sem)
#endif /* end PGP_UNIX_SOLARIS */
/* Linux has sem_init function but no headers ?? */
-#if HAVE_SEM_INIT && !PGP_UNIX_LINUX
+/* #if HAVE_SEM_INIT && !PGP_UNIX_LINUX
+ commented out for FreeBSD */
+#if 0
+#if HAVE_SEM_INIT && !PGP_UNIX_LINUX && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
PGPSemAttr_t PGPSemAttr_def = {0, 0};

View File

@ -1,11 +1,11 @@
--- libs/pgpcdk/priv/networklib/pgpsockets/common/pgpSockets.c.orig Fri Jan 23 19:46:45 2004
+++ libs/pgpcdk/priv/networklib/pgpsockets/common/pgpSockets.c Fri Jan 23 19:47:10 2004
@@ -41,8 +41,6 @@
--- libs/pgpcdk/priv/networklib/pgpsockets/common/pgpSockets.c.orig 1999-08-04 11:36:04.000000000 -0700
+++ libs/pgpcdk/priv/networklib/pgpsockets/common/pgpSockets.c 2008-08-31 00:40:02.000000000 -0700
@@ -39,7 +39,7 @@ ________________________________________
# define closesocket(x) close((x))
# define ioctlsocket(a,b,c) ioctl((a),(b),(c))
typedef int SOCKET;
#if PGP_UNIX_LINUX || PGP_UNIX_HPUX || PGP_UNIX_AIX
-#if PGP_UNIX_LINUX || PGP_UNIX_HPUX || PGP_UNIX_AIX
+#if PGP_UNIX_LINUX || PGP_UNIX_HPUX || PGP_UNIX_AIX || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
int gethostname (char * name, size_t namelen);
-#else
-int gethostname (char * name, int namelen);
#endif /* PGP_UNIX_LINUX */
#endif
#else
int gethostname (char * name, int namelen);

View File

@ -1,11 +1,11 @@
--- libs/pgpcdk/priv/crypto/random/pgpRandomPool.c.orig Fri Aug 6 13:56:49 1999
+++ libs/pgpcdk/priv/crypto/random/pgpRandomPool.c Fri Sep 29 20:41:26 2000
@@ -424,7 +424,7 @@
--- libs/pgpcdk/priv/crypto/random/pgpRandomPool.c.orig 1999-08-06 13:56:49.000000000 -0700
+++ libs/pgpcdk/priv/crypto/random/pgpRandomPool.c 2008-09-01 10:07:20.000000000 -0700
@@ -424,7 +424,7 @@ pgpInitGlobalRandomPoolContext( PGPRando
* #define UMULH_32(r,a,b) (r) = 0
*/
#ifndef UMULH_32
-#if defined(__GNUC__) && defined(__i386__)
+#if 0
+#if defined(__GNUC__) && defined(__i386__) && 0
/* Inline asm goodies */
#define UMULH_32(r,a,b) __asm__("mull %2" : "=d"(r) : "%a"(a), "mr"(b) : "ax")
#elif HAVE64

View File

@ -0,0 +1,6 @@
--- clients/pgp/cmdline/keygen.c.orig 1999-09-30 17:10:21.000000000 -0700
+++ clients/pgp/cmdline/keygen.c 2008-08-31 01:51:34.000000000 -0700
@@ -14,2 +14,3 @@ ________________________________________
#include <stdio.h>
+#include <string.h>

View File

@ -0,0 +1,11 @@
--- clients/pgp/cmdline/keymaint.c.orig 1999-05-12 14:01:04.000000000 -0700
+++ clients/pgp/cmdline/keymaint.c 2008-08-31 01:36:27.000000000 -0700
@@ -264,7 +264,7 @@ PGPError markSignatureChainDepths(struct
pgpAssertNoErr(err);
if ( (PGPUInt32)traceValue == 0) {
- (PGPUInt32)traceValue = depth;
+ traceValue = depth;
err = PGPSetKeyUserVal( key, traceValue);
pgpAssertNoErr(err);

View File

@ -0,0 +1,20 @@
--- clients/pgp/cmdline/prototypes.h.orig 1999-11-08 16:56:31.000000000 -0800
+++ clients/pgp/cmdline/prototypes.h 2008-08-31 01:49:53.000000000 -0700
@@ -307,7 +307,6 @@ int get_CONVERSION( );
int maintCheck( PGPFileSpecRef ringfilespec, int options );
struct newkey;
-int maintUpdate( PGPFileSpecRef ringfilespec, struct newkey const *nkeys );
void init_charset( void );
void CONVERT_TO_CANONICAL_CHARSET( char *s );
char EXT_C( char c );
@@ -317,9 +316,6 @@ struct IdeaCfbContext;
int cryptRandOpen( struct IdeaCfbContext *cfb );
void cryptRandSave( struct IdeaCfbContext *cfb );
-int cryptRandWriteFile( char const *name, struct IdeaCfbContext *cfb,
- unsigned bytes );
-
char * get_ext_c_ptr( void );
/* see libPGPui.a */

View File

@ -0,0 +1,6 @@
--- clients/pgp/cmdline/stubs.c.orig 2008-08-31 01:34:02.000000000 -0700
+++ clients/pgp/cmdline/stubs.c 2008-08-31 01:34:26.000000000 -0700
@@ -0,0 +1 @@
+#if 0
@@ -49,0 +51 @@ int maintUpdate(PGPFileSpecRef ringfiles
+#endif

View File

@ -0,0 +1,17 @@
--- libs/network/ldaplib/Makefile.orig 1999-08-04 11:35:42.000000000 -0700
+++ libs/network/ldaplib/Makefile 2008-08-31 01:17:43.000000000 -0700
@@ -237,14 +237,6 @@ makeconfig: .makefiles buildtools
CC=$(CC); \
OLDIFS="$$IFS"; \
IFS=":"; \
-if test -n "$CC"; then \
- for dir in $$PATH; do \
- if [ -f $$dir/gcc ]; then \
- CC=gcc; \
- break; \
- fi; \
- done; \
-fi; \
IFS="$$OLDIFS"; \
$(LN) ./build/platforms/$$PLATFORM-$$CC/Make-platform .make-platform; \
echo ""; \