search for: ac_cv_func_smmap

Displaying 1 result from an estimated 1 matches for "ac_cv_func_smmap".

2001 Mar 17
1
ogg123: shared memory by mmap()
..._SUBST(AO_LIBS) rm -f conf.aotest ]) + +dnl Shamelessly stolen from Joerg Schilling's star. +dnl Copyright 1998 J. Schilling + +dnl Checks if mmap() works to get shared memory +dnl Defines HAVE_SMMAP on success. +AC_DEFUN(AC_FUNC_SMMAP, +[AC_CACHE_CHECK([if mmap works to get shared memory], ac_cv_func_smmap, + [AC_TRY_RUN([ +#include <sys/types.h> +#include <sys/mman.h> + +char * +mkshare() +{ + int size = 8192; + int f; + char *addr; + + if ((f = open("/dev/zero", 2)) < 0) + exit(1); + addr = mmap(0,...