summaryrefslogtreecommitdiff
path: root/hw/xfree86/utils
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 /hw/xfree86/utils
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.
Diffstat (limited to 'hw/xfree86/utils')
-rw-r--r--hw/xfree86/utils/cvt/Makefile.am2
-rw-r--r--hw/xfree86/utils/cvt/cvt.c28
2 files changed, 28 insertions, 2 deletions
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.
*/