- diff --git a/build.vc19/libtirpc/libtirpc.vcxproj b/build.vc19/libtirpc/libtirpc.vcxproj
- index 37bc712..7c62f21 100644
- --- a/build.vc19/libtirpc/libtirpc.vcxproj
- +++ b/build.vc19/libtirpc/libtirpc.vcxproj
- @@ -108,7 +108,7 @@
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- - <PreprocessorDefinitions>FD_SETSIZE=1024;INET6;NO_CB_4_KRB5P;PORTMAP;_WINSOCK_DEPRECATED_NO_WARNINGS;_DEBUG;_WINDOWS;_USRDLL;LIBTIRPC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- + <PreprocessorDefinitions>FD_SETSIZE=1024;INET6;NO_CB_4_KRB5P;PORTMAP;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;UNICODE;_UNICODE;_DEBUG;_WINDOWS;_USRDLL;LIBTIRPC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\libtirpc\tirpc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- @@ -155,7 +155,7 @@
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- - <PreprocessorDefinitions>FD_SETSIZE=1024;INET6;NO_CB_4_KRB5P;PORTMAP;_WINSOCK_DEPRECATED_NO_WARNINGS;NDEBUG;_WINDOWS;_USRDLL;LIBTIRPC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- + <PreprocessorDefinitions>FD_SETSIZE=1024;INET6;NO_CB_4_KRB5P;PORTMAP;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;UNICODE;_UNICODE;NDEBUG;_WINDOWS;_USRDLL;LIBTIRPC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\libtirpc\tirpc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- diff --git a/build.vc19/nfs41_np/nfs41_np.vcxproj b/build.vc19/nfs41_np/nfs41_np.vcxproj
- index 3efe8f6..822a849 100644
- --- a/build.vc19/nfs41_np/nfs41_np.vcxproj
- +++ b/build.vc19/nfs41_np/nfs41_np.vcxproj
- @@ -104,7 +104,7 @@
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- - <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;NFS41_NP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- + <PreprocessorDefinitions>WIN32;UNICODE;_UNICODE;_DEBUG;_WINDOWS;_USRDLL;NFS41_NP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\sys;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- @@ -144,7 +144,7 @@
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- - <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;NFS41_NP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- + <PreprocessorDefinitions>WIN32;UNICODE;_UNICODE;NDEBUG;_WINDOWS;_USRDLL;NFS41_NP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\sys;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- diff --git a/build.vc19/nfs_install/nfs_install.vcxproj b/build.vc19/nfs_install/nfs_install.vcxproj
- index 898ba94..7f222d1 100644
- --- a/build.vc19/nfs_install/nfs_install.vcxproj
- +++ b/build.vc19/nfs_install/nfs_install.vcxproj
- @@ -103,7 +103,7 @@
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- - <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- + <PreprocessorDefinitions>WIN32;UNICODE;_UNICODE;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\sys;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- @@ -141,7 +141,7 @@
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- - <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- + <PreprocessorDefinitions>WIN32;UNICODE;_UNICODE;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\sys;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- diff --git a/build.vc19/nfs_mount/nfs_mount.vcxproj b/build.vc19/nfs_mount/nfs_mount.vcxproj
- index ea482e2..8d250cb 100644
- --- a/build.vc19/nfs_mount/nfs_mount.vcxproj
- +++ b/build.vc19/nfs_mount/nfs_mount.vcxproj
- @@ -104,7 +104,7 @@
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- - <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- + <PreprocessorDefinitions>WIN32;UNICODE;_UNICODE;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\sys;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- @@ -144,7 +144,7 @@
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- - <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- + <PreprocessorDefinitions>WIN32;UNICODE;_UNICODE;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\sys;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- diff --git a/build.vc19/nfsd/nfsd.vcxproj b/build.vc19/nfsd/nfsd.vcxproj
- index d506140..6cf1cf2 100644
- --- a/build.vc19/nfsd/nfsd.vcxproj
- +++ b/build.vc19/nfsd/nfsd.vcxproj
- @@ -107,7 +107,7 @@
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- - <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;FD_SETSIZE=1024;INET6;NO_CB_4_KRB5P;STANDALONE_NFSD;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- + <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;FD_SETSIZE=1024;INET6;NO_CB_4_KRB5P;STANDALONE_NFSD;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;UNICODE;_UNICODE;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\libtirpc\tirpc;..\..\sys;..\..\dll;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- @@ -152,7 +152,7 @@
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- - <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;FD_SETSIZE=1024;INET6;NO_CB_4_KRB5P;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- + <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;FD_SETSIZE=1024;INET6;NO_CB_4_KRB5P;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;UNICODE;_UNICODE;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\libtirpc\tirpc;..\..\sys;..\..\dll;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- diff --git a/daemon/acl.c b/daemon/acl.c
- index 583f7c6..a9e7e46 100644
- --- a/daemon/acl.c
- +++ b/daemon/acl.c
- @@ -492,7 +492,7 @@ static int map_nfs4ace_who(PSID sid, PSID owner_sid, PSID group_sid, char *who_o
- return ERROR_SUCCESS;
- }
- - status = LookupAccountSid(NULL, sid, who, &size, tmp_buf,
- + status = LookupAccountSidA(NULL, sid, who, &size, tmp_buf,
- &tmp_size, &sid_type);
- dprintf(ACLLVL, "map_nfs4ace_who: LookupAccountSid returned %d GetLastError "
- "%d name len %d domain len %d\n", status, GetLastError(),
- @@ -510,7 +510,7 @@ static int map_nfs4ace_who(PSID sid, PSID owner_sid, PSID group_sid, char *who_o
- tmp_buf = malloc(tmp_size);
- if (tmp_buf == NULL)
- goto out_free_who;
- - status = LookupAccountSid(NULL, sid, who, &size, tmp_buf,
- + status = LookupAccountSidA(NULL, sid, who, &size, tmp_buf,
- &tmp_size, &sid_type);
- free(tmp_buf);
- if (!status) {
- diff --git a/daemon/delegation.c b/daemon/delegation.c
- index e26c2af..bd04d68 100644
- --- a/daemon/delegation.c
- +++ b/daemon/delegation.c
- @@ -279,7 +279,7 @@ static int delegation_return(
- uint32_t length;
- dprintf(1, "delegation_return: making a downcall for srv_open=%x\n",
- deleg->srv_open);
- - pipe = CreateFile(NFS41_USER_DEVICE_NAME_A, GENERIC_READ|GENERIC_WRITE,
- + pipe = CreateFileA(NFS41_USER_DEVICE_NAME_A, GENERIC_READ|GENERIC_WRITE,
- FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
- if (pipe == INVALID_HANDLE_VALUE) {
- eprintf("delegation_return: Unable to open downcall pipe %d\n",
- diff --git a/daemon/ea.c b/daemon/ea.c
- index baeb43a..77523e4 100644
- --- a/daemon/ea.c
- +++ b/daemon/ea.c
- @@ -605,7 +605,7 @@ static int handle_getexattr(void *daemon_context, nfs41_upcall *upcall)
- }
- ea->EaNameLength = query->EaNameLength;
- - StringCchCopy(ea->EaName, (size_t)ea->EaNameLength + 1, query->EaName);
- + StringCchCopyA(ea->EaName, (size_t)ea->EaNameLength + 1, query->EaName);
- ea->Flags = 0;
- /* read the value from file */
- diff --git a/daemon/idmap.c b/daemon/idmap.c
- index 169de15..f727b8b 100644
- --- a/daemon/idmap.c
- +++ b/daemon/idmap.c
- @@ -607,7 +607,7 @@ static int idmap_query_attrs(
- goto out;
- /* send the ldap query */
- - status = ldap_search_st(context->ldap, config->base,
- + status = ldap_search_stA(context->ldap, config->base,
- LDAP_SCOPE_SUBTREE, filter, NULL, 0, NULL, &res);
- if (status) {
- eprintf("ldap search for '%s' failed with %d: %s\n",
- @@ -628,7 +628,7 @@ static int idmap_query_attrs(
- /* fetch the attributes */
- for (i = 0; i < len; i++) {
- if (ATTR_ISSET(attributes, i)) {
- - values[i] = ldap_get_values(context->ldap,
- + values[i] = ldap_get_valuesA(context->ldap,
- entry, config->attributes[i]);
- /* fail if required attributes are missing */
- @@ -801,7 +801,7 @@ static int idmap_lookup_user(
- }
- out_free_values:
- for (i = 0; i < NUM_ATTRIBUTES; i++)
- - ldap_value_free(values[i]);
- + ldap_value_freeA(values[i]);
- out:
- return status;
- }
- @@ -902,7 +902,7 @@ static int idmap_lookup_group(
- }
- out_free_values:
- for (i = 0; i < NUM_ATTRIBUTES; i++)
- - ldap_value_free(values[i]);
- + ldap_value_freeA(values[i]);
- out:
- return status;
- }
- diff --git a/daemon/nfs41_daemon.c b/daemon/nfs41_daemon.c
- index 9a06c44..82c337f 100644
- --- a/daemon/nfs41_daemon.c
- +++ b/daemon/nfs41_daemon.c
- @@ -100,7 +100,7 @@ static unsigned int WINAPI thread_main(void *args)
- DWORD inbuf_len = UPCALL_BUF_SIZE, outbuf_len;
- nfs41_upcall upcall;
- - pipe = CreateFile(NFS41_USER_DEVICE_NAME_A, GENERIC_READ | GENERIC_WRITE,
- + pipe = CreateFileA(NFS41_USER_DEVICE_NAME_A, GENERIC_READ | GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
- 0, NULL);
- if (pipe == INVALID_HANDLE_VALUE)
- @@ -313,7 +313,7 @@ static bool_t parse_cmdlineargs(int argc, TCHAR *argv[], nfsd_args *out)
- }
- }
- else
- - fprintf(stderr, "Unrecognized option '%s', disregarding.\n", argv[i]);
- + fprintf(stderr, "Unrecognized option '%S', disregarding.\n", argv[i]);
- }
- }
- @@ -339,7 +339,7 @@ static void print_getaddrinfo(struct addrinfo *ptr)
- inet_ntoa(((struct sockaddr_in *)ptr->ai_addr)->sin_addr));
- break;
- case AF_INET6:
- - if (WSAAddressToString((LPSOCKADDR)ptr->ai_addr, (DWORD)ptr->ai_addrlen,
- + if (WSAAddressToStringA((LPSOCKADDR)ptr->ai_addr, (DWORD)ptr->ai_addrlen,
- NULL, ipstringbuffer, &ipbufferlength))
- dprintf(1, "WSAAddressToString failed with %u\n", WSAGetLastError());
- else
- @@ -561,7 +561,7 @@ VOID ServiceStart(DWORD argc, LPTSTR *argv)
- NFS41D_VERSION = GetTickCount();
- dprintf(1, "NFS41 Daemon starting: version %d\n", NFS41D_VERSION);
- - pipe = CreateFile(NFS41_USER_DEVICE_NAME_A, GENERIC_READ | GENERIC_WRITE,
- + pipe = CreateFileA(NFS41_USER_DEVICE_NAME_A, GENERIC_READ | GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
- 0, NULL);
- if (pipe == INVALID_HANDLE_VALUE)
- diff --git a/daemon/nfs41_server.c b/daemon/nfs41_server.c
- index 3a09935..982179e 100644
- --- a/daemon/nfs41_server.c
- +++ b/daemon/nfs41_server.c
- @@ -279,7 +279,7 @@ int nfs41_server_resolve(
- {
- int status = ERROR_BAD_NET_NAME;
- char service[16];
- - struct addrinfoexA hints = { 0 }, *res, *info;
- + ADDRINFOEXA hints = { 0 }, *res, *info;
- struct netconfig *nconf;
- struct netbuf addr;
- char *netid, *uaddr;
- @@ -368,6 +368,13 @@ retry_getaddrinfoex:
- break;
- }
- }
- +/*
- + * BUG: WS2tcpip.h somenow mapps FreeAddrInfoExA() to use the wide-char version
- + */
- +#define WINDOWS_WS2TCPIP_H_BUG 1
- +#ifdef WINDOWS_WS2TCPIP_H_BUG
- +#undef FreeAddrInfoEx
- +#endif
- FreeAddrInfoEx(res);
- out:
- if (status) {
- diff --git a/daemon/service.c b/daemon/service.c
- index 2b19668..81d9072 100644
- --- a/daemon/service.c
- +++ b/daemon/service.c
- @@ -27,6 +27,9 @@ FUNCTIONS:
- #include <stdlib.h>
- #include <process.h>
- #include <tchar.h>
- +#ifdef UNICODE
- +#include <shellapi.h>
- +#endif
- #include "service.h"
- diff --git a/daemon/sid.c b/daemon/sid.c
- index 412b33f..5326994 100644
- --- a/daemon/sid.c
- +++ b/daemon/sid.c
- @@ -351,7 +351,7 @@ int map_nfs4servername_2_sid(nfs41_daemon_globals *nfs41dg, int query, DWORD *si
- }
- #endif /* NFS41_DRIVER_FEATURE_MAP_UNMAPPED_USER_TO_UNIXUSER_SID */
- - status = LookupAccountName(NULL, name, NULL, sid_len, NULL, &tmp, &sid_type);
- + status = LookupAccountNameA(NULL, name, NULL, sid_len, NULL, &tmp, &sid_type);
- dprintf(ACLLVL, "map_nfs4servername_2_sid(query=%x,name='%s'): LookupAccountName returned %d "
- "GetLastError %d name len %d domain len %d\n",
- query, name, status, GetLastError(), *sid_len, tmp);
- @@ -369,7 +369,7 @@ int map_nfs4servername_2_sid(nfs41_daemon_globals *nfs41dg, int query, DWORD *si
- tmp_buf = (LPSTR) malloc(tmp);
- if (tmp_buf == NULL)
- goto out_free_sid;
- - status = LookupAccountName(NULL, name, *sid, sid_len, tmp_buf,
- + status = LookupAccountNameA(NULL, name, *sid, sid_len, tmp_buf,
- &tmp, &sid_type);
- free(tmp_buf);
- if (!status) {
- diff --git a/daemon/util.c b/daemon/util.c
- index 95e0d7f..cae4130 100644
- --- a/daemon/util.c
- +++ b/daemon/util.c
- @@ -443,11 +443,11 @@ int create_silly_rename(
- StringCchCopyNA(name, NFS41_MAX_COMPONENT_LEN+1, silly->name, silly->len);
- tmp = (char*)silly->name;
- - StringCchPrintf(tmp, end - tmp, ".%s.", name);
- + StringCchPrintfA(tmp, end - tmp, ".%s.", name);
- tmp += (size_t)silly->len + 2L;
- for (i = 0; i < 16; i++, tmp++)
- - StringCchPrintf(tmp, end - tmp, "%x", fhmd5[i]);
- + StringCchPrintfA(tmp, end - tmp, "%x", fhmd5[i]);
- path->len = path->len + extra_len;
- silly->len = silly->len + extra_len;
- diff --git a/install/nfsreginst.c b/install/nfsreginst.c
- index 66e1997..9ea1502 100644
- --- a/install/nfsreginst.c
- +++ b/install/nfsreginst.c
- @@ -102,7 +102,7 @@ BOOL RdrSetProviderOrderString( __in LPTSTR OrderString )
- if ( CreateKey( PROVIDER_ORDER_KEY, &hOrderKey ) )
- {
- - ProviderOrderKeyValues[0].dwLength = ( _tcsclen( OrderString ) + 1 ) * sizeof( TCHAR );
- + ProviderOrderKeyValues[0].dwLength = (DWORD)(( _tcsclen( OrderString ) + 1 ) * sizeof( TCHAR ));
- ProviderOrderKeyValues[0].pvValue = OrderString;
- WriteRegistryKeyValues( hOrderKey,
- sizeof(ProviderOrderKeyValues) / sizeof(REGENTRY),
- diff --git a/mount/options.c b/mount/options.c
- index 11bdca9..c6a6439 100644
- --- a/mount/options.c
- +++ b/mount/options.c
- @@ -164,7 +164,7 @@ static void RecursivePrintEaInformation(
- TEXT("EaValueLength: %5u\n")
- TEXT("EaName: %16ls\n")
- TEXT("EaValue: %16ls\n\n"),
- - (ULONG_PTR)EA % sizeof(ULONG),
- + (unsigned long)((ULONG_PTR)EA % sizeof(ULONG)),
- EA->NextEntryOffset,
- EA->Flags,
- EA->EaNameLength,
Win32 32bit build fixes 2024-02-01
Posted by Anonymous on Thu 1st Feb 2024 15:02
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.