summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-12-04 01:57:46 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-12-04 02:42:28 -0200
commit5dbe70dd52fd8daf8d0797951cc5a758d2c3b44c (patch)
tree3b3c5f1cabfc63049e15fb0d6b9430897cd71175
parentf841d4e3cccbde02e91c948f5ffb9e32c8c3b3cc (diff)
Remove dummylib.
Only cvt required it, and only used XNF{,c}alloc via xnf{,c}alloc macros. Based on patch by Eric Anholt.
-rw-r--r--configure.ac1
-rw-r--r--hw/xfree86/Makefile.am4
-rw-r--r--hw/xfree86/dummylib/Makefile.am38
-rw-r--r--hw/xfree86/dummylib/README7
-rw-r--r--hw/xfree86/dummylib/dixprivates.c19
-rw-r--r--hw/xfree86/dummylib/dummylib.h9
-rw-r--r--hw/xfree86/dummylib/fatalerror.c25
-rw-r--r--hw/xfree86/dummylib/getemptypci.c19
-rw-r--r--hw/xfree86/dummylib/getvalidbios.c19
-rw-r--r--hw/xfree86/dummylib/logvwrite.c21
-rw-r--r--hw/xfree86/dummylib/pcitestmulti.c19
-rw-r--r--hw/xfree86/dummylib/verrorf.c19
-rw-r--r--hw/xfree86/dummylib/xalloc.c111
-rw-r--r--hw/xfree86/dummylib/xf86addrestolist.c24
-rw-r--r--hw/xfree86/dummylib/xf86allocscripi.c19
-rw-r--r--hw/xfree86/dummylib/xf86drvmsg.c24
-rw-r--r--hw/xfree86/dummylib/xf86drvmsgverb.c24
-rw-r--r--hw/xfree86/dummylib/xf86errorf.c33
-rw-r--r--hw/xfree86/dummylib/xf86errorfverb.c24
-rw-r--r--hw/xfree86/dummylib/xf86getverb.c19
-rw-r--r--hw/xfree86/dummylib/xf86info.c12
-rw-r--r--hw/xfree86/dummylib/xf86msg.c24
-rw-r--r--hw/xfree86/dummylib/xf86msgverb.c24
-rw-r--r--hw/xfree86/dummylib/xf86opt.c25
-rw-r--r--hw/xfree86/dummylib/xf86screens.c12
-rw-r--r--hw/xfree86/dummylib/xf86servisinit.c19
-rw-r--r--hw/xfree86/dummylib/xf86verbose.c12
-rw-r--r--hw/xfree86/utils/cvt/Makefile.am2
-rw-r--r--hw/xfree86/utils/cvt/cvt.c28
29 files changed, 30 insertions, 606 deletions
diff --git a/configure.ac b/configure.ac
index 34b06f4ee..5649fe587 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1896,7 +1896,6 @@ hw/xfree86/doc/man/Makefile
hw/xfree86/doc/sgml/Makefile
hw/xfree86/dri/Makefile
hw/xfree86/dri2/Makefile
-hw/xfree86/dummylib/Makefile
hw/xfree86/exa/Makefile
hw/xfree86/fbdevhw/Makefile
hw/xfree86/i2c/Makefile
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 09ee35078..115d82918 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -14,12 +14,12 @@ endif
DOC_SUBDIR = doc
-SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser \
+SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support parser \
ramdac shadowfb vbe vgahw xaa \
xf8_16bpp loader dixmods exa modes \
$(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR)
-DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \
+DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
parser ramdac shadowfb vbe vgahw xaa \
xf8_16bpp loader dixmods dri dri2 exa modes \
utils doc
diff --git a/hw/xfree86/dummylib/Makefile.am b/hw/xfree86/dummylib/Makefile.am
deleted file mode 100644
index 85a1d03dd..000000000
--- a/hw/xfree86/dummylib/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-# libdummy.a contains just those bits used in the server itself
-# libdummy-nonserver.a contains additional routines normally found in the
-# server for use in building the utilities like config tools
-
-noinst_LIBRARIES = libdummy-nonserver.a
-
-INCLUDES = $(XORG_INCS)
-
-AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
-
-if NEED_STRLCAT
-STRL_SRCS = $(top_srcdir)/os/strlcat.c $(top_srcdir)/os/strlcpy.c
-endif
-
-libdummy_nonserver_a_SOURCES = \
- dixprivates.c \
- fatalerror.c \
- logvwrite.c \
- $(STRL_SRCS) \
- verrorf.c \
- xalloc.c \
- xf86allocscripi.c \
- xf86addrestolist.c \
- xf86drvmsg.c \
- xf86drvmsgverb.c \
- xf86errorf.c \
- xf86errorfverb.c \
- xf86getverb.c \
- xf86info.c \
- xf86msg.c \
- xf86msgverb.c \
- xf86opt.c \
- xf86screens.c \
- xf86servisinit.c \
- xf86verbose.c \
- $(srcdir)/../os-support/shared/sigiostubs.c
-
-EXTRA_DIST = README dummylib.h
diff --git a/hw/xfree86/dummylib/README b/hw/xfree86/dummylib/README
deleted file mode 100644
index 4e270307a..000000000
--- a/hw/xfree86/dummylib/README
+++ /dev/null
@@ -1,7 +0,0 @@
-
-libdummy (dummylib) contains basic utility functions required by libxf86_os.a.
-There is one symbol per source/object so that each can be overriden
-individually by whatever uses this library.
-
-
-$XFree86$
diff --git a/hw/xfree86/dummylib/dixprivates.c b/hw/xfree86/dummylib/dixprivates.c
deleted file mode 100644
index 0c1376dfa..000000000
--- a/hw/xfree86/dummylib/dixprivates.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-pointer *
-dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key)
-{
- return NULL; /* not used */
-}
-
diff --git a/hw/xfree86/dummylib/dummylib.h b/hw/xfree86/dummylib/dummylib.h
deleted file mode 100644
index b70b5d0b4..000000000
--- a/hw/xfree86/dummylib/dummylib.h
+++ /dev/null
@@ -1,9 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _DUMMY_LIB_H
-#define _DUMMY_LIB_H
-
-#endif /* _DUMMY_LIB_H */
diff --git a/hw/xfree86/dummylib/fatalerror.c b/hw/xfree86/dummylib/fatalerror.c
deleted file mode 100644
index bbeda37df..000000000
--- a/hw/xfree86/dummylib/fatalerror.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-void
-FatalError(const char *f, ...)
-{
- va_list args;
-
- va_start(args, f);
- fprintf(stderr, "Fatal Error:\n");
- vfprintf(stderr, f, args);
- va_end(args);
- exit(1);
-}
-
diff --git a/hw/xfree86/dummylib/getemptypci.c b/hw/xfree86/dummylib/getemptypci.c
deleted file mode 100644
index 03119d3d9..000000000
--- a/hw/xfree86/dummylib/getemptypci.c
+++ /dev/null
@@ -1,19 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-memType
-getEmptyPciRange(PCITAG tag, int base_reg)
-{
- return 0;
-}
diff --git a/hw/xfree86/dummylib/getvalidbios.c b/hw/xfree86/dummylib/getvalidbios.c
deleted file mode 100644
index 1d061d433..000000000
--- a/hw/xfree86/dummylib/getvalidbios.c
+++ /dev/null
@@ -1,19 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-memType
-getValidBIOSBase(PCITAG tag, int num)
-{
- return 0;
-}
diff --git a/hw/xfree86/dummylib/logvwrite.c b/hw/xfree86/dummylib/logvwrite.c
deleted file mode 100644
index aed1ad247..000000000
--- a/hw/xfree86/dummylib/logvwrite.c
+++ /dev/null
@@ -1,21 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-void
-LogVWrite(int verb, const char *format, va_list ap)
-{
- if (xf86Verbose >= verb)
- vfprintf(stderr, format, ap);
-}
-
diff --git a/hw/xfree86/dummylib/pcitestmulti.c b/hw/xfree86/dummylib/pcitestmulti.c
deleted file mode 100644
index 65288d81b..000000000
--- a/hw/xfree86/dummylib/pcitestmulti.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-int
-pciTestMultiDeviceCard(int bus, int dev, int func, PCITAG** pTag)
-{
- return 0;
-}
-
diff --git a/hw/xfree86/dummylib/verrorf.c b/hw/xfree86/dummylib/verrorf.c
deleted file mode 100644
index 886366ba2..000000000
--- a/hw/xfree86/dummylib/verrorf.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-void
-VErrorF(const char *f, va_list args)
-{
- vfprintf(stderr, f, args);
-}
-
diff --git a/hw/xfree86/dummylib/xalloc.c b/hw/xfree86/dummylib/xalloc.c
deleted file mode 100644
index 77c168f7e..000000000
--- a/hw/xfree86/dummylib/xalloc.c
+++ /dev/null
@@ -1,111 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-pointer
-Xalloc(unsigned long n)
-{
- if (!n)
- n = 1;
- return malloc(n);
-}
-
-pointer
-Xrealloc(pointer p, unsigned long n)
-{
- if (!n)
- n = 1;
- return realloc(p, n);
-}
-
-pointer
-Xcalloc(unsigned long n)
-{
- pointer r;
-
- r = Xalloc(n);
- memset(r, 0, n);
- return r;
-}
-
-pointer
-XNFalloc(unsigned long n)
-{
- pointer r;
-
- r = Xalloc(n);
- if (!r)
- FatalError("XNFalloc failed\n");
- return r;
-
-}
-
-pointer
-XNFrealloc(pointer p, unsigned long n)
-{
- pointer r;
-
- r = Xrealloc(p, n);
- if (!r)
- FatalError("XNFrealloc failed\n");
- return r;
-
-}
-
-pointer
-XNFcalloc(unsigned long n)
-{
- pointer r;
-
- r = Xcalloc(n);
- if (!r)
- FatalError("XNFcalloc failed\n");
- return r;
-
-}
-
-void
-Xfree(pointer p)
-{
- free(p);
-}
-
-char *
-Xstrdup(const char *s)
-{
- char *sd;
-
- if (s == NULL)
- return NULL;
-
- sd = (char *)Xalloc(strlen(s) + 1);
- if (sd != NULL)
- strcpy(sd, s);
- return sd;
-}
-
-char *
-XNFstrdup(const char *s)
-{
- char *sd;
- size_t len;
-
- if (s == NULL)
- return NULL;
-
- len = strlen(s) + 1;
- sd = (char *)XNFalloc(len);
- strlcpy(sd, s, len);
- return sd;
-}
-
diff --git a/hw/xfree86/dummylib/xf86addrestolist.c b/hw/xfree86/dummylib/xf86addrestolist.c
deleted file mode 100644
index d8faaacda..000000000
--- a/hw/xfree86/dummylib/xf86addrestolist.c
+++ /dev/null
@@ -1,24 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86.h"
-
-resPtr
-xf86AddResToList(resPtr rlist, resRange *Range, int entityIndex)
-{
- return rlist;
-}
-
-void
-xf86FreeResList(resPtr rlist)
-{
- return;
-}
-
-resPtr
-xf86DupResList(const resPtr rlist)
-{
- return rlist;
-}
diff --git a/hw/xfree86/dummylib/xf86allocscripi.c b/hw/xfree86/dummylib/xf86allocscripi.c
deleted file mode 100644
index d747bd54b..000000000
--- a/hw/xfree86/dummylib/xf86allocscripi.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-int
-xf86AllocateScrnInfoPrivateIndex()
-{
- return -1;
-}
-
diff --git a/hw/xfree86/dummylib/xf86drvmsg.c b/hw/xfree86/dummylib/xf86drvmsg.c
deleted file mode 100644
index f0644ecad..000000000
--- a/hw/xfree86/dummylib/xf86drvmsg.c
+++ /dev/null
@@ -1,24 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-void
-xf86DrvMsg(int i, MessageType type, const char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- LogVWrite(1, format, ap);
- va_end(ap);
-}
-
diff --git a/hw/xfree86/dummylib/xf86drvmsgverb.c b/hw/xfree86/dummylib/xf86drvmsgverb.c
deleted file mode 100644
index eb268852b..000000000
--- a/hw/xfree86/dummylib/xf86drvmsgverb.c
+++ /dev/null
@@ -1,24 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-void
-xf86DrvMsgVerb(int i, MessageType type, int verb, const char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- LogVWrite(verb, format, ap);
- va_end(ap);
-}
-
diff --git a/hw/xfree86/dummylib/xf86errorf.c b/hw/xfree86/dummylib/xf86errorf.c
deleted file mode 100644
index 026000454..000000000
--- a/hw/xfree86/dummylib/xf86errorf.c
+++ /dev/null
@@ -1,33 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-void
-xf86ErrorF(const char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- LogVWrite(1, format, ap);
- va_end(ap);
-}
-
-void
-ErrorF(const char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- LogVWrite(1, format, ap);
- va_end(ap);
-}
diff --git a/hw/xfree86/dummylib/xf86errorfverb.c b/hw/xfree86/dummylib/xf86errorfverb.c
deleted file mode 100644
index b8944559c..000000000
--- a/hw/xfree86/dummylib/xf86errorfverb.c
+++ /dev/null
@@ -1,24 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-void
-xf86ErrorFVerb(int verb, const char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- LogVWrite(verb, format, ap);
- va_end(ap);
-}
-
diff --git a/hw/xfree86/dummylib/xf86getverb.c b/hw/xfree86/dummylib/xf86getverb.c
deleted file mode 100644
index f3b2f1b35..000000000
--- a/hw/xfree86/dummylib/xf86getverb.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-int
-xf86GetVerbosity()
-{
- return xf86Verbose;
-}
-
diff --git a/hw/xfree86/dummylib/xf86info.c b/hw/xfree86/dummylib/xf86info.c
deleted file mode 100644
index 7db6817c3..000000000
--- a/hw/xfree86/dummylib/xf86info.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/* Dummy variables */
-xf86InfoRec xf86Info;
-
diff --git a/hw/xfree86/dummylib/xf86msg.c b/hw/xfree86/dummylib/xf86msg.c
deleted file mode 100644
index 8378d9074..000000000
--- a/hw/xfree86/dummylib/xf86msg.c
+++ /dev/null
@@ -1,24 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-void
-xf86Msg(MessageType type, const char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- LogVWrite(1, format, ap);
- va_end(ap);
-}
-
diff --git a/hw/xfree86/dummylib/xf86msgverb.c b/hw/xfree86/dummylib/xf86msgverb.c
deleted file mode 100644
index f3366eea3..000000000
--- a/hw/xfree86/dummylib/xf86msgverb.c
+++ /dev/null
@@ -1,24 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-void
-xf86MsgVerb(MessageType type, int verb, const char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- LogVWrite(verb, format, ap);
- va_end(ap);
-}
-
diff --git a/hw/xfree86/dummylib/xf86opt.c b/hw/xfree86/dummylib/xf86opt.c
deleted file mode 100644
index 44b0b496d..000000000
--- a/hw/xfree86/dummylib/xf86opt.c
+++ /dev/null
@@ -1,25 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-void
-xf86ProcessOptions(int i, pointer p, OptionInfoPtr o)
-{
-}
-
-Bool
-xf86GetOptValBool(const OptionInfoRec *o, int i, Bool *b)
-{
- return FALSE;
-}
-
diff --git a/hw/xfree86/dummylib/xf86screens.c b/hw/xfree86/dummylib/xf86screens.c
deleted file mode 100644
index 558553383..000000000
--- a/hw/xfree86/dummylib/xf86screens.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/* Dummy variables */
-ScrnInfoPtr *xf86Screens = NULL;
-
diff --git a/hw/xfree86/dummylib/xf86servisinit.c b/hw/xfree86/dummylib/xf86servisinit.c
deleted file mode 100644
index c356a2b88..000000000
--- a/hw/xfree86/dummylib/xf86servisinit.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-Bool
-xf86ServerIsInitialising()
-{
- return FALSE;
-}
-
diff --git a/hw/xfree86/dummylib/xf86verbose.c b/hw/xfree86/dummylib/xf86verbose.c
deleted file mode 100644
index c4a45d68e..000000000
--- a/hw/xfree86/dummylib/xf86verbose.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/* Dummy variables */
-int xf86Verbose = 0;
-
diff --git a/hw/xfree86/utils/cvt/Makefile.am b/hw/xfree86/utils/cvt/Makefile.am
index 4db175fbd..5db1d7cf9 100644
--- a/hw/xfree86/utils/cvt/Makefile.am
+++ b/hw/xfree86/utils/cvt/Makefile.am
@@ -31,12 +31,10 @@ bin_PROGRAMS = cvt
INCLUDES = $(XORG_INCS) \
-I$(top_srcdir)/hw/xfree86/ddc \
-I$(top_srcdir)/hw/xfree86/parser
-DUMMYLIB_SRCDIR = $(XFREE86_SRCDIR)/dummylib
# gah
cvt_SOURCES = cvt.c $(top_srcdir)/hw/xfree86/modes/xf86cvt.c
cvt_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
-cvt_LDADD = $(top_builddir)/hw/xfree86/dummylib/libdummy-nonserver.a
man1_MANS = cvt.man
diff --git a/hw/xfree86/utils/cvt/cvt.c b/hw/xfree86/utils/cvt/cvt.c
index fee4f7c3e..25a8e3220 100644
--- a/hw/xfree86/utils/cvt/cvt.c
+++ b/hw/xfree86/utils/cvt/cvt.c
@@ -25,6 +25,34 @@
#include "xf86.h"
+/* xnfalloc implementation used by the server code we built in */
+pointer
+XNFalloc(unsigned long n)
+{
+ pointer r;
+
+ r = malloc(n);
+ if (!r) {
+ perror("malloc failed");
+ exit(1);
+ }
+ return r;
+}
+
+/* xnfcalloc implementation used by the server code we built in */
+pointer
+XNFcalloc(unsigned long n)
+{
+ pointer r;
+
+ r = calloc(1, n);
+ if (!r) {
+ perror("calloc failed");
+ exit(1);
+ }
+ return r;
+}
+
/*
* Quickly check wether this is a CVT standard mode.
*/