summaryrefslogtreecommitdiff
path: root/hw/vfb
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-11-30 22:20:09 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-12-05 14:32:45 -0800
commitd829a7c5cb42c979b58f3547136df5b05d906423 (patch)
tree8ba5b6e2788f9bca49d51bb743dd0f211a91fb9f /hw/vfb
parent4be68b03128e958d2a6dc1b7feb3587329b9561b (diff)
Move to autoconf standard function name checks & defines
Replace multiple methods of checking for functions with AC_CHECK_FUNCS Replace multiple methods of selecting fallback funcs with AC_REPLACE_FUNCS Replace HAS_* and NEED_* #defines with autogenerated HAVE_* Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Diffstat (limited to 'hw/vfb')
-rw-r--r--hw/vfb/InitOutput.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index 9a9905d8f..e1af5a471 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -48,12 +48,12 @@ from The Open Group.
#include "mipointer.h"
#include "micmap.h"
#include <sys/types.h>
-#ifdef HAS_MMAP
+#ifdef HAVE_MMAP
#include <sys/mman.h>
#ifndef MAP_FILE
#define MAP_FILE 0
#endif
-#endif /* HAS_MMAP */
+#endif /* HAVE_MMAP */
#include <sys/stat.h>
#include <errno.h>
#ifndef WIN32
@@ -93,7 +93,7 @@ typedef struct
unsigned int lineBias;
CloseScreenProcPtr closeScreen;
-#ifdef HAS_MMAP
+#ifdef HAVE_MMAP
int mmap_fd;
char mmap_file[MAXPATHLEN];
#endif
@@ -114,7 +114,7 @@ static vfbScreenInfo defaultScreenInfo = {
.lineBias = VFB_DEFAULT_LINEBIAS,
};
static Bool vfbPixmapDepths[33];
-#ifdef HAS_MMAP
+#ifdef HAVE_MMAP
static char *pfbdir = NULL;
#endif
typedef enum { NORMAL_MEMORY_FB, SHARED_MEMORY_FB, MMAPPED_FILE_FB } fbMemType;
@@ -158,7 +158,7 @@ ddxGiveUp(enum ExitCode error)
switch (fbmemtype)
{
-#ifdef HAS_MMAP
+#ifdef HAVE_MMAP
case MMAPPED_FILE_FB:
for (i = 0; i < vfbNumScreens; i++)
{
@@ -170,10 +170,10 @@ ddxGiveUp(enum ExitCode error)
}
}
break;
-#else /* HAS_MMAP */
+#else /* HAVE_MMAP */
case MMAPPED_FILE_FB:
break;
-#endif /* HAS_MMAP */
+#endif /* HAVE_MMAP */
#ifdef HAS_SHM
case SHARED_MEMORY_FB:
@@ -241,7 +241,7 @@ ddxUseMsg(void)
ErrorF("-blackpixel n pixel value for black\n");
ErrorF("-whitepixel n pixel value for white\n");
-#ifdef HAS_MMAP
+#ifdef HAVE_MMAP
ErrorF("-fbdir directory put framebuffers in mmap'ed files in directory\n");
#endif
@@ -370,7 +370,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
return 2;
}
-#ifdef HAS_MMAP
+#ifdef HAVE_MMAP
if (strcmp (argv[i], "-fbdir") == 0) /* -fbdir directory */
{
CHECK_FOR_REQUIRED_ARGUMENTS(1);
@@ -378,7 +378,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
fbmemtype = MMAPPED_FILE_FB;
return 2;
}
-#endif /* HAS_MMAP */
+#endif /* HAVE_MMAP */
#ifdef HAS_SHM
if (strcmp (argv[i], "-shmem") == 0) /* -shmem */
@@ -523,7 +523,7 @@ vfbSaveScreen(ScreenPtr pScreen, int on)
return TRUE;
}
-#ifdef HAS_MMAP
+#ifdef HAVE_MMAP
/* this flushes any changes to the screens out to the mmapped file */
static void
@@ -608,7 +608,7 @@ vfbAllocateMmappedFramebuffer(vfbScreenInfoPtr pvfb)
pvfb->pXWDHeader = NULL;
}
}
-#endif /* HAS_MMAP */
+#endif /* HAVE_MMAP */
#ifdef HAS_SHM
@@ -672,7 +672,7 @@ vfbAllocateFramebufferMemory(vfbScreenInfoPtr pvfb)
pvfb->pXWDHeader = NULL;
switch (fbmemtype)
{
-#ifdef HAS_MMAP
+#ifdef HAVE_MMAP
case MMAPPED_FILE_FB: vfbAllocateMmappedFramebuffer(pvfb); break;
#else
case MMAPPED_FILE_FB: break;