[pulseaudio-commits] r1312 - in /trunk: configure.ac src/pulsecore/memblock.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Tue Aug 22 00:41:25 PDT 2006


Author: ossman
Date: Tue Aug 22 09:41:23 2006
New Revision: 1312

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1312&root=pulseaudio&view=rev
Log:
Fix detection of page size for non-POSIX systems.

Modified:
    trunk/configure.ac
    trunk/src/pulsecore/memblock.c

Modified: trunk/configure.ac
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/configure.ac?rev=1312&root=pulseaudio&r1=1311&r2=1312&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue Aug 22 09:41:23 2006
@@ -221,7 +221,8 @@
 AC_FUNC_GETGROUPS
 AC_FUNC_SELECT_ARGTYPES
 AC_CHECK_FUNCS([chmod chown getaddrinfo getgrgid_r getpwuid_r gettimeofday \
-    getuid inet_ntop inet_pton nanosleep pipe setpgid setsid sigaction sleep])
+    getuid inet_ntop inet_pton nanosleep pipe setpgid setsid sigaction sleep \
+    sysconf])
 AC_CHECK_FUNCS([mkfifo], [HAVE_MKFIFO=1], [HAVE_MKFIFO=0])
 
 AM_CONDITIONAL(HAVE_MKFIFO, test "x$HAVE_MKFIFO" = "x1")

Modified: trunk/src/pulsecore/memblock.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/memblock.c?rev=1312&root=pulseaudio&r1=1311&r2=1312&view=diff
==============================================================================
--- trunk/src/pulsecore/memblock.c (original)
+++ trunk/src/pulsecore/memblock.c Tue Aug 22 09:41:23 2006
@@ -443,8 +443,14 @@
 
     p = pa_xnew(pa_mempool, 1);
 
+#ifdef HAVE_SYSCONF
     ps = (size_t) sysconf(_SC_PAGESIZE);
-    
+#elif defined(PAGE_SIZE)
+	ps = (size_t) PAGE_SIZE;
+#else
+	ps = 4096; /* Let's hope it's like x86. */
+#endif
+
     p->block_size = (PA_MEMPOOL_SLOT_SIZE/ps)*ps;
 
     if (p->block_size < ps)




More information about the pulseaudio-commits mailing list