1.1 --- a/sourcehook/sourcehook_impl.h Thu Jul 07 20:58:05 2005 +0000
1.2 +++ b/sourcehook/sourcehook_impl.h Thu Jul 07 21:07:43 2005 +0000
1.3 @@ -82,22 +82,6 @@
1.4 void RemoveCallClassPatch(CallClassInfo &cc, int vtbl_offs, int vtbl_idx);
1.5 void RemoveCallClassPatches(void *ifaceptr, int vtbl_offs, int vtbl_idx);
1.6
1.7 -#ifdef __linux__
1.8 - /**
1.9 - * @brief Checks to see if a memory value can be read from a given pointer.
1.10 - *
1.11 - * @return True if the value can be read and false if it cannot.
1.12 - *
1.13 - * @param ptr The pointer to the memory value.
1.14 - * @param len The length of the memory value to be read from the pointer.
1.15 - */
1.16 - static bool IsBadReadPtr(const void *ptr, size_t len);
1.17 - static void BadReadHandler(int sig);
1.18 -
1.19 - bool m_BadReadCalled;
1.20 - jmp_buf m_BadReadJmpBuf;
1.21 -#endif
1.22 -
1.23 META_RES m_Status, m_PrevRes, m_CurRes;
1.24 const void *m_OrigRet;
1.25 const void *m_OverrideRet;
1.26 @@ -215,6 +199,22 @@
1.27 virtual void SetOrigRet(const void *ptr); //!< Sets the original return pointer
1.28 virtual void SetOverrideRet(const void *ptr); //!< Sets the override result pointer
1.29 };
1.30 +
1.31 +#ifdef __linux__
1.32 + /**
1.33 + * @brief Checks to see if a memory value can be read from a given pointer.
1.34 + *
1.35 + * @return True if the value can be read and false if it cannot.
1.36 + *
1.37 + * @param ptr The pointer to the memory value.
1.38 + * @param len The length of the memory value to be read from the pointer.
1.39 + */
1.40 + bool IsBadReadPtr(const void *ptr, size_t len);
1.41 + void BadReadHandler(int sig);
1.42 +
1.43 + bool g_BadReadCalled;
1.44 + jmp_buf g_BadReadJmpBuf;
1.45 +#endif
1.46 }
1.47
1.48 #endif