diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /xpcom/build/PoisonIOInterposer.h | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'xpcom/build/PoisonIOInterposer.h')
-rw-r--r-- | xpcom/build/PoisonIOInterposer.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/xpcom/build/PoisonIOInterposer.h b/xpcom/build/PoisonIOInterposer.h index 20adeb835b..3217027b9a 100644 --- a/xpcom/build/PoisonIOInterposer.h +++ b/xpcom/build/PoisonIOInterposer.h @@ -10,6 +10,12 @@ #include "mozilla/Types.h" #include <stdio.h> +#ifdef _WIN32 +typedef void* platform_handle_t; +#else +typedef int platform_handle_t; +#endif + MOZ_BEGIN_EXTERN_C /** Register file handle to be ignored by poisoning IO interposer. This function @@ -18,7 +24,7 @@ MOZ_BEGIN_EXTERN_C * when one of them links the static CRT). In such cases, giving file * descriptors or FILEs * doesn't work because _get_osfhandle fails with "invalid parameter". */ -void MozillaRegisterDebugHandle(intptr_t aHandle); +void MozillaRegisterDebugHandle(platform_handle_t aHandle); /** Register file descriptor to be ignored by poisoning IO interposer */ void MozillaRegisterDebugFD(int aFd); @@ -27,7 +33,7 @@ void MozillaRegisterDebugFD(int aFd); void MozillaRegisterDebugFILE(FILE* aFile); /** Unregister file handle from being ignored by poisoning IO interposer */ -void MozillaUnRegisterDebugHandle(intptr_t aHandle); +void MozillaUnRegisterDebugHandle(platform_handle_t aHandle); /** Unregister file descriptor from being ignored by poisoning IO interposer */ void MozillaUnRegisterDebugFD(int aFd); @@ -45,7 +51,7 @@ namespace mozilla { /** * Check if a file is registered as a debug file. */ -bool IsDebugFile(intptr_t aFileID); +bool IsDebugFile(platform_handle_t aFileID); /** * Initialize IO poisoning, this is only safe to do on the main-thread when no @@ -79,7 +85,7 @@ void ClearPoisonIOInterposer(); # ifdef __cplusplus namespace mozilla { -inline bool IsDebugFile(intptr_t aFileID) { return true; } +inline bool IsDebugFile(platform_handle_t aFileID) { return true; } inline void InitPoisonIOInterposer() {} inline void ClearPoisonIOInterposer() {} # ifdef XP_MACOSX |