wine_server_call(), as potentially crossing DLL module boundaries This is needed to allow some systems, such as ppc64, to update module-specific registers (TOC)
Signed-off-by: Timothy Pearson tpearson@raptorengineering.com --- dlls/shell32/shell32_main.c | 2 +- include/windef.h | 7 +++++++ include/wine/library.h | 18 +++++++++--------- include/wine/server.h | 2 +- 4 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index a791966031..71ebe218fb 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -810,7 +810,7 @@ static INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, { ABOUT_INFO *info = (ABOUT_INFO *)lParam; WCHAR template[512], buffer[512], version[64]; - extern const char *wine_get_build_id(void); + extern FARCALL const char *wine_get_build_id(void);
if (info) { diff --git a/include/windef.h b/include/windef.h index f9a570d9cd..ea9f32b5a0 100644 --- a/include/windef.h +++ b/include/windef.h @@ -50,6 +50,13 @@ extern "C" { # endif #endif
+#if defined(__powerpc64__) && defined (__GNUC__) + /* ppc64 relies on long calls being generated for calls crossing DLL boundaries (r2 save / restore) */ +# define FARCALL __attribute__((__longcall__)) +#else +# define FARCALL +#endif + #ifndef __stdcall # ifdef __i386__ # ifdef __GNUC__ diff --git a/include/wine/library.h b/include/wine/library.h index 242bb69f17..3c09d89ac9 100644 --- a/include/wine/library.h +++ b/include/wine/library.h @@ -37,15 +37,15 @@ extern "C" {
/* configuration */
-extern const char *wine_get_build_dir(void); -extern const char *wine_get_config_dir(void); -extern const char *wine_get_data_dir(void); -extern const char *wine_get_server_dir(void); -extern const char *wine_get_user_name(void); -extern const char *wine_get_version(void); -extern const char *wine_get_build_id(void); -extern void wine_init_argv0_path( const char *argv0 ); -extern void wine_exec_wine_binary( const char *name, char **argv, const char *env_var ); +extern FARCALL const char *wine_get_build_dir(void); +extern FARCALL const char *wine_get_config_dir(void); +extern FARCALL const char *wine_get_data_dir(void); +extern FARCALL const char *wine_get_server_dir(void); +extern FARCALL const char *wine_get_user_name(void); +extern FARCALL const char *wine_get_version(void); +extern FARCALL const char *wine_get_build_id(void); +extern FARCALL void wine_init_argv0_path( const char *argv0 ); +extern FARCALL void wine_exec_wine_binary( const char *name, char **argv, const char *env_var );
/* dll loading */
diff --git a/include/wine/server.h b/include/wine/server.h index d573d1f7ad..509f958a0d 100644 --- a/include/wine/server.h +++ b/include/wine/server.h @@ -49,7 +49,7 @@ struct __server_request_info struct __server_iovec data[__SERVER_MAX_DATA]; /* request variable size data */ };
-extern unsigned int wine_server_call( void *req_ptr ); +extern unsigned int FARCALL wine_server_call( void *req_ptr ); extern void CDECL wine_server_send_fd( int fd ); extern int CDECL wine_server_fd_to_handle( int fd, unsigned int access, unsigned int attributes, HANDLE *handle ); extern int CDECL wine_server_handle_to_fd( HANDLE handle, unsigned int access, int *unix_fd, unsigned int *options );
Hi Timothy and welcome to Wine development,
I haven't had a closer look at this patch, but still some notes below:
Am 26.02.19 um 11:03 schrieb Timothy Pearson:
wine_server_call(), as potentially crossing DLL module boundaries This is needed to allow some systems, such as ppc64, to update module-specific registers (TOC)
Could you please choose a short subject and then add a longer explanation above the sign-off when necessary?
Signed-off-by: Timothy Pearson tpearson@raptorengineering.com
dlls/shell32/shell32_main.c | 2 +- include/windef.h | 7 +++++++ include/wine/library.h | 18 +++++++++--------- include/wine/server.h | 2 +- 4 files changed, 18 insertions(+), 11 deletions(-)
Could you please split this patch into smaller ones?