# HG changeset patch # User alex # Date 1006189060 0 # Node ID 8687599be101daeacd6466b6b3502e56263d136e # Parent fff5d8446467af03de6f34ffcee4dffedfe2a44d #ifdef HAVE_SHM diff -r fff5d8446467 -r 8687599be101 linux/shmem.c --- a/linux/shmem.c Mon Nov 19 16:42:01 2001 +0000 +++ b/linux/shmem.c Mon Nov 19 16:57:40 2001 +0000 @@ -6,6 +6,8 @@ * Sun Apr 6 02:26:26 MET DST 1997 */ +#include "../config.h" + #include #include #include @@ -22,6 +24,7 @@ #include #endif +#ifdef HAVE_SHM #include #include @@ -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 */