[PATCH libXvMC 2/2] config: use Automake defaults when checking for library functions.

Gaetan Nadon memsize at videotron.ca
Sat Mar 5 09:01:44 PST 2011


Which follows a uniform naming convention.

Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 configure.ac |    2 +-
 src/XvMC.c   |   12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1434023..5fb8113 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,7 +44,7 @@ XORG_CHECK_MALLOC_ZERO
 PKG_CHECK_MODULES(XVMC, x11 xext xv xextproto videoproto)
 
 # Checks for library functions.
-AC_CHECK_FUNC([shmat], AC_DEFINE(HAS_SHM,1,[Has shm*() functions]))
+AC_CHECK_FUNCS([shmat])
 		  
 # Allow checking code with lint, sparse, etc.
 XORG_WITH_LINT
diff --git a/src/XvMC.c b/src/XvMC.c
index 3bf5a43..fd33f40 100644
--- a/src/XvMC.c
+++ b/src/XvMC.c
@@ -3,7 +3,7 @@
 #endif
 #include <stdio.h>
 #include "XvMClibint.h"
-#ifdef HAS_SHM
+#ifdef HAVE_SHMAT
 #ifndef Lynx
 #include <sys/ipc.h>
 #include <sys/shm.h>
@@ -11,7 +11,7 @@
 #include <ipc.h>
 #include <shm.h>
 #endif /* Lynx */
-#endif /* HAS_SHM */
+#endif /* HAVE_SHMAT */
 #include <unistd.h>
 #include <sys/time.h>
 #include <X11/extensions/Xext.h>
@@ -487,7 +487,7 @@ Status XvMCGetDRInfo(Display *dpy, XvPortID port,
     char *tmpBuf = NULL;
     CARD32 magic;
 
-#ifdef HAS_SHM
+#ifdef HAVE_SHMAT
     volatile CARD32 *shMem;
     struct timezone here;
     struct timeval now;
@@ -503,7 +503,7 @@ Status XvMCGetDRInfo(Display *dpy, XvPortID port,
     req->port = port;
     magic = 0;
     req->magic = 0;
-#ifdef HAS_SHM 
+#ifdef HAVE_SHMAT 
     req->shmKey = shmget(IPC_PRIVATE, 1024, IPC_CREAT | 0600);
 
     /*
@@ -541,14 +541,14 @@ Status XvMCGetDRInfo(Display *dpy, XvPortID port,
     if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) {
         UnlockDisplay (dpy);
         SyncHandle ();
-#ifdef HAS_SHM
+#ifdef HAVE_SHMAT
 	if ( req->shmKey >= 0) {
 	    shmdt( (const void *) shMem );
 	}            
 #endif
         return -1;
     }
-#ifdef HAS_SHM
+#ifdef HAVE_SHMAT
     shmdt( (const void *) shMem );
 #endif
 
-- 
1.6.0.4



More information about the xorg-devel mailing list