[Mesa-dev] [RFC PATCH 2/4] mesa: Unifdef _WIN32_WCE.

Jose Fonseca jfonseca at vmware.com
Mon Sep 22 11:56:23 PDT 2014


I don't think we (at VMware) care for WinCE support anymore.

Series looks good to me.

Jose

________________________________________
From: Matt Turner <mattst88 at gmail.com>
Sent: 22 September 2014 19:22
To: mesa-dev at lists.freedesktop.org
Cc: Jose Fonseca; Matt Turner
Subject: [RFC PATCH 2/4] mesa: Unifdef _WIN32_WCE.

---
José: if you guys don't care about WinCE anymore, this will
      let us drop two wrapper functions (bsearch, getenv).

 src/gallium/auxiliary/util/u_snprintf.c     |  9 ---------
 src/gallium/state_trackers/egl/x11/glcore.h |  2 --
 src/mapi/glapi/gen/gl_gentable.py           |  2 +-
 src/mapi/glapi/glapi_nop.c                  |  4 +---
 src/mesa/main/compiler.h                    |  2 --
 src/mesa/main/errors.c                      |  2 +-
 src/mesa/main/imports.c                     | 21 ---------------------
 7 files changed, 3 insertions(+), 39 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_snprintf.c b/src/gallium/auxiliary/util/u_snprintf.c
index a24b6ff..7a2bf2a 100644
--- a/src/gallium/auxiliary/util/u_snprintf.c
+++ b/src/gallium/auxiliary/util/u_snprintf.c
@@ -334,15 +334,6 @@ static void *mymemcpy(void *, void *, size_t);
 #endif /* HAVE_UINTPTR_T || defined(uintptr_t) */
 #endif /* !defined(UINTPTR_T) */

-/* WinCE5.0 does not have uintptr_t defined */
-#if (_WIN32_WCE < 600)
-#ifdef UINTPTR_T
-#undef UINTPTR_T
-#endif
-#define UINTPTR_T unsigned long int
-#endif
-
-
 /* Support for ptrdiff_t. */
 #ifndef PTRDIFF_T
 #if HAVE_PTRDIFF_T || defined(ptrdiff_t)
diff --git a/src/gallium/state_trackers/egl/x11/glcore.h b/src/gallium/state_trackers/egl/x11/glcore.h
index 547b111..99de6c0 100644
--- a/src/gallium/state_trackers/egl/x11/glcore.h
+++ b/src/gallium/state_trackers/egl/x11/glcore.h
@@ -31,9 +31,7 @@
  * Silicon Graphics, Inc.
  */

-#if !defined(_WIN32_WCE)
 #include <sys/types.h>
-#endif

 #define GL_CORE_SGI  1
 #define GL_CORE_MESA 2
diff --git a/src/mapi/glapi/gen/gl_gentable.py b/src/mapi/glapi/gen/gl_gentable.py
index ce9af99..deffcee 100644
--- a/src/mapi/glapi/gen/gl_gentable.py
+++ b/src/mapi/glapi/gen/gl_gentable.py
@@ -42,7 +42,7 @@ header = """/* GLXEXT is the define used in the xserver when the GLX extension i
 #endif

 #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
-       || (!defined(GLXEXT) && defined(DEBUG) && !defined(_WIN32_WCE) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
+       || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
 #define USE_BACKTRACE
 #endif

diff --git a/src/mapi/glapi/glapi_nop.c b/src/mapi/glapi/glapi_nop.c
index 2597c8c..628276e 100644
--- a/src/mapi/glapi/glapi_nop.c
+++ b/src/mapi/glapi/glapi_nop.c
@@ -63,7 +63,7 @@ _glapi_set_warning_func(_glapi_proc func)
 static int
 Warn(const char *func)
 {
-#if defined(DEBUG) && !defined(_WIN32_WCE)
+#if defined(DEBUG)
    if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) {
       fprintf(stderr, "GL User Error: gl%s called without a rendering context\n",
               func);
@@ -103,11 +103,9 @@ NoOpUnused(void)
 static int
 NoOpGeneric(void)
 {
-#if !defined(_WIN32_WCE)
    if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) {
       fprintf(stderr, "GL User Error: calling GL function without a rendering context\n");
    }
-#endif
    return 0;
 }

diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
index 813bf19..185c911 100644
--- a/src/mesa/main/compiler.h
+++ b/src/mesa/main/compiler.h
@@ -214,13 +214,11 @@ static inline GLuint CPU_TO_LE32(GLuint x)
 /**
  * ASSERT macro
  */
-#if !defined(_WIN32_WCE)
 #if defined(DEBUG)
 #  define ASSERT(X)   assert(X)
 #else
 #  define ASSERT(X)
 #endif
-#endif


 /*
diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
index 9cde1e0..995fc82 100644
--- a/src/mesa/main/errors.c
+++ b/src/mesa/main/errors.c
@@ -1194,7 +1194,7 @@ output_if_debug(const char *prefixString, const char *outputString,
          fprintf(fout, "\n");
       fflush(fout);

-#if defined(_WIN32) && !defined(_WIN32_WCE)
+#if defined(_WIN32)
       /* stderr from windows applications without console is not usually
        * visible, so communicate with the debugger instead */
       {
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index b18603c..75db685 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -499,24 +499,7 @@ void *
 _mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size,
                int (*compar)(const void *, const void *) )
 {
-#if defined(_WIN32_WCE)
-   void *mid;
-   int cmp;
-   while (nmemb) {
-      nmemb >>= 1;
-      mid = (char *)base + nmemb * size;
-      cmp = (*compar)(key, mid);
-      if (cmp == 0)
-        return mid;
-      if (cmp > 0) {
-        base = (char *)mid + size;
-        --nmemb;
-      }
-   }
-   return NULL;
-#else
    return bsearch(key, base, nmemb, size, compar);
-#endif
 }

 /*@}*/
@@ -532,11 +515,7 @@ _mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size,
 char *
 _mesa_getenv( const char *var )
 {
-#if defined(_WIN32_WCE)
-   return NULL;
-#else
    return getenv(var);
-#endif
 }

 /*@}*/
--
1.8.5.5



More information about the mesa-dev mailing list