summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Torri <storri@users.sourceforge.net>2003-09-16 02:11:45 +0000
committerStephen Torri <storri@users.sourceforge.net>2003-09-16 02:11:45 +0000
commitd485d8a5ff5068f08e7ff38f5cda53739226777e (patch)
treedc23f2838b1dc5c9db6993250fb0670c41caee85 /src
parente6a8bb0378f636a5bc1104d75c3387055eaf4dd8 (diff)
downloadxine-lib-d485d8a5ff5068f08e7ff38f5cda53739226777e.tar.gz
xine-lib-d485d8a5ff5068f08e7ff38f5cda53739226777e.tar.bz2
Removed headers that provided nothing needed to the build.
Replaced 'while((int) ptr % alignment)' with 'while((size_t) ptr % alignment)' On a 32-bit architecture the comparision of ptr and alignment is fine. On a 64-bit architecture the comparision of ptr (32bits) and alignment (64bits) can cause problems in the desired behaviour. So casting the ptr to the same size as alignment cleared this issue. CVS patchset: 5392 CVS date: 2003/09/16 02:11:45
Diffstat (limited to 'src')
-rw-r--r--src/xine-utils/utils.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c
index 02c9b1ef6..b3286c11a 100644
--- a/src/xine-utils/utils.c
+++ b/src/xine-utils/utils.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: utils.c,v 1.17 2003/07/27 12:47:23 hadess Exp $
+ * $Id: utils.c,v 1.18 2003/09/16 02:11:45 storri Exp $
*
*/
#define _POSIX_PTHREAD_SEMANTICS 1 /* for 5-arg getpwuid_r on solaris */
@@ -28,15 +28,8 @@
#include "xineutils.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <errno.h>
-#include <string.h>
-#include <unistd.h>
#include <pwd.h>
-#include <time.h>
-#include <sys/types.h>
-#include <pthread.h>
#if HAVE_EXECINFO_H
#include <execinfo.h>
#endif
@@ -44,7 +37,6 @@
#include <ucontext.h>
#endif
-#include "compat.h"
void *xine_xmalloc(size_t size) {
void *ptr;
@@ -68,7 +60,7 @@ void *xine_xmalloc_aligned(size_t alignment, size_t size, void **base) {
*base = ptr = xine_xmalloc (size+alignment);
- while ((int) ptr % alignment)
+ while ((size_t) ptr % alignment)
ptr++;
return ptr;
@@ -161,7 +153,7 @@ void xine_print_trace (void) {
size = backtrace (array, 10);
strings = backtrace_symbols (array, size);
- printf ("Obtained %d stack frames.\n", size);
+ printf ("Obtained %lu stack frames.\n", (unsigned long) size);
for (i = 0; i < size; i++) {
printf ("%s\n", strings[i]);