Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit e853e712 authored by rswindell's avatar rswindell

Added support for dynamic detection of GetLongPathName Win32 API (Win98/2K+).

parent f7a018cb
......@@ -59,6 +59,8 @@ uint riobp;
#ifdef _WIN32
HANDLE exec_mutex;
GetLongPathName_t Win98GetLongPathName=NULL;
#if defined(_DEBUG) && defined(_MSC_VER)
HANDLE debug_log=INVALID_HANDLE_VALUE;
_CrtMemState mem_chkpoint;
......@@ -2996,6 +2998,9 @@ void DLLCALL bbs_thread(void* arg)
sbbs_t* events;
client_t client;
startup=(bbs_startup_t*)arg;
#ifdef _WIN32
HINSTANCE hK32;
#endif
if(startup==NULL) {
sbbs_beep(100,500);
......@@ -3091,6 +3096,11 @@ void DLLCALL bbs_thread(void* arg)
cleanup(1);
return;
}
hK32 = LoadLibrary("KERNEL32");
if(hK32!=NULL)
Win98GetLongPathName
= (GetLongPathName_t)GetProcAddress(hK32,"GetLongPathNameA");
#endif // _WIN32
pthread_mutex_init(&event_mutex,NULL);
......
......@@ -58,6 +58,10 @@
#include <crtdbg.h> /* Windows debug macros and stuff */
#endif
typedef DWORD(WINAPI * GetLongPathName_t)(LPCTSTR,LPTSTR,DWORD);
extern GetLongPathName_t Win98GetLongPathName;
#elif defined(__unix__) /* Unix-variant */
#include <unistd.h> /* close */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment