Commits

Anonymous committed c1565d0

base.c for symbian

Comments (0)

Files changed (1)

 static void
 pygame_parachute (int sig)
 {
+#ifdef HAVE_SIGNAL_H
     char* signaltype;
     
     signal (sig, SIG_DFL);
 
     atexit_quit ();
     Py_FatalError (signaltype);
+#endif    
 }
 
 static int fatal_signals[] =
 static void
 install_parachute (void)
 {
+#ifdef HAVE_SIGNAL_H
     int i;
     void (*ohandler)(int);
 
         if (ohandler != SIG_DFL)
             signal (fatal_signals[i], ohandler);
     }
-#ifdef SIGALRM
+    
+#if defined(SIGALRM) && defined(HAVE_SIGACTION) 
     {/* Set SIGALRM to be ignored -- necessary on Solaris */
         struct sigaction action, oaction;
         /* Set SIG_IGN action */
             sigaction (SIGALRM, &oaction, NULL);
     }
 #endif
+#endif    
     return;
 }
 
 static void
 uninstall_parachute (void)
 {
+#ifdef HAVE_SIGNAL_H
     int i;
     void (*ohandler)(int);
 
         if (ohandler != pygame_parachute)
             signal (fatal_signals[i], ohandler);
     }
+#endif    
 }
 
 /* bind functions to python */
     static void* c_api[PYGAMEAPI_BASE_NUMSLOTS];
 
     /* create the module */
-    module = Py_InitModule3 ("base", init__builtins__, DOC_PYGAME);
+    module = Py_InitModule (MODPREFIX "base", init__builtins__);
     dict = PyModule_GetDict (module);
 
     /* create the exceptions */
 
     /*some intiialization*/
     Py_AtExit (atexit_quit);
+#ifdef HAVE_SIGNAL_H    
     install_parachute ();
+#endif
+    
 #ifdef MS_WIN32
     SDL_RegisterApp ("pygame", 0, GetModuleHandle (NULL));
 #endif