diff src/thread/linux/SDL_systhread.c @ 1338:604d73db6802

Removed uses of stdlib.h and string.h
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 09:29:18 +0000
parents 3692456e7b0f
children c71e05b4dc2e
line wrap: on
line diff
--- a/src/thread/linux/SDL_systhread.c	Tue Feb 07 07:03:29 2006 +0000
+++ b/src/thread/linux/SDL_systhread.c	Tue Feb 07 09:29:18 2006 +0000
@@ -22,6 +22,7 @@
 
 /* Linux thread management routines for SDL */
 
+#include "SDL_stdlib.h"
 #include "SDL_error.h"
 #include "SDL_thread.h"
 #include "SDL_systhread.h"
@@ -138,7 +139,6 @@
 
 #else /* Linux-specific clone() based implementation */
 
-#include <stdlib.h>
 #include <errno.h>
 #include <unistd.h>
 #include <sys/wait.h>
@@ -227,7 +227,7 @@
 	*/
 	char command[1024];
 
-	sprintf(command,
+	SDL_snprintf(command, SDL_arraysize(command),
 		"ps ax|fgrep -v fgrep|fgrep -v '<zombie>'|fgrep %d >/dev/null",
 								thread->handle);
 	while ( system(command) == 0 )