[0.4.7][BTRFS][SETUPAPI][SHELL32] It is _WIN32_WINNT, not WIN32_WINNT CORE-12589 CORE-12580

This is *no* functional change: I verified with a #pragma message "test"
locally within all those blocks that the compilers output does not change
before and after those changes.
The 3 binaries do not change in size.
After this commit no such issue remains in releases/0.4.7

[BTRFS] It is _WIN32_WINNT, not WIN32_WINNT CORE-12589
This is a partial port of:
0.4.10-dev-36-g c7806a6b29 CORE-12589 'drivers/filesystems/btrfs/fsctl.c: 1 _WIN32_WINNT is misspelled as WIN32_WINNT'
------------
[SETUPAPI] It is _WIN32_WINNT, not WIN32_WINNT
This is a pure backport of
0.4.8-dev-139-g 067bb2fcef [SETUPAPI] it is _WIN32_WINNT, not WIN32_WINNT (#125) CORE-12580
------------
[SHELL32] It is _WIN32_WINNT, not WIN32_WINNT

This is *no* backport of 0.4.8-dev-251-g 57aa1f1fc6 [SHELL32] shellpath.c: it is _WIN32_WINNT, not WIN32_WINNT (#129) CORE-12580
but instead I deleted the workaround-blocks in [SHELL32] shellpath.c entirely, because they do depend on global variables which also do not exist in releases/0.4.7.

CORE-12580 is now completely covered, except the unrelated 'reminder comment' which was added to [SDK].
This commit is contained in:
Joachim Henze 2024-02-25 07:59:05 +01:00
parent 861b514095
commit ec0a98776d
3 changed files with 2 additions and 333 deletions

View file

@ -565,7 +565,7 @@ done:
return Result;
}
#if WIN32_WINNT < 0x0600
#if _WIN32_WINNT < 0x0600
/* WARNING:
* This code has been copied from advapi32/reg/reg.c,
* so this dll can be tested as is on Windows XP

View file

@ -611,15 +611,6 @@ typedef enum _CSIDL_Type {
CSIDL_Type_SystemX86Path,
} CSIDL_Type;
#if WIN32_WINNT >= 0x0600
#define CSIDL_CONTACTS 0x0043
#define CSIDL_DOWNLOADS 0x0047
#define CSIDL_LINKS 0x004d
#define CSIDL_APPDATA_LOCALLOW 0x004e
#define CSIDL_SAVED_GAMES 0x0062
#define CSIDL_SEARCHES 0x0063
#endif
typedef struct
{
const KNOWNFOLDERID *id;
@ -1008,320 +999,6 @@ static const CSIDL_DATA CSIDL_Data[] =
NULL,
NULL
},
#if WIN32_WINNT >= 0x0600
{ /* 0x3f */
&FOLDERID_AddNewPrograms,
CSIDL_Type_Disallowed,
NULL,
NULL
},
{ /* 0x40 */
&FOLDERID_AppUpdates,
CSIDL_Type_Disallowed,
NULL,
NULL
},
{ /* 0x41 */
&FOLDERID_ChangeRemovePrograms,
CSIDL_Type_Disallowed,
NULL,
NULL
},
{ /* 0x42 */
&FOLDERID_ConflictFolder,
CSIDL_Type_Disallowed,
NULL,
NULL
},
{ /* 0x43 - CSIDL_CONTACTS */
&FOLDERID_Contacts,
CSIDL_Type_User,
NULL,
ContactsW
},
{ /* 0x44 */
&FOLDERID_DeviceMetadataStore,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
},
{ /* 0x45 */
&GUID_NULL,
CSIDL_Type_User,
NULL,
DocumentsW
},
{ /* 0x46 */
&FOLDERID_DocumentsLibrary,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
},
{ /* 0x47 - CSIDL_DOWNLOADS */
&FOLDERID_Downloads,
CSIDL_Type_User,
NULL,
DownloadsW
},
{ /* 0x48 */
&FOLDERID_Games,
CSIDL_Type_Disallowed,
NULL,
NULL
},
{ /* 0x49 */
&FOLDERID_GameTasks,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
},
{ /* 0x4a */
&FOLDERID_HomeGroup,
CSIDL_Type_Disallowed,
NULL,
NULL
},
{ /* 0x4b */
&FOLDERID_ImplicitAppShortcuts,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
},
{ /* 0x4c */
&FOLDERID_Libraries,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
},
{ /* 0x4d - CSIDL_LINKS */
&FOLDERID_Links,
CSIDL_Type_User,
NULL,
LinksW
},
{ /* 0x4e - CSIDL_APPDATA_LOCALLOW */
&FOLDERID_LocalAppDataLow,
CSIDL_Type_User,
NULL,
AppData_LocalLowW
},
{ /* 0x4f */
&FOLDERID_MusicLibrary,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
},
{ /* 0x50 */
&FOLDERID_OriginalImages,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
},
{ /* 0x51 */
&FOLDERID_PhotoAlbums,
CSIDL_Type_User,
NULL,
Pictures_Slide_ShowsW
},
{ /* 0x52 */
&FOLDERID_PicturesLibrary,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
},
{ /* 0x53 */
&FOLDERID_Playlists,
CSIDL_Type_User,
NULL,
Music_PlaylistsW
},
{ /* 0x54 */
&FOLDERID_ProgramFilesX64,
CSIDL_Type_NonExistent,
NULL,
NULL
},
{ /* 0x55 */
&FOLDERID_ProgramFilesCommonX64,
CSIDL_Type_NonExistent,
NULL,
NULL
},
{ /* 0x56 */
&FOLDERID_Public,
CSIDL_Type_CurrVer, /* FIXME */
NULL,
UsersPublicW
},
{ /* 0x57 */
&FOLDERID_PublicDownloads,
CSIDL_Type_AllUsers,
NULL,
DownloadsW
},
{ /* 0x58 */
&FOLDERID_PublicGameTasks,
CSIDL_Type_AllUsers,
NULL,
Microsoft_Windows_GameExplorerW
},
{ /* 0x59 */
&FOLDERID_PublicLibraries,
CSIDL_Type_AllUsers,
NULL,
Microsoft_Windows_LibrariesW
},
{ /* 0x5a */
&FOLDERID_PublicRingtones,
CSIDL_Type_AllUsers,
NULL,
Microsoft_Windows_RingtonesW
},
{ /* 0x5b */
&FOLDERID_QuickLaunch,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
},
{ /* 0x5c */
&FOLDERID_RecordedTVLibrary,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
},
{ /* 0x5d */
&FOLDERID_Ringtones,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
},
{ /* 0x5e */
&FOLDERID_SampleMusic,
CSIDL_Type_AllUsers,
NULL,
Music_Sample_MusicW
},
{ /* 0x5f */
&FOLDERID_SamplePictures,
CSIDL_Type_AllUsers,
NULL,
Pictures_Sample_PicturesW
},
{ /* 0x60 */
&FOLDERID_SamplePlaylists,
CSIDL_Type_AllUsers,
NULL,
Music_Sample_PlaylistsW
},
{ /* 0x61 */
&FOLDERID_SampleVideos,
CSIDL_Type_AllUsers,
NULL,
Videos_Sample_VideosW
},
{ /* 0x62 - CSIDL_SAVED_GAMES */
&FOLDERID_SavedGames,
CSIDL_Type_User,
NULL,
Saved_GamesW
},
{ /* 0x63 - CSIDL_SEARCHES */
&FOLDERID_SavedSearches,
CSIDL_Type_User,
NULL,
SearchesW
},
{ /* 0x64 */
&FOLDERID_SEARCH_CSC,
CSIDL_Type_Disallowed,
NULL,
NULL
},
{ /* 0x65 */
&FOLDERID_SEARCH_MAPI,
CSIDL_Type_Disallowed,
NULL,
NULL
},
{ /* 0x66 */
&FOLDERID_SearchHome,
CSIDL_Type_Disallowed,
NULL,
NULL
},
{ /* 0x67 */
&FOLDERID_SidebarDefaultParts,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
},
{ /* 0x68 */
&FOLDERID_SidebarParts,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
},
{ /* 0x69 */
&FOLDERID_SyncManagerFolder,
CSIDL_Type_Disallowed,
NULL,
NULL
},
{ /* 0x6a */
&FOLDERID_SyncResultsFolder,
CSIDL_Type_Disallowed,
NULL,
NULL
},
{ /* 0x6b */
&FOLDERID_SyncSetupFolder,
CSIDL_Type_Disallowed,
NULL,
NULL
},
{ /* 0x6c */
&FOLDERID_UserPinned,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
},
{ /* 0x6d */
&FOLDERID_UserProfiles,
CSIDL_Type_CurrVer,
UsersW,
UsersW
},
{ /* 0x6e */
&FOLDERID_UserProgramFiles,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
},
{ /* 0x6f */
&FOLDERID_UserProgramFilesCommon,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
},
{ /* 0x70 */
&FOLDERID_UsersFiles,
CSIDL_Type_Disallowed,
NULL,
NULL
},
{ /* 0x71 */
&FOLDERID_UsersLibraries,
CSIDL_Type_Disallowed,
NULL,
NULL
},
{ /* 0x72 */
&FOLDERID_VideosLibrary,
CSIDL_Type_Disallowed, /* FIXME */
NULL,
NULL
}
#endif
};
static HRESULT _SHExpandEnvironmentStrings(LPCWSTR szSrc, LPWSTR szDest);
@ -2232,14 +1909,6 @@ static HRESULT _SHRegisterUserShellFolders(BOOL bDefault)
CSIDL_MYPICTURES,
CSIDL_FONTS,
CSIDL_ADMINTOOLS,
#if WIN32_WINNT >= 0x0600
CSIDL_CONTACTS,
CSIDL_DOWNLOADS,
CSIDL_LINKS,
CSIDL_APPDATA_LOCALLOW,
CSIDL_SAVED_GAMES,
CSIDL_SEARCHES
#endif
};
WCHAR userShellFolderPath[MAX_PATH], shellFolderPath[MAX_PATH];
LPCWSTR pUserShellFolderPath, pShellFolderPath;

View file

@ -5065,7 +5065,7 @@ NTSTATUS fsctl_request(PDEVICE_OBJECT DeviceObject, PIRP* Pirp, UINT32 type) {
Status = STATUS_INVALID_DEVICE_REQUEST;
break;
#if WIN32_WINNT >= 0x0600
#if _WIN32_WINNT >= 0x0600
case FSCTL_MAKE_MEDIA_COMPATIBLE:
WARN("STUB: FSCTL_MAKE_MEDIA_COMPATIBLE\n");
Status = STATUS_INVALID_DEVICE_REQUEST;