fixed few incompatibility-issues with unslung-platform on nslu2 (ARM)

This commit is contained in:
Andrey Prygunkov
2008-03-03 17:20:46 +00:00
parent 3c5c76eec4
commit fff550ca37
14 changed files with 92 additions and 119 deletions

View File

@@ -373,13 +373,15 @@ void ListBinCommand::Execute()
bufsize += strlen(pFileInfo->GetSubject()) + 1;
bufsize += strlen(pFileInfo->GetFilename()) + 1;
bufsize += strlen(pFileInfo->GetNZBInfo()->GetDestDir()) + 1;
// align struct to 4-bytes, needed by ARM-processor (and may be others)
bufsize += bufsize % 4 > 0 ? 4 - bufsize % 4 : 0;
}
buf = (char*) malloc(bufsize);
char* bufptr = buf;
for (DownloadQueue::iterator it = pDownloadQueue->begin(); it != pDownloadQueue->end(); it++)
{
unsigned int iSizeHi, iSizeLo;
unsigned long iSizeHi, iSizeLo;
FileInfo* pFileInfo = *it;
SNZBListResponseEntry* pListAnswer = (SNZBListResponseEntry*) bufptr;
pListAnswer->m_iID = htonl(pFileInfo->GetID());
@@ -404,6 +406,12 @@ void ListBinCommand::Execute()
bufptr += ntohl(pListAnswer->m_iFilenameLen);
strcpy(bufptr, pFileInfo->GetNZBInfo()->GetDestDir());
bufptr += ntohl(pListAnswer->m_iDestDirLen);
// align struct to 4-bytes, needed by ARM-processor (and may be others)
if ((size_t)bufptr % 4 > 0)
{
pListAnswer->m_iDestDirLen = htonl(ntohl(pListAnswer->m_iDestDirLen) + 4 - (size_t)bufptr % 4);
bufptr += 4 - (size_t)bufptr % 4;
}
}
g_pQueueCoordinator->UnlockQueue();
@@ -414,7 +422,7 @@ void ListBinCommand::Execute()
if (htonl(ListRequest.m_bServerState))
{
unsigned int iSizeHi, iSizeLo;
unsigned long iSizeHi, iSizeLo;
ListResponse.m_iDownloadRate = htonl((int)(g_pQueueCoordinator->CalcCurrentDownloadSpeed() * 1024));
Util::SplitInt64(g_pQueueCoordinator->CalcRemainingSize(), &iSizeHi, &iSizeLo);
ListResponse.m_iRemainingSizeHi = htonl(iSizeHi);
@@ -494,6 +502,8 @@ void LogBinCommand::Execute()
{
Message* pMessage = (*pMessages)[i];
bufsize += strlen(pMessage->GetText()) + 1;
// align struct to 4-bytes, needed by ARM-processor (and may be others)
bufsize += bufsize % 4 > 0 ? 4 - bufsize % 4 : 0;
}
char* buf = (char*) malloc(bufsize);
@@ -509,6 +519,12 @@ void LogBinCommand::Execute()
bufptr += sizeof(SNZBLogResponseEntry);
strcpy(bufptr, pMessage->GetText());
bufptr += ntohl(pLogAnswer->m_iTextLen);
// align struct to 4-bytes, needed by ARM-processor (and may be others)
if ((size_t)bufptr % 4 > 0)
{
pLogAnswer->m_iTextLen = htonl(ntohl(pLogAnswer->m_iTextLen) + 4 - (size_t)bufptr % 4);
bufptr += 4 - (size_t)bufptr % 4;
}
}
g_pLog->UnlockMessages();
@@ -630,6 +646,8 @@ void PostQueueBinCommand::Execute()
bufsize += strlen(pPostJob->GetInfoName()) + 1;
bufsize += strlen(pPostJob->GetDestDir()) + 1;
bufsize += strlen(pPostJob->GetProgressLabel()) + 1;
// align struct to 4-bytes, needed by ARM-processor (and may be others)
bufsize += bufsize % 4 > 0 ? 4 - bufsize % 4 : 0;
}
time_t tCurTime = time(NULL);
@@ -661,6 +679,12 @@ void PostQueueBinCommand::Execute()
bufptr += ntohl(pPostQueueAnswer->m_iDestDirLen);
strcpy(bufptr, pPostJob->GetProgressLabel());
bufptr += ntohl(pPostQueueAnswer->m_iProgressLabelLen);
// align struct to 4-bytes, needed by ARM-processor (and may be others)
if ((size_t)bufptr % 4 > 0)
{
pPostQueueAnswer->m_iProgressLabelLen = htonl(ntohl(pPostQueueAnswer->m_iProgressLabelLen) + 4 - (size_t)bufptr % 4);
bufptr += 4 - (size_t)bufptr % 4;
}
}
g_pPrePostProcessor->UnlockPostQueue();

View File

@@ -41,6 +41,7 @@
#include "nzbget.h"
#include "ColoredFrontend.h"
#include "Util.h"
ColoredFrontend::ColoredFrontend()
{
@@ -77,7 +78,7 @@ void ColoredFrontend::PrintStatus()
if (fCurrentDownloadSpeed > 0.0 && !m_bPause)
{
long long remain_sec = m_lRemainingSize / ((long long int)(fCurrentDownloadSpeed * 1024));
long long remain_sec = m_lRemainingSize / ((long long)(fCurrentDownloadSpeed * 1024));
int h = remain_sec / 3600;
int m = (remain_sec % 3600) / 60;
int s = remain_sec % 60;
@@ -112,7 +113,7 @@ void ColoredFrontend::PrintStatus()
#endif
snprintf(tmp, 1024, " %d threads, %.0f KB/s, %.2f MB remaining%s%s%s%s%s\n",
m_iThreadCount, fCurrentDownloadSpeed, (float)(m_lRemainingSize / 1024.0 / 1024.0),
m_iThreadCount, fCurrentDownloadSpeed, (float)(Util::Int64ToFloat(m_lRemainingSize) / 1024.0 / 1024.0),
timeString, szPostStatus, m_bPause ? (m_bStandBy ? ", Paused" : ", Pausing") : "", szDownloadLimit, szControlSeq);
tmp[1024-1] = '\0';
printf("%s", tmp);

View File

@@ -103,7 +103,9 @@ bool DiskState::Save(DownloadQueue* pDownloadQueue)
fprintf(outfile, "%s\n", pNZBInfo->GetFilename());
fprintf(outfile, "%s\n", pNZBInfo->GetDestDir());
fprintf(outfile, "%i\n", pNZBInfo->GetFileCount());
fprintf(outfile, "%lu,%lu\n", (unsigned long)(pNZBInfo->GetSize() >> 32), (unsigned long)(pNZBInfo->GetSize()));
unsigned long High, Low;
Util::SplitInt64(pNZBInfo->GetSize(), &High, &Low);
fprintf(outfile, "%lu,%lu\n", High, Low);
}
// save file-infos
@@ -189,7 +191,7 @@ bool DiskState::Load(DownloadQueue* pDownloadQueue)
unsigned long High, Low;
if (fscanf(infile, "%lu,%lu\n", &High, &Low) != 2) goto error;
pNZBInfo->SetSize((((unsigned long long)High) << 32) + Low);
pNZBInfo->SetSize(Util::JoinInt64(High, Low));
}
// load file-infos
@@ -251,7 +253,9 @@ bool DiskState::SaveFileInfo(FileInfo* pFileInfo, const char* szFilename)
fprintf(outfile, "%s\n", pFileInfo->GetSubject());
fprintf(outfile, "%s\n", pFileInfo->GetFilename());
fprintf(outfile, "%i\n", pFileInfo->GetFilenameConfirmed());
fprintf(outfile, "%lu,%lu\n", (unsigned long)(pFileInfo->GetSize() >> 32), (unsigned long)(pFileInfo->GetSize()));
unsigned long High, Low;
Util::SplitInt64(pFileInfo->GetSize(), &High, &Low);
fprintf(outfile, "%lu,%lu\n", High, Low);
fprintf(outfile, "%i\n", pFileInfo->GetGroups()->size());
for (FileInfo::Groups::iterator it = pFileInfo->GetGroups()->begin(); it != pFileInfo->GetGroups()->end(); it++)
@@ -307,7 +311,7 @@ bool DiskState::LoadFileInfo(FileInfo* pFileInfo, const char * szFilename, bool
unsigned long High, Low;
if (fscanf(infile, "%lu,%lu\n", &High, &Low) != 2) goto error;
if (bFileSummary) pFileInfo->SetSize((((unsigned long long)High) << 32) + Low);
if (bFileSummary) pFileInfo->SetSize(Util::JoinInt64(High, Low));
if (bFileSummary) pFileInfo->SetRemainingSize(pFileInfo->GetSize());
int size;

View File

@@ -36,16 +36,9 @@ static const int NZBREQUESTPASSWORDSIZE = 32;
* Integer values are passed using network byte order (Big-Endian).
* Use function "htonl" and "ntohl" to convert integers to/from machine
' (host) byte order.
* All char-strings must end with NULL-char.
* All char-strings ends with NULL-char.
*/
// The pack-directive prevents aligning of structs.
// This makes them more portable and allows to use together servers and clients
// compiled on different cpu architectures
#ifdef HAVE_PRAGMA_PACK
#pragma pack(1)
#endif
// Possible values for field "m_iType" of struct "SNZBRequestBase":
enum eRemoteRequest
{
@@ -332,8 +325,4 @@ struct SNZBPostQueueResponseEntry
//char m_szProgressLabel[m_iProgressLabelLen]; // variable sized
};
#ifdef HAVE_PRAGMA_PACK
#pragma pack()
#endif
#endif

View File

@@ -50,6 +50,7 @@
#include "nzbget.h"
#include "NCursesFrontend.h"
#include "Options.h"
#include "Util.h"
#ifdef HAVE_CURSES_H
// curses.h header must be included last to avoid problems on Solaris
@@ -605,10 +606,10 @@ void NCursesFrontend::PrintStatus()
szPostStatus[0] = 0;
}
float fAverageSpeed = m_iDnTimeSec > 0 ? m_iAllBytes / m_iDnTimeSec / 1024 : 0;
float fAverageSpeed = Util::Int64ToFloat(m_iDnTimeSec > 0 ? m_iAllBytes / m_iDnTimeSec / 1024 : 0);
snprintf(tmp, MAX_SCREEN_WIDTH, " %d threads, %.0f KB/s, %.2f MB remaining%s%s%s%s, Avg. %.0f KB/s",
m_iThreadCount, fCurrentDownloadSpeed, (float)(m_lRemainingSize / 1024.0 / 1024.0), timeString,
m_iThreadCount, fCurrentDownloadSpeed, (float)(Util::Int64ToFloat(m_lRemainingSize) / 1024.0 / 1024.0), timeString,
szPostStatus, m_bPause ? (m_bStandBy ? ", Paused" : ", Pausing") : "", szDownloadLimit, fAverageSpeed);
tmp[MAX_SCREEN_WIDTH - 1] = '\0';
PlotLine(tmp, iStatusRow, 0, NCURSES_COLORPAIR_STATUS);
@@ -752,7 +753,7 @@ void NCursesFrontend::PrintFilename(FileInfo * pFileInfo, int iRow, bool bSelect
szCompleted[0] = '\0';
if (pFileInfo->GetRemainingSize() < pFileInfo->GetSize())
{
sprintf(szCompleted, ", %i%%", (int)(100 - pFileInfo->GetRemainingSize() * 100.0 / pFileInfo->GetSize()));
sprintf(szCompleted, ", %i%%", (int)(100 - Util::Int64ToFloat(pFileInfo->GetRemainingSize()) * 100.0 / Util::Int64ToFloat(pFileInfo->GetSize())));
}
char szNZBNiceName[1024];
@@ -769,7 +770,9 @@ void NCursesFrontend::PrintFilename(FileInfo * pFileInfo, int iRow, bool bSelect
}
char szBuffer[MAX_SCREEN_WIDTH];
snprintf(szBuffer, MAX_SCREEN_WIDTH, "%s%i%s %s%s (%.2f MB%s)%s", Brace1, pFileInfo->GetID(), Brace2, szNZBNiceName, pFileInfo->GetFilename(), pFileInfo->GetSize() / 1024.0 / 1024.0, szCompleted, pFileInfo->GetPaused() ? " (paused)" : "");
snprintf(szBuffer, MAX_SCREEN_WIDTH, "%s%i%s %s%s (%.2f MB%s)%s", Brace1, pFileInfo->GetID(),
Brace2, szNZBNiceName, pFileInfo->GetFilename(), (float)(Util::Int64ToFloat(pFileInfo->GetSize()) / 1024.0 / 1024.0),
szCompleted, pFileInfo->GetPaused() ? " (paused)" : "");
szBuffer[MAX_SCREEN_WIDTH - 1] = '\0';
PlotLine(szBuffer, iRow, 0, color);
@@ -779,15 +782,15 @@ void NCursesFrontend::FormatFileSize(char * szBuffer, int iBufLen, long long lFi
{
if (lFileSize > 1024 * 1024 * 1024)
{
snprintf(szBuffer, iBufLen, "%.2f GB", (float)lFileSize / 1024 / 1024 / 1024);
snprintf(szBuffer, iBufLen, "%.2f GB", (float)(Util::Int64ToFloat(lFileSize) / 1024 / 1024 / 1024));
}
else if (lFileSize > 1024 * 1024)
{
snprintf(szBuffer, iBufLen, "%.2f MB", (float)lFileSize / 1024 / 1024);
snprintf(szBuffer, iBufLen, "%.2f MB", (float)(Util::Int64ToFloat(lFileSize) / 1024 / 1024));
}
else if (lFileSize > 1024)
{
snprintf(szBuffer, iBufLen, "%.2f KB", (float)lFileSize / 1024);
snprintf(szBuffer, iBufLen, "%.2f KB", (float)(Util::Int64ToFloat(lFileSize) / 1024));
}
else
{

View File

@@ -51,7 +51,6 @@
#include "NewsServer.h"
#include "MessageBase.h"
extern float g_fDownloadRate;
extern ServerPool* g_pServerPool;
#ifdef HAVE_GETOPT_LONG

View File

@@ -269,7 +269,7 @@ bool RemoteClient::RequestServerList()
szCompleted[0] = '\0';
if (lRemainingSize < lFileSize)
{
sprintf(szCompleted, ", %i%s", (int)(100 - lRemainingSize * 100.0 / lFileSize), "%");
sprintf(szCompleted, ", %i%s", (int)(100 - Util::Int64ToFloat(lRemainingSize) * 100.0 / Util::Int64ToFloat(lFileSize)), "%");
}
char szStatus[100];
if (ntohl(pListAnswer->m_bPaused))
@@ -288,7 +288,8 @@ bool RemoteClient::RequestServerList()
char szNZBNiceName[1024];
NZBInfo::MakeNiceNZBName(szNZBFilename, szNZBNiceName, 1024);
printf("[%i] %s%c%s (%.2f MB%s)%s\n", ntohl(pListAnswer->m_iID), szNZBNiceName, (int)PATH_SEPARATOR, szFilename, lFileSize / 1024.0 / 1024.0, szCompleted, szStatus);
printf("[%i] %s%c%s (%.2f MB%s)%s\n", ntohl(pListAnswer->m_iID), szNZBNiceName, (int)PATH_SEPARATOR, szFilename,
(float)(Util::Int64ToFloat(lFileSize) / 1024.0 / 1024.0), szCompleted, szStatus);
pBufPtr += sizeof(SNZBListResponseEntry) + ntohl(pListAnswer->m_iNZBFilenameLen) +
ntohl(pListAnswer->m_iSubjectLen) + ntohl(pListAnswer->m_iFilenameLen) + ntohl(pListAnswer->m_iDestDirLen);
@@ -298,11 +299,12 @@ bool RemoteClient::RequestServerList()
printf("Files: %i\n", ntohl(ListResponse.m_iNrTrailingEntries));
if (lPaused > 0)
{
printf("Remaining size: %.2f MB (+%.2f MB paused)\n", lRemaining / 1024.0 / 1024.0, lPaused / 1024.0 / 1024.0);
printf("Remaining size: %.2f MB (+%.2f MB paused)\n", (float)(Util::Int64ToFloat(lRemaining) / 1024.0 / 1024.0),
(float)(Util::Int64ToFloat(lPaused) / 1024.0 / 1024.0));
}
else
{
printf("Remaining size: %.2f MB\n", lRemaining / 1024.0 / 1024.0);
printf("Remaining size: %.2f MB\n", (float)(Util::Int64ToFloat(lRemaining) / 1024.0 / 1024.0));
}
printf("Current download rate: %.1f KB/s\n", (float)(ntohl(ListResponse.m_iDownloadRate) / 1024.0));
@@ -310,7 +312,7 @@ bool RemoteClient::RequestServerList()
}
long long iAllBytes = Util::JoinInt64(ntohl(ListResponse.m_iDownloadedBytesHi), ntohl(ListResponse.m_iDownloadedBytesLo));
float fAverageSpeed = ntohl(ListResponse.m_iDownloadTimeSec) > 0 ? iAllBytes / ntohl(ListResponse.m_iDownloadTimeSec) : 0;
float fAverageSpeed = Util::Int64ToFloat(ntohl(ListResponse.m_iDownloadTimeSec) > 0 ? iAllBytes / ntohl(ListResponse.m_iDownloadTimeSec) : 0);
printf("Session download rate: %.1f KB/s\n", (float)(fAverageSpeed / 1024.0));
if (ntohl(ListResponse.m_iDownloadLimit) > 0)
@@ -330,7 +332,7 @@ bool RemoteClient::RequestServerList()
s = sec % 60;
printf("Download time: %.2d:%.2d:%.2d\n", h, m, s);
printf("Downloaded: %.2f MB\n", iAllBytes / 1024.0 / 1024.0);
printf("Downloaded: %.2f MB\n", (float)(Util::Int64ToFloat(iAllBytes) / 1024.0 / 1024.0));
printf("Threads running: %i\n", ntohl(ListResponse.m_iThreadCount));
@@ -604,7 +606,14 @@ bool RemoteClient::RequestPostQueue()
(int)ntohl(PostQueueResponse.m_MessageBase.m_iSignature) != (int)NZBMESSAGE_SIGNATURE ||
ntohl(PostQueueResponse.m_MessageBase.m_iStructSize) != sizeof(PostQueueResponse))
{
printf("invaid response received: either not nzbget-server or wrong server version\n");
if (iResponseLen < 0)
{
printf("No response received (timeout)\n");
}
else
{
printf("Invalid response received: either not nzbget-server or wrong server version\n");
}
return false;
}

View File

@@ -378,15 +378,22 @@ void Util::MakeValidFilename(char* szFilename, char cReplaceChar)
}
}
long long Util::JoinInt64(unsigned int Hi, unsigned int Lo)
long long Util::JoinInt64(unsigned long Hi, unsigned long Lo)
{
return (((long long)Hi) << 32) + Lo;
}
void Util::SplitInt64(long long Int64, unsigned int* Hi, unsigned int* Lo)
void Util::SplitInt64(long long Int64, unsigned long* Hi, unsigned long* Lo)
{
*Hi = (unsigned int)(Int64 >> 32);
*Lo = (unsigned int)Int64;
*Hi = (unsigned long)(Int64 >> 32);
*Lo = (unsigned long)Int64;
}
float Util::Int64ToFloat(long long Int64)
{
unsigned long Hi = (unsigned long)(Int64 >> 32);
unsigned long Lo = (unsigned long)Int64;
return ((unsigned long)(1 << 30)) * 4.0 * Hi + Lo;
}
float Util::EqualTime(_timeval* t1, _timeval* t2)
@@ -485,7 +492,7 @@ unsigned int DecodeByteQuartet(char* szInputBuffer, char* szOutputBuffer)
return 3;
}
return -1;
return 0;
}
unsigned int Util::DecodeBase64(char* szInputBuffer, int iInputBufferLength, char* szOutputBuffer)

11
Util.h
View File

@@ -74,8 +74,15 @@ public:
static bool ForceDirectories(const char* szPath);
static long long FileSize(const char* szFilename);
static long long JoinInt64(unsigned int Hi, unsigned int Lo);
static void SplitInt64(long long Int64, unsigned int* Hi, unsigned int* Lo);
static long long JoinInt64(unsigned long Hi, unsigned long Lo);
static void SplitInt64(long long Int64, unsigned long* Hi, unsigned long* Lo);
/**
* Int64ToFloat converts Int64 to float.
* Simple (float)Int64 does not work on all compilers,
* for example on ARM for NSLU2 (unslung).
*/
static float Int64ToFloat(long long Int64);
static float EqualTime(_timeval* t1, _timeval* t2);
static bool EmptyTime(_timeval* t);

View File

@@ -699,7 +699,7 @@ void StatusXmlCommand::Execute()
"\"ServerStandBy\" : %s\n"
"}\n";
unsigned int iRemainingSizeHi, iRemainingSizeLo;
unsigned long iRemainingSizeHi, iRemainingSizeLo;
int iDownloadRate = (int)(g_pQueueCoordinator->CalcCurrentDownloadSpeed() * 1024);
long long iRemainingSize = g_pQueueCoordinator->CalcRemainingSize();
Util::SplitInt64(iRemainingSize, &iRemainingSizeHi, &iRemainingSizeLo);
@@ -710,7 +710,7 @@ void StatusXmlCommand::Execute()
PrePostProcessor::PostQueue* pPostQueue = g_pPrePostProcessor->LockPostQueue();
int iParJobCount = pPostQueue->size();
g_pPrePostProcessor->UnlockPostQueue();
unsigned int iDownloadedSizeHi, iDownloadedSizeLo;
unsigned long iDownloadedSizeHi, iDownloadedSizeLo;
int iUpTimeSec, iDownloadTimeSec;
long long iAllBytes;
bool bServerStandBy;
@@ -855,8 +855,8 @@ void ListFilesXmlCommand::Execute()
for (DownloadQueue::iterator it = pDownloadQueue->begin(); it != pDownloadQueue->end(); it++)
{
FileInfo* pFileInfo = *it;
unsigned int iFileSizeHi, iFileSizeLo;
unsigned int iRemainingSizeLo, iRemainingSizeHi;
unsigned long iFileSizeHi, iFileSizeLo;
unsigned long iRemainingSizeLo, iRemainingSizeHi;
char szNZBNicename[1024];
Util::SplitInt64(pFileInfo->GetSize(), &iFileSizeHi, &iFileSizeLo);
Util::SplitInt64(pFileInfo->GetRemainingSize(), &iRemainingSizeHi, &iRemainingSizeLo);
@@ -950,9 +950,9 @@ void ListGroupsXmlCommand::Execute()
for (GroupQueue::iterator it = groupQueue.begin(); it != groupQueue.end(); it++)
{
GroupInfo* pGroupInfo = *it;
unsigned int iFileSizeHi, iFileSizeLo, iFileSizeMB;
unsigned int iRemainingSizeLo, iRemainingSizeHi, iRemainingSizeMB;
unsigned int iPausedSizeLo, iPausedSizeHi, iPausedSizeMB;
unsigned long iFileSizeHi, iFileSizeLo, iFileSizeMB;
unsigned long iRemainingSizeLo, iRemainingSizeHi, iRemainingSizeMB;
unsigned long iPausedSizeLo, iPausedSizeHi, iPausedSizeMB;
char szNZBNicename[1024];
Util::SplitInt64(pGroupInfo->GetNZBInfo()->GetSize(), &iFileSizeHi, &iFileSizeLo);
iFileSizeMB = pGroupInfo->GetNZBInfo()->GetSize() / 1024 / 1024;

View File

@@ -43,9 +43,6 @@
/* Define to 1 if you have the <ncurses/ncurses.h> header file. */
#undef HAVE_NCURSES_NCURSES_H
/* Define to 1 to use pragma pack directive in MessageBase.h */
#undef HAVE_PRAGMA_PACK
/* Define to 1 if stat64 is supported */
#undef HAVE_STAT64

53
configure vendored
View File

@@ -6018,59 +6018,6 @@ _ACEOF
fi
{ echo "$as_me:$LINENO: checking for pragma pack" >&5
echo $ECHO_N "checking for pragma pack... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#pragma pack(1)
#pragma pack()
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define HAVE_PRAGMA_PACK 1
_ACEOF
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
INCVAL="${LIBPREF}/include/libxml2"
LIBVAL="${LIBPREF}/lib"

View File

@@ -174,17 +174,6 @@ if test "$HAVE_FUNCTION_MACRO" != "yes"; then
fi
dnl
dnl check for pragma pack
dnl
AC_MSG_CHECKING(for pragma pack)
AC_TRY_COMPILE([#pragma pack(1)
#pragma pack()],,
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PRAGMA_PACK],1,[Define to 1 to use pragma pack directive in MessageBase.h]),
AC_MSG_RESULT([no]))
dnl
dnl checks for libxml2 includes and libraries.
dnl

View File

@@ -43,9 +43,6 @@
/* Define to 1 if getopt_long is supported */
#undef HAVE_GETOPT_LONG
/* Define to 1 to use pragma pack directive in MessageBase.h */
#define HAVE_PRAGMA_PACK
/* Define to 1 if variadic macros are supported */
#define HAVE_VARIADIC_MACROS