mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Merge remote branch 'public/bug1954' into maint-0.2.2
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <io.h>
|
||||
#include <direct.h>
|
||||
#include <process.h>
|
||||
#include <tchar.h>
|
||||
#else
|
||||
#include <dirent.h>
|
||||
#include <pwd.h>
|
||||
@@ -2862,3 +2863,17 @@ write_pidfile(char *filename)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
HANDLE
|
||||
load_windows_system_library(const TCHAR *library_name)
|
||||
{
|
||||
TCHAR path[MAX_PATH];
|
||||
unsigned n;
|
||||
n = GetSystemDirectory(path, MAX_PATH);
|
||||
if (n == 0 || n + _tcslen(library_name) + 2 >= MAX_PATH)
|
||||
return 0;
|
||||
_tcscat(path, TEXT("\\"));
|
||||
_tcscat(path, library_name);
|
||||
return LoadLibrary(path);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -340,6 +340,10 @@ void start_daemon(void);
|
||||
void finish_daemon(const char *desired_cwd);
|
||||
void write_pidfile(char *filename);
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
HANDLE load_windows_system_library(const TCHAR *library_name);
|
||||
#endif
|
||||
|
||||
const char *libor_get_digests(void);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user