mirror of
https://github.com/reactos/reactos.git
synced 2025-08-11 13:25:36 +00:00
[NFSD][TELNETD][LIBTIRPC][MAN] Don't hardcode C:\ReactOS (#2334)
CORE-14747
This commit is contained in:
parent
35710b51af
commit
214a9cb660
6 changed files with 21 additions and 4 deletions
9
dll/3rdparty/libtirpc/src/wintirpc.c
vendored
9
dll/3rdparty/libtirpc/src/wintirpc.c
vendored
|
@ -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)
|
||||
|
|
5
dll/3rdparty/libtirpc/tirpc/netconfig.h
vendored
5
dll/3rdparty/libtirpc/tirpc/netconfig.h
vendored
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue