[Sphere-axis-commits] CVS: axissvr ClientObj.cpp,1.8,1.9 ClientObj.h,1.4,1.5 DBConfig.cpp,1.6,1.7 DB
Brought to you by:
pesterle
From: Philip E. <pes...@us...> - 2003-08-04 23:20:57
|
Update of /cvsroot/sphere-axis/axissvr In directory sc8-pr-cvs1:/tmp/cvs-serv12156 Modified Files: ClientObj.cpp ClientObj.h DBConfig.cpp DBConfig.h Makefile.am Makefile.in ServerConfiguration.cpp ServerConfiguration.h ServerObj.cpp ServerObj.h StdAfx.h configure configure.in gwhogsvr.cpp gwhogsvr.h ntservice.h Log Message: Changes to AxisServer code for linux compile. Still needs some tweaking to get a usable linux version, however. Index: ClientObj.cpp =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/ClientObj.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** ClientObj.cpp 19 Jun 2003 21:37:52 -0000 1.8 --- ClientObj.cpp 4 Aug 2003 23:20:54 -0000 1.9 *************** *** 65,69 **** if ( dwBytesSent + MAX_BUFFER > m_pServer->m_sSpawns.length() * sizeof(TCHAR) ) bytesToCopy = m_pServer->m_sSpawns.length() * sizeof(TCHAR) - dwBytesSent; ! memcpy(szBuf, (void *) m_pServer->m_sSpawns.at(dwBytesSent / sizeof(TCHAR)), bytesToCopy); dwBytesSent += bytesToCopy; Send((BYTE*)szBuf, bytesToCopy); --- 65,70 ---- if ( dwBytesSent + MAX_BUFFER > m_pServer->m_sSpawns.length() * sizeof(TCHAR) ) bytesToCopy = m_pServer->m_sSpawns.length() * sizeof(TCHAR) - dwBytesSent; ! const char * pCopy = m_pServer->m_sSpawns.c_str() + (dwBytesSent / sizeof(TCHAR)); ! memcpy(szBuf, (void *) pCopy, bytesToCopy); dwBytesSent += bytesToCopy; Send((BYTE*)szBuf, bytesToCopy); *************** *** 83,87 **** if ( _tcsstr(pszFileName, _T(":")) == NULL ) #else ! if ( *pszFileName != _T("/") ) #endif _stprintf(szFullPath, _T("%s%s"), m_pServer->BasePath(), pszFileName); --- 84,88 ---- if ( _tcsstr(pszFileName, _T(":")) == NULL ) #else ! if ( _tcscmp(pszFileName, _T("/")) != 0 ) #endif _stprintf(szFullPath, _T("%s%s"), m_pServer->BasePath(), pszFileName); *************** *** 186,190 **** if ( _tcsstr(pszFileName, _T(":")) == NULL ) #else ! if ( *pszFileName != _T("/") ) #endif _stprintf(szFullPath, _T("%s%s"), m_pServer->BasePath(), pszFileName); --- 187,191 ---- if ( _tcsstr(pszFileName, _T(":")) == NULL ) #else ! if ( _tcscmp(pszFileName, _T("/")) != 0 ) #endif _stprintf(szFullPath, _T("%s%s"), m_pServer->BasePath(), pszFileName); *************** *** 574,578 **** memset(&szLine[0], 0, sizeof(szLine)); ULONG iBlock = i; ! for ( int j = 0; j < 16; j++ ) { TCHAR s[4]; --- 575,580 ---- memset(&szLine[0], 0, sizeof(szLine)); ULONG iBlock = i; ! int j = 0; ! for ( j = 0; j < 16; j++ ) { TCHAR s[4]; *************** *** 775,780 **** #else // LINUX - unsigned int iSize = MAX_BUFFER; - unsigned int iLen = 0; DIR * dirp; struct dirent *direntp; --- 777,780 ---- *************** *** 792,796 **** // Handle the error _tprintf(_T("Unable to open directdory %s\n"), szPath); ! Send(szEOF, strlen(szEOF)); return; } --- 792,796 ---- // Handle the error _tprintf(_T("Unable to open directdory %s\n"), szPath); ! Send((BYTE*)szEOF, strlen(szEOF)); return; } *************** *** 814,833 **** { // it's a directory ! TCHAR szPaths[MAX_PATH]; ! _stprintf(szPaths, pClient->m_pServer->m_szAllowedPaths); ! TCHAR * pszTok = _tcstok(szPaths, _T(":")); ! while ( pszTok != NULL ) ! { ! if ( _tcscmp(pszTok, szEntry) == 0 ) ! { ! bAllowed = TRUE; ! break; ! } ! pszTok = _tcstok(NULL, _T(":")); ! } } if ( S_ISREG(filestat.st_mode) || S_ISLNK(filestat.st_mode) ) { - // it's a regular file. TCHAR * pszExtension = NULL; for ( int i = (int) _tcsclen(direntp->d_name); i > 0; i-- ) --- 814,821 ---- { // it's a directory ! bAllowed = m_pServer->m_config.PathIsAllowed(direntp->d_name); } if ( S_ISREG(filestat.st_mode) || S_ISLNK(filestat.st_mode) ) { TCHAR * pszExtension = NULL; for ( int i = (int) _tcsclen(direntp->d_name); i > 0; i-- ) *************** *** 840,857 **** } if ( pszExtension != NULL ) ! { ! TCHAR szExtensions[MAX_PATH]; ! _stprintf(szExtensions, pClient->m_pServer->m_szAllowedExtensions); ! TCHAR * pszTok = _tcstok(szExtensions, _T(":")); ! while ( pszTok != NULL ) ! { ! if ( _tcscmp(pszTok, pszExtension) == 0 ) ! { ! bAllowed = TRUE; ! break; ! } ! pszTok = _tcstok(NULL, _T(":")); ! } ! } } if ( bAllowed ) --- 828,832 ---- } if ( pszExtension != NULL ) ! bAllowed = m_pServer->m_config.ExtensionIsAllowed(pszExtension); } if ( bAllowed ) *************** *** 871,875 **** if ( iLen + _tcsclen(direntp->d_name) + sizeof(int) + 1 >= sizeof(szBuffer) ) { ! Send(szBuffer, iLen); memset(szBuffer, 0x00, sizeof(szBuffer)); iLen = 0; --- 846,850 ---- if ( iLen + _tcsclen(direntp->d_name) + sizeof(int) + 1 >= sizeof(szBuffer) ) { ! Send((BYTE*)szBuffer, iLen); memset(szBuffer, 0x00, sizeof(szBuffer)); iLen = 0; *************** *** 879,885 **** } } ! Send(szBuffer, iLen); closedir(dirp); ! Send(szEOF, _tcsclen(szEOF)); #endif } --- 854,860 ---- } } ! Send((BYTE*)szBuffer, iLen); closedir(dirp); ! Send((BYTE*)szEOF, _tcsclen(szEOF)); #endif } *************** *** 899,907 **** --- 874,890 ---- } + #ifdef _WIN32 void CAxisClient::EntryProc(LPVOID pData) + #else + void * CAxisClient::EntryProc(LPVOID pData) + #endif { CAxisClient * pClient = (CAxisClient *) pData; pClient->Work(); + #ifdef _WIN32 return; + #else + return NULL; + #endif } *************** *** 937,941 **** #else close(m_sock); ! return NULL; #endif } --- 920,924 ---- #else close(m_sock); ! return; #endif } *************** *** 970,974 **** close(m_sock); m_bIsFinished = TRUE; ! return NULL; #endif } --- 953,957 ---- close(m_sock); m_bIsFinished = TRUE; ! return; #endif } *************** *** 1397,1405 **** bind(m_sock, (LPSOCKADDR) &sin, sizeof(sin)); connect(m_sock, (LPSOCKADDR) &sin, sizeof(sin)); - #ifdef _WIN32 struct linger opt; - #else - struct LINGER opt; - #endif opt.l_onoff = 1; opt.l_linger = 60; --- 1380,1384 ---- *************** *** 1510,1512 **** else return m_pServer->Login(pszID, pszPassword, pszIP, pHost); ! } \ No newline at end of file --- 1489,1491 ---- else return m_pServer->Login(pszID, pszPassword, pszIP, pHost); ! } Index: ClientObj.h =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/ClientObj.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ClientObj.h 16 Jun 2003 22:05:59 -0000 1.4 --- ClientObj.h 4 Aug 2003 23:20:54 -0000 1.5 *************** *** 34,38 **** --- 34,42 ---- SOCKET Socket() { return m_sock; } void Socket(SOCKET s) { m_sock = s; } + #ifdef _WIN32 static void _cdecl EntryProc(LPVOID pData); + #else + static void * EntryProc(LPVOID pData); + #endif BOOL IsFinished() { return m_bIsFinished; } void Server(CAxisServer *pServer) { m_pServer = pServer; } *************** *** 59,63 **** CAxisServer * m_pServer; TCHAR m_szIPAddr[256]; ! HOSTENT m_host; int m_iDBUserID; --- 63,67 ---- CAxisServer * m_pServer; TCHAR m_szIPAddr[256]; ! HOSTENT m_host; int m_iDBUserID; *************** *** 84,86 **** }; ! #endif \ No newline at end of file --- 88,91 ---- }; ! #endif ! Index: DBConfig.cpp =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/DBConfig.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** DBConfig.cpp 23 Jun 2003 14:46:41 -0000 1.6 --- DBConfig.cpp 4 Aug 2003 23:20:54 -0000 1.7 *************** *** 22,27 **** */ ! #include "stdafx.h" ! #include "dbconfig.h" #include "ServerObj.h" --- 22,27 ---- */ ! #include "StdAfx.h" ! #include "DBConfig.h" #include "ServerObj.h" *************** *** 539,541 **** } return bPermissions; ! } \ No newline at end of file --- 539,541 ---- } return bPermissions; ! } Index: DBConfig.h =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/DBConfig.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** DBConfig.h 17 Jun 2003 22:33:08 -0000 1.5 --- DBConfig.h 4 Aug 2003 23:20:54 -0000 1.6 *************** *** 22,26 **** */ ! #pragma once #include <sql.h> --- 22,27 ---- */ ! #ifndef __DBCONFIG_H__ ! #define __DBCONFIG_H__ #include <sql.h> *************** *** 68,69 **** --- 69,72 ---- class CAxisServer * m_pServer; }; + + #endif // __DBCONFIG_H__ Index: Makefile.am =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Makefile.am 9 May 2002 22:19:43 -0000 1.1 --- Makefile.am 4 Aug 2003 23:20:54 -0000 1.2 *************** *** 1,2 **** bin_PROGRAMS = axissvr ! axissvr_SOURCES = gwhogsvr.cpp --- 1,2 ---- bin_PROGRAMS = axissvr ! axissvr_SOURCES = ClientObj.cpp DBConfig.cpp ServerConfiguration.cpp ServerObj.cpp gwhogsvr.cpp Index: Makefile.in =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/Makefile.in,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Makefile.in 9 May 2002 22:19:43 -0000 1.1 --- Makefile.in 4 Aug 2003 23:20:54 -0000 1.2 *************** *** 66,70 **** bin_PROGRAMS = axissvr ! axissvr_SOURCES = gwhogsvr.cpp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs --- 66,70 ---- bin_PROGRAMS = axissvr ! axissvr_SOURCES = ClientObj.cpp DBConfig.cpp ServerConfiguration.cpp ServerObj.cpp gwhogsvr.cpp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs *************** *** 77,81 **** LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ ! axissvr_OBJECTS = gwhogsvr.o axissvr_LDADD = $(LDADD) axissvr_DEPENDENCIES = --- 77,82 ---- LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ ! axissvr_OBJECTS = ClientObj.o DBConfig.o ServerConfiguration.o \ ! ServerObj.o gwhogsvr.o axissvr_LDADD = $(LDADD) axissvr_DEPENDENCIES = *************** *** 92,98 **** DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ! TAR = tar GZIP_ENV = --best ! DEP_FILES = .deps/gwhogsvr.P SOURCES = $(axissvr_SOURCES) OBJECTS = $(axissvr_OBJECTS) --- 93,100 ---- DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ! TAR = gtar GZIP_ENV = --best ! DEP_FILES = .deps/ClientObj.P .deps/DBConfig.P \ ! .deps/ServerConfiguration.P .deps/ServerObj.P .deps/gwhogsvr.P SOURCES = $(axissvr_SOURCES) OBJECTS = $(axissvr_OBJECTS) Index: ServerConfiguration.cpp =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/ServerConfiguration.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ServerConfiguration.cpp 19 Jun 2003 21:37:52 -0000 1.3 --- ServerConfiguration.cpp 4 Aug 2003 23:20:54 -0000 1.4 *************** *** 3,8 **** ////////////////////////////////////////////////////////////////////// ! #include "stdafx.h" ! #include "axisserver.h" #include "ServerConfiguration.h" --- 3,8 ---- ////////////////////////////////////////////////////////////////////// ! #include "StdAfx.h" ! #include "gwhogsvr.h" #include "ServerConfiguration.h" *************** *** 88,98 **** m_iErrorCount++; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ! CString s, message; va_list args; va_start(args, msg); ! s.FormatV(msg, args); va_end(args); ! s.Replace(_T('\t'), _T(' ')); ! if ( s.GetLength() > 0 ) m_sErrors += s; return; --- 88,100 ---- m_iErrorCount++; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; ! TCHAR s[MAX_BUFFER]; va_list args; va_start(args, msg); ! _vstprintf(s, msg, args); va_end(args); ! for ( int i = 0; i < _tcslen(s); i++ ) ! if ( s[i] == _T('\t') ) ! s[i] = _T(' '); ! if ( _tcslen(s) > 0 ) m_sErrors += s; return; *************** *** 476,480 **** --- 478,486 ---- WCHAR * pwString = new WCHAR [iLen + 1]; memset(pwString, 0x00, (iLen + 1) * 2); + #ifdef _WIN32 MultiByteToWideChar(CP_UTF8, 0, (const char*) s, iLen, pwString, iLen); + #else + // Need to build a portable version of this function + #endif TCHAR * szOut = new TCHAR [iLen + 1]; memset(szOut, 0x00, sizeof(TCHAR) * (iLen + 1)); *************** *** 625,629 **** // String Array { ! CStringArray *p = (CStringArray*) pData; // Parse through the _string for newlines int c = 0; --- 631,635 ---- // String Array { ! vector<_string> *p = (vector<_string>*) pData; // Parse through the _string for newlines int c = 0; *************** *** 635,639 **** while ( i != s.end() ) { ! if ( i == _T("\t") ) i = s.erase(i); else --- 641,645 ---- while ( i != s.end() ) { ! if ( *i == _T('\t') ) i = s.erase(i); else *************** *** 684,686 **** } return TRUE; ! } \ No newline at end of file --- 690,692 ---- } return TRUE; ! } Index: ServerConfiguration.h =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/ServerConfiguration.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ServerConfiguration.h 19 Jun 2003 21:37:52 -0000 1.3 --- ServerConfiguration.h 4 Aug 2003 23:20:54 -0000 1.4 *************** *** 11,15 **** #include <libxml/parser.h> ! #include <libxml/parserinternals.h> #include <string> --- 11,15 ---- #include <libxml/parser.h> ! #include <libxml/parserInternals.h> #include <string> Index: ServerObj.cpp =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/ServerObj.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** ServerObj.cpp 17 Jun 2003 22:33:08 -0000 1.5 --- ServerObj.cpp 4 Aug 2003 23:20:54 -0000 1.6 *************** *** 26,30 **** #include "ServerObj.h" #include "ClientObj.h" - #include "MainFrm.h" #include "ntservice.h" #include "gwhogsvr.h" --- 26,29 ---- *************** *** 91,95 **** --- 90,96 ---- CAxisServer::CAxisServer() { + #ifdef _WIN32 m_pService = new CService(_T("axissvr"), _T("Axis Server"), _T("")); + #endif m_sock = 0; m_bInitialized = FALSE; *************** *** 105,119 **** if ( !m_bIsFinished ) Shutdown(); if ( m_pService ) delete m_pService; if ( m_pDB ) delete m_pDB; } - #ifdef WIN32 int CAxisServer::Create() - #else - int main(int argc, TCHAR *argv[]) - #endif { m_lastSpawnLoadTime = 0; --- 106,118 ---- if ( !m_bIsFinished ) Shutdown(); + #ifdef _WIN32 if ( m_pService ) delete m_pService; + #endif if ( m_pDB ) delete m_pDB; } int CAxisServer::Create() { m_lastSpawnLoadTime = 0; *************** *** 123,127 **** --- 122,137 ---- } + #ifndef WIN32 + int main(int argc, TCHAR *argv[]) + { + + } + #endif + + #ifdef _WIN32 void _cdecl CAxisServer::LoadSpawns(LPVOID pData) + #else + void * CAxisServer::LoadSpawns(LPVOID pData) + #endif { m_bSpawnsLoading = TRUE; *************** *** 322,325 **** --- 332,336 ---- } + #ifdef _WIN32 if ( m_pService->GetState() == SERVICE_STOP_PENDING ) { *************** *** 327,330 **** --- 338,342 ---- return TRUE; } + #endif // Periodically, reload the spawnpoint information. *************** *** 476,479 **** --- 488,492 ---- // Set the font + #ifdef _WIN32 if ( !m_config.FontName().empty() ) m_pWnd->SetConsoleFont(m_config.FontName().c_str(), m_config.FontSize(), m_config.FontFlags()); *************** *** 481,484 **** --- 494,498 ---- // Set the geometry SetGeometry(); + #endif m_bInitialized = TRUE; *************** *** 843,847 **** { SysMessage(_T("ERROR: Trying to delete a client, but clients vector is empty. Axis Server may be unstable!\n")); ! return NULL; } --- 857,861 ---- { SysMessage(_T("ERROR: Trying to delete a client, but clients vector is empty. Axis Server may be unstable!\n")); ! return m_vClients.begin(); } *************** *** 859,870 **** } SysMessage(_T("ERROR: Unable to find client object to remove in the clients vector. Axis Server may be unstable!\n")); ! return NULL; } ! CString CAxisServer::GetVersionString() { ! CString csVersion; ! csVersion.Format(_T("%s"), SVR_VERSION); ! return csVersion; } --- 873,884 ---- } SysMessage(_T("ERROR: Unable to find client object to remove in the clients vector. Axis Server may be unstable!\n")); ! return m_vClients.begin(); } ! _string CAxisServer::GetVersionString() { ! _string sVersion; ! sVersion.assign(SVR_VERSION); ! return sVersion; } *************** *** 882,886 **** } #else ! signal(SIGPIPE, SIm_IGN); if(pthread_mutex_init(&m_hStdioMutex, NULL)) { --- 896,900 ---- } #else ! signal(SIGPIPE, SIG_IGN); if(pthread_mutex_init(&m_hStdioMutex, NULL)) { *************** *** 895,898 **** --- 909,913 ---- BOOL CAxisServer::CreateServerPipe() { + #ifdef _WIN32 // Create Security Descriptor SECURITY_DESCRIPTOR sd; *************** *** 926,929 **** --- 941,948 ---- } return TRUE; + #else + // Need to add code to create pipes in linux + return TRUE; + #endif } *************** *** 949,953 **** --- 968,974 ---- m_pDB->Init(); } + #ifdef _WIN32 m_pService->UseService(m_config.UseService()); + #endif } *************** *** 969,975 **** --- 990,1000 ---- { fReadLine(pIni, &szLine[0], sizeof(szLine)); // This one is the server name + #ifdef _WIN32 m_pService->SetName(szLine); // We need to reset the mutex now CloseHandle(m_hStdioMutex); + #else + pthread_mutex_destroy(&m_hStdioMutex); + #endif // Open the new mutex InitMutex(); *************** *** 1008,1016 **** int opt = 1; setsockopt( m_sock, SOL_SOCKET, SO_REUSEADDR, (char*)&opt, sizeof(opt)); - #ifdef _WIN32 struct linger lingerOpt; - #else - struct LINGER lingerOpt; - #endif memset(&lingerOpt, 0x00, sizeof(lingerOpt)); lingerOpt.l_onoff = 1; --- 1033,1037 ---- *************** *** 1052,1056 **** --- 1073,1081 ---- m_bInitialized = FALSE; // Close the socket that we are listening to + #ifdef _WIN32 closesocket(m_sock); + #else + close(m_sock); + #endif // Bind to the new socket if ( !InitSockets() ) *************** *** 1067,1070 **** --- 1092,1096 ---- } // Install or remove the service as necessary + #ifdef _WIN32 if ( m_config.UseService() != oldConfig.UseService() ) { *************** *** 1087,1090 **** --- 1113,1117 ---- // What do we need to do here? } + #endif // All other changes can be applied on the fly *************** *** 1092,1095 **** --- 1119,1123 ---- } + #ifdef _WIN32 void CAxisServer::SetGeometry() { *************** *** 1130,1133 **** --- 1158,1162 ---- m_pWnd->MoveWindow(l, r, w, h); } + #endif TCHAR * CAxisServer::BasePath() *************** *** 1136,1138 **** _tgetcwd(szCwd, MAX_PATH); return szCwd; ! } \ No newline at end of file --- 1165,1168 ---- _tgetcwd(szCwd, MAX_PATH); return szCwd; ! } ! Index: ServerObj.h =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/ServerObj.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** ServerObj.h 19 Jun 2003 21:37:52 -0000 1.5 --- ServerObj.h 4 Aug 2003 23:20:54 -0000 1.6 *************** *** 36,40 **** { public: ! CString GetVersionString(); CAxisServer(); ~CAxisServer(); --- 36,40 ---- { public: ! _string GetVersionString(); CAxisServer(); ~CAxisServer(); *************** *** 46,55 **** void Shutdown(); int GetClientCount() { return m_vClients.size(); } class CMainFrame * m_pWnd; BOOL IsInitialized() { return m_bInitialized; } static BOOL IsRunning() { return m_bIsRunning; } BOOL IsFinished() { return m_bIsFinished; } void ReloadConfig(); - void SetGeometry(); // We should make these protected! --- 46,58 ---- void Shutdown(); int GetClientCount() { return m_vClients.size(); } + #ifdef _WIN32 class CMainFrame * m_pWnd; + void SetGeometry(); + class CService * m_pService; + #endif BOOL IsInitialized() { return m_bInitialized; } static BOOL IsRunning() { return m_bIsRunning; } BOOL IsFinished() { return m_bIsFinished; } void ReloadConfig(); // We should make these protected! *************** *** 60,65 **** basic_string<char> m_sSpawns; // Since this could be sent to non-unicode clients, this needs to be non-unicode. ! static void _cdecl LoadSpawns(LPVOID pData); ! class CService * m_pService; CServerConfiguration m_config; BOOL Init(); --- 63,71 ---- basic_string<char> m_sSpawns; // Since this could be sent to non-unicode clients, this needs to be non-unicode. ! #ifdef _WIN32 ! static void _cdecl LoadSpawns(void * pData); ! #else ! static void * LoadSpawns(void * pData); ! #endif CServerConfiguration m_config; BOOL Init(); *************** *** 96,98 **** }; ! #endif \ No newline at end of file --- 102,105 ---- }; ! #endif ! Index: StdAfx.h =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/StdAfx.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** StdAfx.h 16 Jun 2003 03:58:35 -0000 1.3 --- StdAfx.h 4 Aug 2003 23:20:54 -0000 1.4 *************** *** 30,33 **** --- 30,35 ---- #define AFX_STDAFX_H__3E5D60A2_51CB_43B6_A042_DACA2D49D1CD__INCLUDED_ + #ifdef _WIN32 + #if _MSC_VER > 1000 #pragma once *************** *** 57,60 **** --- 59,123 ---- #define IDT_TIMER 6666 #define IDT_NIDTIP 6667 + + #else // LINUX + #include <unistd.h> + #include <string.h> + #include <stdlib.h> + #include <stdio.h> + #include <errno.h> + #include <stdarg.h> + #include <sys/socket.h> + #include <sys/types.h> + #include <pthread.h> + #include <sys/time.h> + #include <netinet/in.h> + #include <ctype.h> + #include <sys/stat.h> + #include <dirent.h> + #include <signal.h> + #include <netdb.h> + #include <sql.h> + #include <sqlext.h> + + #define _cdecl + #define HOSTENT struct hostent + #define SOCKET int + #define INVALID_SOCKET (SOCKET)(~0) + #define SOCKET_ERROR (-1) + #define LPVOID void * + #define SOCKADDR_IN sockaddr_in + #define LPSOCKADDR sockaddr * + #define TCHAR char + #define CHAR char + #define LPCTSTR const TCHAR * + #define LPCSTR const CHAR * + #define _T(x) x + #define _stprintf sprintf + #define _tfopen fopen + #define _trename rename + #define _tcsclen strlen + #define _tcscat strcat + #define _tcsstr strstr + #define _tcschr strchr + #define _ftprintf fprintf + #define _tunlink unlink + #define _tcslen strlen + #define _tcscpy strcpy + #define _tprintf printf + #define _tcscmp strcmp + #define _tcstok strtok + #define _vstprintf vsprintf + #define _vftprintf vfprintf + #define _vtprintf vprintf + #define _tgetcwd getcwd + #define _ttoi atoi + #define _tcstoul strtoul + #define _tcsicmp strcasecmp + #define BYTE unsigned char + #define MAX_BUFFER 8192 + #define MAX_PATH 256 + #define WCHAR wchar_t + + #endif // _WIN32 #define SQLFAILED(x) ( x != SQL_SUCCESS && x != SQL_SUCCESS_WITH_INFO ) Index: configure =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/configure,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** configure 9 May 2002 22:19:43 -0000 1.1 --- configure 4 Aug 2003 23:20:54 -0000 1.2 *************** *** 775,779 **** ! LIBS="-pthread $LIBS" CXXFLAGS="" --- 775,780 ---- ! LDFLAGS="-L/usr/lib -L/usr/local/lib $LDFLAGS" ! LIBS="-pthread -lxml2 -lcryptopp -lodbc $LIBS" CXXFLAGS="" *************** *** 800,804 **** set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:803: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 801,805 ---- set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:804: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 832,836 **** echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:835: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C --- 833,837 ---- echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:836: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C *************** *** 843,852 **** cat > conftest.$ac_ext << EOF ! #line 846 "configure" #include "confdefs.h" int main(){return(0);} EOF ! if { (eval echo configure:851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. --- 844,853 ---- cat > conftest.$ac_ext << EOF ! #line 847 "configure" #include "confdefs.h" int main(){return(0);} EOF ! if { (eval echo configure:852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. *************** *** 874,883 **** fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:877: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 ! echo "configure:882: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 875,884 ---- fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:878: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 ! echo "configure:883: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 888,892 **** #endif EOF ! if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else --- 889,893 ---- #endif EOF ! if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else *************** *** 907,911 **** CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 ! echo "configure:910: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 908,912 ---- CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 ! echo "configure:911: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 938,945 **** fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:944: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 939,997 ---- fi + for ac_declaration in \ + ''\ + '#include <stdlib.h>' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' + do + cat > conftest.$ac_ext <<EOF + #line 952 "configure" + #include "confdefs.h" + #include <stdlib.h> + $ac_declaration + int main() { + exit (42); + ; return 0; } + EOF + if { (eval echo configure:960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + continue + fi + rm -f conftest* + cat > conftest.$ac_ext <<EOF + #line 970 "configure" + #include "confdefs.h" + $ac_declaration + int main() { + exit (42); + ; return 0; } + EOF + if { (eval echo configure:977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + break + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* + done + if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h + fi + + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:996: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 971,975 **** set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:974: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1023,1027 ---- set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1026: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1022,1026 **** set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1025: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1074,1078 ---- set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1077: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1054,1058 **** echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:1057: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c --- 1106,1110 ---- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:1109: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c *************** *** 1065,1074 **** cat > conftest.$ac_ext << EOF ! #line 1068 "configure" #include "confdefs.h" main(){return(0);} EOF ! if { (eval echo configure:1073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. --- 1117,1126 ---- cat > conftest.$ac_ext << EOF ! #line 1120 "configure" #include "confdefs.h" main(){return(0);} EOF ! if { (eval echo configure:1125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. *************** *** 1096,1105 **** fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:1099: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:1104: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1148,1157 ---- fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:1151: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:1156: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1110,1114 **** #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else --- 1162,1166 ---- #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else *************** *** 1129,1133 **** CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:1132: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1181,1185 ---- CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:1184: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1161,1165 **** echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:1164: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then --- 1213,1217 ---- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:1216: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then *************** *** 1176,1180 **** # not just through cpp. cat > conftest.$ac_ext <<EOF ! #line 1179 "configure" #include "confdefs.h" #include <assert.h> --- 1228,1232 ---- # not just through cpp. cat > conftest.$ac_ext <<EOF ! #line 1231 "configure" #include "confdefs.h" #include <assert.h> *************** *** 1182,1186 **** EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 1234,1238 ---- EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 1193,1197 **** CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF ! #line 1196 "configure" #include "confdefs.h" #include <assert.h> --- 1245,1249 ---- CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF ! #line 1248 "configure" #include "confdefs.h" #include <assert.h> *************** *** 1199,1203 **** EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 1251,1255 ---- EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 1210,1214 **** CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF ! #line 1213 "configure" #include "confdefs.h" #include <assert.h> --- 1262,1266 ---- CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF ! #line 1265 "configure" #include "confdefs.h" #include <assert.h> *************** *** 1216,1220 **** EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 1268,1272 ---- EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 1247,1256 **** ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 ! echo "configure:1250: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1255 "configure" #include "confdefs.h" #include <sys/types.h> --- 1299,1308 ---- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 ! echo "configure:1302: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1307 "configure" #include "confdefs.h" #include <sys/types.h> *************** *** 1260,1264 **** ; return 0; } EOF ! if { (eval echo configure:1263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" --- 1312,1316 ---- ; return 0; } EOF ! if { (eval echo configure:1315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" *************** *** 1285,1289 **** if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 ! echo "configure:1288: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 1337,1341 ---- if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 ! echo "configure:1340: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 1293,1297 **** LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF ! #line 1296 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ --- 1345,1349 ---- LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF ! #line 1348 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ *************** *** 1304,1308 **** ; return 0; } EOF ! if { (eval echo configure:1307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 1356,1360 ---- ; return 0; } EOF ! if { (eval echo configure:1359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 1326,1330 **** else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 ! echo "configure:1329: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 1378,1382 ---- else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 ! echo "configure:1381: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 1334,1338 **** LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF ! #line 1337 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ --- 1386,1390 ---- LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF ! #line 1389 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ *************** *** 1345,1349 **** ; return 0; } EOF ! if { (eval echo configure:1348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 1397,1401 ---- ; return 0; } EOF ! if { (eval echo configure:1400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 1368,1377 **** echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:1371: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1376 "configure" #include "confdefs.h" #include <stdlib.h> --- 1420,1429 ---- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:1423: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1428 "configure" #include "confdefs.h" #include <stdlib.h> *************** *** 1381,1385 **** EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 1433,1437 ---- EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 1398,1402 **** # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF ! #line 1401 "configure" #include "confdefs.h" #include <string.h> --- 1450,1454 ---- # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF ! #line 1453 "configure" #include "confdefs.h" #include <string.h> *************** *** 1416,1420 **** # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF ! #line 1419 "configure" #include "confdefs.h" #include <stdlib.h> --- 1468,1472 ---- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF ! #line 1471 "configure" #include "confdefs.h" #include <stdlib.h> *************** *** 1437,1441 **** else cat > conftest.$ac_ext <<EOF ! #line 1440 "configure" #include "confdefs.h" #include <ctype.h> --- 1489,1493 ---- else cat > conftest.$ac_ext <<EOF ! #line 1492 "configure" #include "confdefs.h" #include <ctype.h> *************** *** 1448,1452 **** EOF ! if { (eval echo configure:1451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : --- 1500,1504 ---- EOF ! if { (eval echo configure:1503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : *************** *** 1475,1489 **** ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:1478: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1483 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 1527,1541 ---- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:1530: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1535 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 1513,1522 **** echo $ac_n "checking for working const""... $ac_c" 1>&6 ! echo "configure:1516: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1521 "configure" #include "confdefs.h" --- 1565,1574 ---- echo $ac_n "checking for working const""... $ac_c" 1>&6 ! echo "configure:1568: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1573 "configure" #include "confdefs.h" *************** *** 1567,1571 **** ; return 0; } EOF ! if { (eval echo configure:1570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes --- 1619,1623 ---- ; return 0; } EOF ! if { (eval echo configure:1622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes *************** *** 1588,1597 **** echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 ! echo "configure:1591: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1596 "configure" #include "confdefs.h" #include <sys/types.h> --- 1640,1649 ---- echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 ! echo "configure:1643: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1648 "configure" #include "confdefs.h" #include <sys/types.h> *************** *** 1602,1606 **** ; return 0; } EOF ! if { (eval echo configure:1605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes --- 1654,1658 ---- ; return 0; } EOF ! if { (eval echo configure:1657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes *************** *** 1623,1632 **** echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 ! echo "configure:1626: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1631 "configure" #include "confdefs.h" #include <sys/types.h> --- 1675,1684 ---- echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 ! echo "configure:1678: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1683 "configure" #include "confdefs.h" #include <sys/types.h> *************** *** 1636,1640 **** ; return 0; } EOF ! if { (eval echo configure:1639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h --- 1688,1692 ---- ; return 0; } EOF ! if { (eval echo configure:1691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h *************** *** 1658,1667 **** echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 ! echo "configure:1661: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1666 "configure" #include "confdefs.h" #include <sys/types.h> --- 1710,1719 ---- echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 ! echo "configure:1713: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1718 "configure" #include "confdefs.h" #include <sys/types.h> *************** *** 1680,1684 **** ; return 0; } EOF ! if { (eval echo configure:1683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void --- 1732,1736 ---- ; return 0; } EOF ! if { (eval echo configure:1735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void *************** *** 1699,1708 **** echo $ac_n "checking for vprintf""... $ac_c" 1>&6 ! echo "configure:1702: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1707 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, --- 1751,1760 ---- echo $ac_n "checking for vprintf""... $ac_c" 1>&6 ! echo "configure:1754: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1759 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, *************** *** 1727,1731 **** ; return 0; } EOF ! if { (eval echo configure:1730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" --- 1779,1783 ---- ; return 0; } EOF ! if { (eval echo configure:1782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" *************** *** 1751,1760 **** if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 ! echo "configure:1754: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1759 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, --- 1803,1812 ---- if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 ! echo "configure:1806: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1811 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, *************** *** 1779,1783 **** ; return 0; } EOF ! if { (eval echo configure:1782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" --- 1831,1835 ---- ; return 0; } EOF ! if { (eval echo configure:1834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" *************** *** 1806,1815 **** do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:1809: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1814 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, --- 1858,1867 ---- do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:1861: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF ! #line 1866 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, *************** *** 1834,1838 **** ; return 0; } EOF ! if { (eval echo configure:1837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 1886,1890 ---- ; return 0; } EOF ! if { (eval echo configure:1889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" Index: configure.in =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/configure.in,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** configure.in 9 May 2002 22:19:43 -0000 1.1 --- configure.in 4 Aug 2003 23:20:54 -0000 1.2 *************** *** 3,8 **** AM_INIT_AUTOMAKE(axissvr, 0.13) ! dnl LDFLAGS="-L/usr/lib -L/usr/local/lib $LDFLAGS" ! LIBS="-pthread $LIBS" CXXFLAGS="" --- 3,8 ---- AM_INIT_AUTOMAKE(axissvr, 0.13) ! LDFLAGS="-L/usr/lib -L/usr/local/lib $LDFLAGS" ! LIBS="-pthread -lxml2 -lcryptopp -lodbc $LIBS" CXXFLAGS="" Index: gwhogsvr.cpp =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/gwhogsvr.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** gwhogsvr.cpp 16 Jun 2003 03:58:35 -0000 1.29 --- gwhogsvr.cpp 4 Aug 2003 23:20:54 -0000 1.30 *************** *** 27,32 **** // gwhogsvr.cpp ! #include "stdafx.h" ! #include "MainFrm.h" #include "gwhogsvr.h" #include <string.h> --- 27,31 ---- // gwhogsvr.cpp ! #include "StdAfx.h" #include "gwhogsvr.h" #include <string.h> *************** *** 44,60 **** #include "ServerObj.h" #include "ClientObj.h" - - - #ifndef WIN32 - #define LINGER linger - #endif - - - - - int service_main(int argc, TCHAR *argv[]) - { - return 0; - } int fReadLine(FILE * pFile, TCHAR * pszBuf, int iSize) --- 43,46 ---- Index: gwhogsvr.h =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/gwhogsvr.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** gwhogsvr.h 16 Jun 2003 03:58:35 -0000 1.9 --- gwhogsvr.h 4 Aug 2003 23:20:54 -0000 1.10 *************** *** 63,82 **** #ifndef WIN32 - #define SOCKET int - #define INVALID_SOCKET (SOCKET)(~0) - #define SOCKET_ERROR (-1) - #define LPVOID void * - #define SOCKADDR_IN sockaddr_in - #define LPSOCKADDR sockaddr * #define TRUE 1 #define FALSE 0 - #define bool int #define BOOL int #define DWORD unsigned long #define BYTE unsigned char - #define MAX_PATH 256 #define false 0 #define true 1 - #define HOSTENT struct hostent #endif --- 63,73 ---- Index: ntservice.h =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/ntservice.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** ntservice.h 16 Jun 2003 22:05:59 -0000 1.6 --- ntservice.h 4 Aug 2003 23:20:54 -0000 1.7 *************** *** 83,85 **** #endif ! #endif \ No newline at end of file --- 83,86 ---- #endif ! #endif ! |