xserver: Branch 'master' - 2 commits

Adam Jackson ajax at kemper.freedesktop.org
Mon Nov 6 22:27:12 UTC 2017


 configure.ac             |    2 -
 dix/Makefile.am          |    1 
 dix/ffs.c                |   49 -----------------------------------------------
 dix/meson.build          |    1 
 include/dix-config.h.in  |    3 --
 include/dix.h            |    5 ----
 include/meson.build      |    1 
 include/xorg-server.h.in |    3 --
 mi/mibitblt.c            |    4 ---
 os/WaitFor.c             |   18 -----------------
 os/osdep.h               |    7 ------
 11 files changed, 1 insertion(+), 93 deletions(-)

New commits:
commit 2e7f790b5770589ae2f97ee363ecd33fdb362c24
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Nov 6 15:25:34 2017 -0500

    dix: Remove ffs.c
    
    Your libc has ffs, I promise.
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/configure.ac b/configure.ac
index ec98f52c0..456a9e0a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,7 +154,7 @@ AC_CHECK_FUNC([dlopen], [],
 AC_SUBST(DLOPEN_LIBS)
 
 dnl Checks for library functions.
-AC_CHECK_FUNCS([backtrace ffs geteuid getuid issetugid getresuid \
+AC_CHECK_FUNCS([backtrace geteuid getuid issetugid getresuid \
 	getdtablesize getifaddrs getpeereid getpeerucred getprogname getzoneid \
 	mmap posix_fallocate seteuid shmctl64 strncasecmp vasprintf vsnprintf \
 	walkcontext setitimer poll epoll_create1])
diff --git a/dix/Makefile.am b/dix/Makefile.am
index a4171d7e1..b96da08f9 100644
--- a/dix/Makefile.am
+++ b/dix/Makefile.am
@@ -21,7 +21,6 @@ libdix_la_SOURCES = 	\
 	events.c	\
 	eventconvert.c  \
 	extension.c	\
-	ffs.c		\
 	gc.c		\
 	getevents.c	\
 	globals.c	\
diff --git a/dix/ffs.c b/dix/ffs.c
deleted file mode 100644
index f0400cbd1..000000000
--- a/dix/ffs.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-
-Copyright 1996, 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 MERCHANTABIL-
-ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT
-SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL-
-ITY, 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.
-
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef HAVE_FFS
-
-#include "dix.h"
-
-int
-ffs(int i)
-{
-    int j;
-
-    if (i == 0)
-        return 0;
-    for (j = 1; (i & 1) == 0; j++)
-        i >>= 1;
-    return j;
-}
-
-#endif
diff --git a/dix/meson.build b/dix/meson.build
index b3952a361..66bd84d9e 100644
--- a/dix/meson.build
+++ b/dix/meson.build
@@ -11,7 +11,6 @@ srcs_dix = [
     'events.c',
     'eventconvert.c',
     'extension.c',
-    'ffs.c',
     'gc.c',
     'getevents.c',
     'globals.c',
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index ad1ab20a6..8bce0e07b 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -86,9 +86,6 @@
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
-/* Define to 1 if you have the `ffs' function. */
-#undef HAVE_FFS
-
 /* Define to 1 if you have the `getdtablesize' function. */
 #undef HAVE_GETDTABLESIZE
 
diff --git a/include/dix.h b/include/dix.h
index 240018b8d..476559842 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -557,11 +557,6 @@ extern _X_EXPORT void
 ScreenRestructured(ScreenPtr pScreen);
 #endif
 
-#ifndef HAVE_FFS
-extern _X_EXPORT int
-ffs(int i);
-#endif
-
 /*
  *  ServerGrabCallback stuff
  */
diff --git a/include/meson.build b/include/meson.build
index ce933ca43..471014610 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -113,7 +113,6 @@ conf_data.set('HAVE_ARC4RANDOM_BUF', cc.has_function('arc4random_buf', dependenc
 conf_data.set('HAVE_BACKTRACE', cc.has_function('backtrace'))
 conf_data.set('HAVE_CBRT', cc.has_function('cbrt'))
 conf_data.set('HAVE_EPOLL_CREATE1', cc.has_function('epoll_create1'))
-conf_data.set('HAVE_FFS', cc.has_function('ffs'))
 conf_data.set('HAVE_GETUID', cc.has_function('getuid'))
 conf_data.set('HAVE_GETEUID', cc.has_function('geteuid'))
 conf_data.set('HAVE_ISSETUGID', cc.has_function('issetugid'))
diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
index 570893e34..aae2faed6 100644
--- a/include/xorg-server.h.in
+++ b/include/xorg-server.h.in
@@ -44,9 +44,6 @@
 /* Support SHM */
 #undef HAS_SHM
 
-/* Define to 1 if you have the `ffs' function. */
-#undef HAVE_FFS
-
 /* Define to 1 if you have the `reallocarray' function. */
 #undef HAVE_REALLOCARRAY
 
diff --git a/mi/mibitblt.c b/mi/mibitblt.c
index 28296a449..2de5bf8fd 100644
--- a/mi/mibitblt.c
+++ b/mi/mibitblt.c
@@ -62,10 +62,6 @@ SOFTWARE.
 #include <X11/Xmd.h>
 #include "servermd.h"
 
-#ifndef HAVE_FFS
-extern int ffs(int);
-#endif
-
 /* MICOPYAREA -- public entry for the CopyArea request
  * For each rectangle in the source region
  *     get the pixels with GetSpans
commit 4d15a2645f00995618d8687edf1fb0f4b2316ace
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Nov 6 15:25:33 2017 -0500

    os: Remove mffs()
    
    This was always wide enough to work on an fd_mask ("mask" ffs
    presumably). We don't operate on fd_masks anymore, so this can go.
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/os/WaitFor.c b/os/WaitFor.c
index 613608faf..fa6a99b18 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -90,24 +90,6 @@ SOFTWARE.
 #define GetErrno() errno
 #endif
 
-/* like ffs, but uses fd_mask instead of int as argument, so it works
-   when fd_mask is longer than an int, such as common 64-bit platforms */
-/* modifications by raphael */
-int
-mffs(fd_mask mask)
-{
-    int i;
-
-    if (!mask)
-        return 0;
-    i = 1;
-    while (!(mask & 1)) {
-        i++;
-        mask >>= 1;
-    }
-    return i;
-}
-
 #ifdef DPMSExtension
 #include <X11/extensions/dpmsconst.h>
 #endif
diff --git a/os/osdep.h b/os/osdep.h
index 3ab81958c..67958fd77 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -148,13 +148,6 @@ extern Bool NewOutputPending;
 
 extern WorkQueuePtr workQueue;
 
-/* in WaitFor.c */
-#if defined(WIN32) && !defined(__CYGWIN__)
-typedef long int fd_mask;
-#endif
-#define ffs mffs
-extern int mffs(fd_mask);
-
 /* in access.c */
 extern Bool ComputeLocalClient(ClientPtr client);
 


More information about the xorg-commit mailing list