request.h: size of unnamed array is negative
Hugh McMaster
hugh.mcmaster at masterindexing.com
Sun Apr 14 04:20:05 CDT 2013
On Apr 13, 2013, Charles Davis wrote:
> STOP! You should modify server/protocol.def instead. The file you changed is automatically generated from protocol.def, along with a bunch of other files needed to make the server interface magic work.
>> On Apr 13, 2013, at 7:39 AM, Hugh McMaster wrote:
>> The interesting thing about server/request.h is that the handler declarations appear in the area of the file commented as automatically generated.
>Of course they do. The Perl script tools/make_requests is responsible for generating those declarations from server/protocol.def. It is also
>responsible for generating include/wine/server_protocol.h, and pieces of server/trace.c. You should not have to manually change any of them (other
>than protocol.def, of course). You might, however, have to run make_requests manually, though (the makefiles, for some reason, won't invoke it for
>you).
This was the key piece of information I needed. I never knew I had to run tools/make_requests, so I was making all of the changes to the various server files manually. After running tools/make_requests, Wine compiled perfectly.
I am having a bit of trouble with the server though.
In server/window.c, I've got the following code for testing purposes.
/* retrieve the desktop workarea */
DECL_HANDLER(get_desktop_workarea)
{
int screen_h = req->spi_workarea.bottom;
reply->screen_x = 1680;
reply->screen_y = screen_h;
}
I'm also using the following server request in programs/wineconsole.c (again, for testing):
typedef struct
{
int left;
int top;
int right;
int bottom;
} rectangle_t;
rectangle_t workarea;
SystemParametersInfoA(SPI_GETWORKAREA, 0, &workarea, 0);
SERVER_START_REQ( get_desktop_workarea )
{
if(!wine_server_call_err( req ))
{
req->spi_workarea.bottom = workarea.bottom;
printf("wineconsole.c: width: %d, height: %d\n", reply->screen_x, reply->screen_y);
}
}
SERVER_END_REQ;
The terminal output is unexpected. screen_width is 1680, as you would expect from a hard-coded constant. screen_height is 0, though. It should be 1025.
Is there something special/different that needs to be done for the server to accept input?
Once again, thank you for your help.
More information about the wine-devel
mailing list