The current SVN trunk is missing the SDLCALL specifier at numerous locations.

It has to be added for all (possibly user provided) callbacks.

I stumbled over this while creating a makefile for the OpenWatcom compiler for
Win32.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401728
This commit is contained in:
Sam Lantinga 2006-05-07 03:40:06 +00:00
parent cab8a203a7
commit b4ba6518d6
19 changed files with 85 additions and 63 deletions

View file

@ -5,7 +5,6 @@
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include "SDL.h"
#include "SDL_mutex.h"
@ -14,6 +13,7 @@
static SDL_mutex *mutex = NULL;
static Uint32 mainthread;
static SDL_Thread *threads[6];
static volatile int doterminate = 0;
/*
* SDL_Quit() shouldn't be used with atexit() directly because
@ -31,8 +31,8 @@ void printid(void)
void terminate(int sig)
{
printf("Process %u: raising SIGTERM\n", SDL_ThreadID());
raise(SIGTERM);
signal(SIGINT, terminate);
doterminate = 1;
}
void closemutex(int sig)
{
@ -44,7 +44,7 @@ void closemutex(int sig)
SDL_DestroyMutex(mutex);
exit(sig);
}
int Run(void *data)
int SDLCALL Run(void *data)
{
if ( SDL_ThreadID() == mainthread )
signal(SIGTERM, closemutex);
@ -63,6 +63,10 @@ int Run(void *data)
}
/* If this sleep isn't done, then threads may starve */
SDL_Delay(10);
if (SDL_ThreadID() == mainthread && doterminate) {
printf("Process %u: raising SIGTERM\n", SDL_ThreadID());
raise(SIGTERM);
}
}
return(0);
}