[Mplayer-cvslog] CVS: main/linux shmem.c,1.3,1.4

Alex Beregszaszi alex at mplayer.dev.hu
Mon Nov 19 17:57:42 CET 2001


Update of /cvsroot/mplayer/main/linux
In directory mplayer:/var/tmp.root/cvs-serv10715

Modified Files:
	shmem.c 
Log Message:
#ifdef HAVE_SHM

Index: shmem.c
===================================================================
RCS file: /cvsroot/mplayer/main/linux/shmem.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- shmem.c	19 Jul 2001 20:32:13 -0000	1.3
+++ shmem.c	19 Nov 2001 16:57:40 -0000	1.4
@@ -6,6 +6,8 @@
  *   Sun Apr  6 02:26:26 MET DST 1997
  */
 
+#include "../config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -22,6 +24,7 @@
 #include <sys/select.h>
 #endif
 
+#ifdef HAVE_SHM
 #include <sys/ipc.h>
 #include <sys/shm.h>
 
@@ -72,7 +75,7 @@
     return p;
 	}
   default:
-    printf("FATAL: Cannot alloate %d bytes shared memory :(\n",size);
+    printf("FATAL: Cannot allocate %d bytes of shared memory :(\n",size);
     return NULL;
   }
   ++shmem_type;
@@ -86,3 +89,15 @@
       break;
   }
 }
+#else /* HAVE_SHM */
+void *shmem_alloc(int size)
+{
+    printf("FATAL: no SHM support was compiled in!\n");
+    return(NULL);
+}
+
+void shmem_free(void *p)
+{
+    printf("FATAL: no SHM support was compiled in!\n");    
+}
+#endif /* HAVE_SHM */




More information about the MPlayer-cvslog mailing list