diff SDL_sound_internal.h @ 377:cbb15ecf423a

WinCE (PocketPC) patches from Tyler.
author Ryan C. Gordon <icculus@icculus.org>
date Tue, 02 Jul 2002 03:58:24 +0000
parents 5a72981b8cba
children fb519e6028e3
line wrap: on
line diff
--- a/SDL_sound_internal.h	Tue Jul 02 03:57:48 2002 +0000
+++ b/SDL_sound_internal.h	Tue Jul 02 03:58:24 2002 +0000
@@ -45,6 +45,25 @@
 #define SNDDBG(x)
 #endif
 
+#if HAVE_ASSERT_H
+#  include <assert.h>
+#endif
+
+#ifdef _WIN32_WCE
+    extern char *strrchr(const char *s, int c);
+#   ifdef NDEBUG
+#       define assert(x)
+#   else
+#       define assert(x) if(!x) { fprintf(stderr,"Assertion failed in %s, line %s.\n",__FILE__,__LINE__); fclose(stderr); fclose(stdout); exit(1); }
+#   endif
+#endif
+ 
+
+#if (!defined assert)  /* if all else fails. */
+#  define assert(x)
+#endif
+
+
 typedef struct __SOUND_DECODERFUNCTIONS__
 {
         /* This is a block of info about your decoder. See SDL_sound.h. */