xserver: Branch 'master' - 4 commits
Adam Jackson
ajax at kemper.freedesktop.org
Fri May 11 09:07:58 PDT 2007
configure.ac | 1
hw/xfree86/dixmods/Makefile.am | 3 --
hw/xfree86/dixmods/afbmodule.c | 1
hw/xfree86/dixmods/cfb32module.c | 3 --
hw/xfree86/dixmods/cfbmodule.c | 3 --
hw/xfree86/xaa/xaaWideLine.c | 4 ---
include/dix-config.h.in | 3 ++
mi/Makefile.am | 3 --
mi/cbrt.c | 46 ---------------------------------------
mi/miarc.c | 44 +++++++++----------------------------
mi/mifpoly.h | 13 ++---------
mi/mifpolycon.c | 4 ---
mi/miregion.c | 11 ++-------
mi/miwideline.c | 4 ---
14 files changed, 21 insertions(+), 122 deletions(-)
New commits:
diff-tree a277f04ab08514462b7f10b4dd92eb326af85501 (from 20c5250e487e032d392e2e4624021fccb1bfb72c)
Author: Adam Jackson <ajax at benzedrine.nwnk.net>
Date: Wed May 9 22:03:12 2007 -0400
Remove mfb and cfb from include paths where they're not needed.
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index 1581019..06e6d40 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -45,9 +45,6 @@ fontsmodule_LTLIBRARIES = libfreetype.la
AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
INCLUDES = @XORG_INCS@ \
- -I$(top_srcdir)/afb \
- -I$(top_srcdir)/cfb \
- -I$(top_srcdir)/mfb \
-I$(top_srcdir)/dbe \
-I$(top_srcdir)/hw/xfree86/loader \
-I$(top_srcdir)/miext/shadow \
diff --git a/hw/xfree86/dixmods/afbmodule.c b/hw/xfree86/dixmods/afbmodule.c
index ee8cf20..b0aea6d 100644
--- a/hw/xfree86/dixmods/afbmodule.c
+++ b/hw/xfree86/dixmods/afbmodule.c
@@ -29,7 +29,6 @@
#endif
#include "xf86Module.h"
-#include "afb.h"
static MODULESETUPPROTO(afbSetup);
diff --git a/hw/xfree86/dixmods/cfb32module.c b/hw/xfree86/dixmods/cfb32module.c
index 1451594..23708e4 100644
--- a/hw/xfree86/dixmods/cfb32module.c
+++ b/hw/xfree86/dixmods/cfb32module.c
@@ -28,10 +28,7 @@
#include <xorg-config.h>
#endif
-#define PSZ 32
-
#include "xf86Module.h"
-#include "cfb.h"
static MODULESETUPPROTO(cfb32Setup);
diff --git a/hw/xfree86/dixmods/cfbmodule.c b/hw/xfree86/dixmods/cfbmodule.c
index 693fd61..07074c1 100644
--- a/hw/xfree86/dixmods/cfbmodule.c
+++ b/hw/xfree86/dixmods/cfbmodule.c
@@ -28,10 +28,7 @@
#include <xorg-config.h>
#endif
-#define PSZ 8
-
#include "xf86Module.h"
-#include "cfb.h"
static MODULESETUPPROTO(cfbSetup);
diff --git a/mi/Makefile.am b/mi/Makefile.am
index 06ce15a..7d76929 100644
--- a/mi/Makefile.am
+++ b/mi/Makefile.am
@@ -67,5 +67,3 @@ libmi_la_SOURCES = \
mizerarc.h \
mizerclip.c \
mizerline.c
-
-INCLUDES = -I$(top_srcdir)/mfb
diff-tree 20c5250e487e032d392e2e4624021fccb1bfb72c (from 8dcc37520d5e8c8b52cee81faa67fd5205548377)
Author: Adam Jackson <ajax at benzedrine.nwnk.net>
Date: Wed May 9 21:49:44 2007 -0400
Use system copy of cbrt() if available.
Also move the replacement inline into miarc.c, since that's the only user.
diff --git a/configure.ac b/configure.ac
index c8b40a1..ffb1b85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -182,6 +182,7 @@ AC_CHECK_FUNC([mmap], AC_DEFINE(HAS_MMAP
dnl Find the math libary
AC_CHECK_LIB(m, sqrt)
+AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT, 1, [Have the 'cbrt' function]))
AC_CHECK_HEADERS([ndbm.h dbm.h rpcsvc/dbm.h])
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 62e109b..919da60 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -102,6 +102,9 @@
/* Define to 1 if you have the <byteswap.h> header file. */
#undef HAVE_BYTESWAP_H
+/* Define to 1 if you have cbrt */
+#undef HAVE_CBRT
+
/* Define to 1 if you have the <dbm.h> header file. */
#undef HAVE_DBM_H
diff --git a/mi/Makefile.am b/mi/Makefile.am
index f262f4b..06ce15a 100644
--- a/mi/Makefile.am
+++ b/mi/Makefile.am
@@ -9,7 +9,6 @@ endif
AM_CFLAGS = $(DIX_CFLAGS)
libmi_la_SOURCES = \
- cbrt.c \
mi.h \
miarc.c \
mibank.c \
diff --git a/mi/cbrt.c b/mi/cbrt.c
deleted file mode 100644
index c703fd9..0000000
--- a/mi/cbrt.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-
-Copyright 1990, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/* simple cbrt, in case your math library doesn't have a good one */
-
-/*
- * Would normally include <math.h> for this, but for the sake of compiler
- * warnings, we don't want to get duplicate declarations for cbrt().
- */
-
-double pow(double, double);
-double cbrt(double);
-
-double
-cbrt(double x)
-{
- if (x > 0.0)
- return pow(x, 1.0/3.0);
- else
- return -pow(-x, 1.0/3.0);
-}
diff --git a/mi/miarc.c b/mi/miarc.c
index 69c5acd..3b77ce7 100644
--- a/mi/miarc.c
+++ b/mi/miarc.c
@@ -51,14 +51,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#if defined(_XOPEN_SOURCE) || defined(__QNXNTO__) \
- || (defined(sun) && defined(__SVR4))
#include <math.h>
-#else
-#define _XOPEN_SOURCE /* to get prototype for hypot on some systems */
-#include <math.h>
-#undef _XOPEN_SOURCE
-#endif
#include <X11/X.h>
#include <X11/Xprotostr.h>
#include "misc.h"
@@ -75,7 +68,17 @@ static double miDsin(double a);
static double miDcos(double a);
static double miDasin(double v);
static double miDatan2(double dy, double dx);
-double cbrt(double);
+
+#ifndef HAVE_CBRT
+static double
+cbrt(double x)
+{
+ if (x > 0.0)
+ return pow(x, 1.0/3.0);
+ else
+ return -pow(-x, 1.0/3.0);
+}
+#endif
/*
* some interesting sematic interpretation of the protocol:
diff-tree 8dcc37520d5e8c8b52cee81faa67fd5205548377 (from 6ff239cb4e67c0a2ea497a1714e5585c1d941af3)
Author: Adam Jackson <ajax at benzedrine.nwnk.net>
Date: Wed May 9 18:57:05 2007 -0400
Use _X_INLINE instead of ad-hoc #defines.
diff --git a/mi/miarc.c b/mi/miarc.c
index 17b7891..69c5acd 100644
--- a/mi/miarc.c
+++ b/mi/miarc.c
@@ -100,37 +100,16 @@ double cbrt(double);
#undef max
#undef min
-#if defined (__GNUC__) && !defined (__STRICT_ANSI__)
-#define USE_INLINE
-#endif
-
-#ifdef USE_INLINE
-inline static int max (const int x, const int y)
+_X_INLINE static int max (const int x, const int y)
{
return x>y? x:y;
}
-inline static int min (const int x, const int y)
+_X_INLINE static int min (const int x, const int y)
{
return x<y? x:y;
}
-#else
-
-static int
-max (int x, int y)
-{
- return x>y? x:y;
-}
-
-static int
-min (int x, int y)
-{
- return x<y? x:y;
-}
-
-#endif
-
struct bound {
double min, max;
};
diff --git a/mi/miregion.c b/mi/miregion.c
index e980ad1..0eab662 100644
--- a/mi/miregion.c
+++ b/mi/miregion.c
@@ -81,16 +81,11 @@ Equipment Corporation.
#include "regionstr.h"
#include <X11/Xprotostr.h>
+#include <X11/Xfuncproto.h>
#include "gc.h"
#include "mi.h"
#include "mispans.h"
-#if defined (__GNUC__) && !defined (NO_INLINES)
-#define INLINE __inline
-#else
-#define INLINE
-#endif
-
#undef assert
#ifdef DEBUG
#define assert(expr) {if (!(expr)) \
@@ -506,7 +501,7 @@ miRegionCopy(dst, src)
*
*-----------------------------------------------------------------------
*/
-INLINE static int
+_X_INLINE static int
miCoalesce (
RegionPtr pReg, /* Region to coalesce */
int prevStart, /* Index of start of previous band */
@@ -590,7 +585,7 @@ miCoalesce (
*-----------------------------------------------------------------------
*/
-INLINE static Bool
+_X_INLINE static Bool
miAppendNonO (
RegionPtr pReg,
BoxPtr r,
diff-tree 6ff239cb4e67c0a2ea497a1714e5585c1d941af3 (from 178d426311bb3c7160f72b5d95b0a137eda09ba9)
Author: Adam Jackson <ajax at benzedrine.nwnk.net>
Date: Wed May 9 18:38:33 2007 -0400
Make the use of ICEIL slightly less ugly.
diff --git a/hw/xfree86/xaa/xaaWideLine.c b/hw/xfree86/xaa/xaaWideLine.c
index 9479b0d..a684d66 100644
--- a/hw/xfree86/xaa/xaaWideLine.c
+++ b/hw/xfree86/xaa/xaaWideLine.c
@@ -32,10 +32,6 @@ Original mi code written by Keith Packar
#include "xaa.h"
#include "xaalocal.h"
-#ifdef ICEILTEMPDECL
-ICEILTEMPDECL
-#endif
-
#define DRAW_POINT(pScrn, x, y) \
if(hardClip) (*infoRec->SubsequentSolidFillRect)(pScrn, x, y, 1, 1); \
else XAAPointHelper(pScrn, x, y)
diff --git a/mi/miarc.c b/mi/miarc.c
index 2bbbb0e..17b7891 100644
--- a/mi/miarc.c
+++ b/mi/miarc.c
@@ -77,10 +77,6 @@ static double miDasin(double v);
static double miDatan2(double dy, double dx);
double cbrt(double);
-#ifdef ICEILTEMPDECL
-ICEILTEMPDECL
-#endif
-
/*
* some interesting sematic interpretation of the protocol:
*
diff --git a/mi/mifpoly.h b/mi/mifpoly.h
index 8f05076..7bd77b3 100644
--- a/mi/mifpoly.h
+++ b/mi/mifpoly.h
@@ -48,6 +48,8 @@ SOFTWARE.
#ifndef __MIFPOLY_H__
#define __MIFPOLY_H__
+#include <X11/Xfuncproto.h>
+
#define EPSILON 0.000001
#define ISEQUAL(a,b) (Fabs((a) - (b)) <= EPSILON)
#define UNEQUAL(a,b) (Fabs((a) - (b)) > EPSILON)
@@ -66,20 +68,11 @@ SOFTWARE.
#define SQSECANT 108.856472512142 /* 1/sin^2(11/2) - for 11o miter cutoff */
#define D2SECANT 5.21671526231167 /* 1/2*sin(11/2) - max extension per width */
-#ifdef NOINLINEICEIL
-#define ICEIL(x) ((int)ceil(x))
-#else
-#ifdef __GNUC__
-static __inline int ICEIL(double x)
+static _X_INLINE int ICEIL(double x)
{
int _cTmp = x;
return ((x == _cTmp) || (x < 0.0)) ? _cTmp : _cTmp+1;
}
-#else
-#define ICEIL(x) ((((x) == (_cTmp = (x))) || ((x) < 0.0)) ? _cTmp : _cTmp+1)
-#define ICEILTEMPDECL static int _cTmp;
-#endif
-#endif
/* Point with sub-pixel positioning. In this case we use doubles, but
* see mifpolycon.c for other suggestions
diff --git a/mi/mifpolycon.c b/mi/mifpolycon.c
index 7bc1bb2..f851971 100644
--- a/mi/mifpolycon.c
+++ b/mi/mifpolycon.c
@@ -58,10 +58,6 @@ SOFTWARE.
static int GetFPolyYBounds(SppPointPtr pts, int n, double yFtrans,
int *by, int *ty);
-#ifdef ICEILTEMPDECL
-ICEILTEMPDECL
-#endif
-
/*
* Written by Todd Newman; April. 1987.
*
diff --git a/mi/miwideline.c b/mi/miwideline.c
index 08e4aa3..8c6022f 100644
--- a/mi/miwideline.c
+++ b/mi/miwideline.c
@@ -52,10 +52,6 @@ from The Open Group.
#include "miwideline.h"
#include "mi.h"
-#ifdef ICEILTEMPDECL
-ICEILTEMPDECL
-#endif
-
static void miLineArc(DrawablePtr pDraw, GCPtr pGC,
unsigned long pixel, SpanDataPtr spanData,
LineFacePtr leftFace,
More information about the xorg-commit
mailing list