[NFSD][TELNETD][LIBTIRPC][MAN] Don't hardcode C:\ReactOS (#2334)

CORE-14747
This commit is contained in:
Katayama Hirofumi MZ 2020-02-14 02:03:35 +09:00 committed by GitHub
parent 35710b51af
commit 214a9cb660
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 4 deletions

View file

@ -93,6 +93,9 @@ BOOL winsock_fini(void)
return TRUE;
}
#ifdef __REACTOS__
char NETCONFIG[MAX_PATH] = "";
#endif
BOOL WINAPI DllMain/*tirpc_main*/(HINSTANCE hinstDLL, // DLL module handle
DWORD fdwReason, // reason called
LPVOID lpvReserved) // reserved
@ -109,6 +112,12 @@ BOOL WINAPI DllMain/*tirpc_main*/(HINSTANCE hinstDLL, // DLL module handle
// The DLL is loading due to process
// initialization or a call to LoadLibrary.
case DLL_PROCESS_ATTACH:
#ifdef __REACTOS__
if (!GetSystemDirectoryA(NETCONFIG, ARRAYSIZE(NETCONFIG)))
return FALSE;
lstrcatA(NETCONFIG, "\\drivers\\etc\\netconfig");
#endif
// Initialize socket library
if (winsock_init() == FALSE)

View file

@ -3,8 +3,13 @@
//#include <features.h>
#ifdef __REACTOS__
#undef NETCONFIG
extern char NETCONFIG[];
#else
// XXX Should be in, or come from, the registry!!!
#define NETCONFIG "C:\\ReactOS\\System32\\drivers\\etc\\netconfig"
#endif
#define NETPATH "NETPATH"
struct netconfig {