Mercurial > sdl-ios-xcode
diff src/events/SDL_quit.c @ 1330:450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
using Visual C++ 2005
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 06 Feb 2006 08:28:51 +0000 |
parents | c9b51268668f |
children | d910939febfa |
line wrap: on
line diff
--- a/src/events/SDL_quit.c Sat Feb 04 22:01:44 2006 +0000 +++ b/src/events/SDL_quit.c Mon Feb 06 08:28:51 2006 +0000 @@ -22,12 +22,9 @@ /* General quit handling code for SDL */ -#if defined (_WIN32_WCE) -#define NO_SIGNAL_H -#endif +#include "SDL_config.h" -#include <stdio.h> -#ifndef NO_SIGNAL_H +#ifdef HAVE_SIGNAL_H #include <signal.h> #endif @@ -35,7 +32,7 @@ #include "SDL_events_c.h" -#ifndef NO_SIGNAL_H +#ifdef HAVE_SIGNAL_H static void SDL_HandleSIG(int sig) { /* Reset the signal handler */ @@ -44,12 +41,12 @@ /* Signal a quit interrupt */ SDL_PrivateQuit(); } -#endif /* NO_SIGNAL_H */ +#endif /* HAVE_SIGNAL_H */ /* Public functions */ int SDL_QuitInit(void) { -#ifndef NO_SIGNAL_H +#ifdef HAVE_SIGNAL_H void (*ohandler)(int); /* Both SIGINT and SIGTERM are translated into quit interrupts */ @@ -59,14 +56,14 @@ ohandler = signal(SIGTERM, SDL_HandleSIG); if ( ohandler != SIG_DFL ) signal(SIGTERM, ohandler); -#endif /* NO_SIGNAL_H */ +#endif /* HAVE_SIGNAL_H */ /* That's it! */ return(0); } void SDL_QuitQuit(void) { -#ifndef NO_SIGNAL_H +#ifdef HAVE_SIGNAL_H void (*ohandler)(int); ohandler = signal(SIGINT, SIG_DFL); @@ -75,7 +72,7 @@ ohandler = signal(SIGTERM, SIG_DFL); if ( ohandler != SDL_HandleSIG ) signal(SIGTERM, ohandler); -#endif /* NO_SIGNAL_H */ +#endif /* HAVE_SIGNAL_H */ } /* This function returns 1 if it's okay to close the application window */