]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
build: drop Windows CE / CeGCC support
authorViktor Szakats <commit@vsz.me>
Mon, 14 Jul 2025 22:36:08 +0000 (00:36 +0200)
committerViktor Szakats <commit@vsz.me>
Sat, 15 Nov 2025 14:35:23 +0000 (15:35 +0100)
Windows CE support was limited to successful builds with ming32ce
(a toolchain that hasn't seen an update since 2009, using an ancient gcc
version and "old mingw"-style SDK headers, that curl deprecated earlier).
Builds with MSVC were broken for a long time. mingw32ce builds were never
actually tested and runtime and unlikely to work due to missing stubs.
Windows CE toolchains also miss to comply with C89. Paired with lack of
demand and support for the platform, curl deprecated it earlier.

This patch removes support from the codebase to ease maintaining Windows
codepaths.

Follow-up to f98c0ba834d4b4da480373b732a86976f9064ccd #17924
Follow-up to 8491e6574cde770b227ca0e1cd66548291f49661 #17379
Follow-up to 2a292c39846107228201674d686be5b3ed96674d #15975

Closes #17927

81 files changed:
CMake/CurlSymbolHiding.cmake
CMake/win32-cache.cmake
CMakeLists.txt
acinclude.m4
configure.ac
docs/DEPRECATE.md
docs/INSTALL.md
docs/examples/anyauthput.c
docs/examples/block_ip.c
docs/examples/externalsocket.c
docs/examples/fileupload.c
docs/examples/ftpupload.c
docs/examples/ftpuploadresume.c
docs/examples/http2-download.c
docs/examples/http2-upload.c
docs/examples/httpput.c
docs/examples/log_failed_transfers.c
docs/examples/sftpuploadresume.c
include/curl/system.h
lib/asyn-thrdd.c
lib/cf-socket.c
lib/config-win32.h
lib/connect.c
lib/curl_fopen.c
lib/curl_setup.h
lib/curl_setup_once.h
lib/curl_sspi.c
lib/curl_sspi.h
lib/curl_threads.c
lib/curlx/fopen.c
lib/curlx/fopen.h
lib/curlx/inet_ntop.c
lib/curlx/inet_pton.c
lib/curlx/strerr.c
lib/curlx/version_win32.c
lib/curlx/winapi.c
lib/easy.c
lib/file.c
lib/ftp.c
lib/getenv.c
lib/hostip.c
lib/md4.c
lib/md5.c
lib/memdebug.c
lib/rename.c
lib/sha256.c
lib/strerror.c
lib/system_win32.c
lib/transfer.c
lib/vtls/schannel.c
lib/vtls/schannel_verify.c
lib/vtls/vtls_scache.c
m4/xc-lt-iface.m4
src/CMakeLists.txt
src/terminal.c
src/tool_cb_hdr.c
src/tool_cb_rea.c
src/tool_cb_see.c
src/tool_cb_wrt.c
src/tool_cfgable.c
src/tool_cfgable.h
src/tool_dirhie.c
src/tool_doswin.c
src/tool_doswin.h
src/tool_formparse.c
src/tool_getparam.h
src/tool_getpass.c
src/tool_main.c
src/tool_operate.c
src/tool_parsecfg.c
src/tool_setup.h
src/tool_util.c
src/tool_util.h
tests/libtest/lib505.c
tests/libtest/lib525.c
tests/libtest/lib541.c
tests/libtest/lib556.c
tests/libtest/lib582.c
tests/server/first.h
tests/server/sockfilt.c
tests/server/util.c

index 217c8832c9abb0611922f942e000a43190c5682f..2576a1aff36f919ed1e37ce29d43eecbc95b2266 100644 (file)
@@ -29,7 +29,7 @@ if(WIN32 AND (ENABLE_DEBUG OR ENABLE_CURLDEBUG))
   # e.g. curl_easy_perform_ev() or curl_dbg_*(),
   # so disable symbol hiding for debug builds and for memory tracking.
   set(CURL_HIDDEN_SYMBOLS OFF)
-elseif(DOS OR AMIGA OR MINGW32CE)
+elseif(DOS OR AMIGA)
   set(CURL_HIDDEN_SYMBOLS OFF)
 endif()
 
index 8cb9b58b3937075243cf556e93b51d627e934583..50c319d1b66b75a29af6175eca5a9aca1b5a48f6 100644 (file)
@@ -193,7 +193,7 @@ if(MINGW OR MSVC)
   curl_prefill_type_size("CURL_OFF_T" 8)
   curl_prefill_type_size("CURL_SOCKET_T" ${CMAKE_SIZEOF_VOID_P})
   curl_prefill_type_size("SIZE_T" ${CMAKE_SIZEOF_VOID_P})
-  # TIME_T: 8 for _WIN64 or UCRT or MSVC and not Windows CE, 4 otherwise
+  # TIME_T: 8 for _WIN64 or UCRT or MSVC, 4 otherwise
   #   Also 4 for non-UCRT 32-bit when _USE_32BIT_TIME_T is set.
   #   mingw-w64 sets _USE_32BIT_TIME_T unless __MINGW_USE_VC2005_COMPAT is explicit defined.
   if(MSVC)
@@ -206,25 +206,3 @@ if(MINGW OR MSVC)
     curl_prefill_type_size("OFF_T" 8)  # mingw-w64 v3+
   endif()
 endif()
-
-# Windows CE exceptions
-
-if(WINCE)
-  set(HAVE_FREEADDRINFO 0)
-  set(HAVE_GETADDRINFO 0)
-  set(HAVE_LOCALE_H 0)
-  set(HAVE_SETLOCALE 0)
-  set(HAVE_SETMODE 0)
-  set(HAVE_SIGNAL 0)
-  set(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 0)
-  curl_prefill_type_size("CURL_SOCKET_T" 4)
-  curl_prefill_type_size("TIME_T" 4)
-  curl_prefill_type_size("SIZE_T" 4)
-  if(MINGW32CE)
-    set(HAVE_STRTOK_R 0)
-    set(HAVE__SETMODE 0)
-    set(HAVE_FILE_OFFSET_BITS 0)
-    curl_prefill_type_size("SSIZE_T" 4)
-    curl_prefill_type_size("OFF_T" 4)
-  endif()
-endif()
index 8113cdea90dcd066feedc23b966517b559092329..0b9b666adb511e389cefc84abafb9bbe8067b477 100644 (file)
@@ -71,37 +71,6 @@ if(WINDOWS_STORE AND MINGW)  # mingw UWP build
   # CMake (as of v3.31.2) gets confused and applies the MSVC rc.exe command-line
   # template to windres. Reset it to the windres template via 'Modules/Platform/Windows-windres.cmake':
   set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <FLAGS> <SOURCE> <OBJECT>")
-elseif(WIN32 AND WINCE AND CMAKE_C_COMPILER_ID STREQUAL "GNU")  # mingw32ce build
-  if(NOT MINGW32CE_LIBRARY_DIR)
-    message(FATAL_ERROR "Set MINGW32CE_LIBRARY_DIR variable to the mingw32ce platform library directory.")
-  endif()
-
-  set(MINGW 1)
-  set(MINGW32CE 1)
-
-  # Build implib with libcurl DLL. Copied from CMake's 'Modules/Platform/Windows-GNU.cmake'.
-  set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS>")
-  string(APPEND CMAKE_C_CREATE_SHARED_LIBRARY " <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB>")
-  string(APPEND CMAKE_C_CREATE_SHARED_LIBRARY " ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
-
-  # Build resources. Copied from CMake's 'Modules/Platform/Windows-windres.cmake'.
-  set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <FLAGS> <SOURCE> <OBJECT>")
-  enable_language(RC)
-
-  # To compile long long integer literals
-  set_property(DIRECTORY APPEND PROPERTY COMPILE_OPTIONS "-std=gnu99")
-  string(APPEND CMAKE_REQUIRED_FLAGS " -std=gnu99")
-
-  set(CMAKE_C_COMPILE_OPTIONS_PIC "")  # CMake sets it to '-fPIC', confusing the toolchain and breaking builds. Zap it.
-
-  set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
-  set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
-  set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
-  set(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")
-  set(CMAKE_IMPORT_LIBRARY_PREFIX "lib")
-  set(CMAKE_IMPORT_LIBRARY_SUFFIX ".dll.a")
-  set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
-  set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a" ".lib")
 elseif(DOS AND CMAKE_C_COMPILER_ID STREQUAL "GNU")  # DJGPP
   set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
   set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
@@ -130,9 +99,6 @@ endif()
 if(WIN32)
   string(APPEND _target_flags " WIN32")
 endif()
-if(WINCE)
-  string(APPEND _target_flags " WINCE")
-endif()
 if(WINDOWS_STORE)
   string(APPEND _target_flags " UWP")
 endif()
@@ -213,12 +179,12 @@ option(CURL_DISABLE_INSTALL "Disable installation targets" OFF)
 
 if(WIN32)
   option(ENABLE_UNICODE "Use the Unicode version of the Windows API functions" OFF)
-  if(WINDOWS_STORE OR WINCE)
+  if(WINDOWS_STORE)
     set(ENABLE_UNICODE ON)
   endif()
   if(ENABLE_UNICODE)
     set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "UNICODE" "_UNICODE")
-    if(MINGW AND NOT MINGW32CE)
+    if(MINGW)
       set_property(DIRECTORY APPEND PROPERTY COMPILE_OPTIONS "-municode")
     endif()
   endif()
@@ -538,7 +504,7 @@ if(HTTP_ONLY)
   set(CURL_DISABLE_TFTP ON)
 endif()
 
-if(WINDOWS_STORE OR WINCE)
+if(WINDOWS_STORE)
   set(CURL_DISABLE_TELNET ON)  # telnet code needs fixing to compile for UWP.
 endif()
 
@@ -624,21 +590,7 @@ if(ENABLE_THREADED_RESOLVER)
 endif()
 
 # Check for all needed libraries
-if(WIN32)
-  if(WINCE)
-    set(_win32_winsock "ws2")
-  else()
-    set(_win32_winsock "ws2_32")
-  endif()
-  set(_win32_crypt32 "crypt32")
-  set(_win32_secur32 "secur32")
-
-  if(MINGW32CE)  # FIXME upstream: must specify the full path to avoid CMake converting "ws2" to "ws2.lib"
-    set(_win32_winsock "${MINGW32CE_LIBRARY_DIR}/lib${_win32_winsock}.a")
-    set(_win32_crypt32 "${MINGW32CE_LIBRARY_DIR}/lib${_win32_crypt32}.a")
-    set(_win32_secur32 "${MINGW32CE_LIBRARY_DIR}/lib${_win32_secur32}.a")
-  endif()
-elseif(DOS)
+if(DOS)
   if(WATT_ROOT)
     set(USE_WATT32 ON)
     # FIXME upstream: must specify the full path to avoid CMake converting "watt" to "watt.lib"
@@ -659,7 +611,7 @@ elseif(AMIGA)
     set(CURL_USE_OPENSSL ON)
     set(CURL_CA_FALLBACK ON CACHE BOOL "")
   endif()
-elseif(NOT APPLE)
+elseif(NOT WIN32 AND NOT APPLE)
   check_library_exists("socket" "connect" "" HAVE_LIBSOCKET)
   if(HAVE_LIBSOCKET)
     set(CURL_NETWORK_AND_TIME_LIBS "socket" ${CURL_NETWORK_AND_TIME_LIBS})
@@ -694,7 +646,7 @@ if(ENABLE_IPV6)
     endif()
   endif()
 endif()
-if(ENABLE_IPV6 AND NOT WINCE)
+if(ENABLE_IPV6)
   set(USE_IPV6 ON)
 endif()
 
@@ -1035,7 +987,7 @@ macro(curl_openssl_check_exists)
     if(HAVE_LIBZ)
       list(APPEND CMAKE_REQUIRED_LIBRARIES ZLIB::ZLIB)
     endif()
-    if(WIN32 AND NOT WINCE)
+    if(WIN32)
       list(APPEND CMAKE_REQUIRED_LIBRARIES "bcrypt")  # for OpenSSL/LibreSSL
     endif()
   endif()
@@ -1049,7 +1001,7 @@ macro(curl_openssl_check_exists)
     list(APPEND CMAKE_REQUIRED_DEFINITIONS "-DHAVE_UINTPTR_T")  # to pull in stdint.h (as of wolfSSL v5.5.4)
   endif()
   if(WIN32)
-    list(APPEND CMAKE_REQUIRED_LIBRARIES "${_win32_winsock}" "${_win32_crypt32}")  # for OpenSSL/wolfSSL
+    list(APPEND CMAKE_REQUIRED_LIBRARIES "ws2_32" "crypt32")  # for OpenSSL/wolfSSL
   endif()
   if(${ARGC} EQUAL 2)
     check_function_exists(${ARGN})
@@ -1262,7 +1214,7 @@ if(NOT CURL_DISABLE_SRP AND (HAVE_GNUTLS_SRP OR HAVE_OPENSSL_SRP))
 endif()
 
 if(NOT CURL_DISABLE_LDAP)
-  if(WIN32 AND NOT WINDOWS_STORE AND NOT WINCE)
+  if(WIN32 AND NOT WINDOWS_STORE)
     option(USE_WIN32_LDAP "Use Windows LDAP implementation" ON)
     if(USE_WIN32_LDAP)
       list(APPEND CURL_LIBS "wldap32")
@@ -1501,7 +1453,7 @@ if(USE_LIBRTMP)
 endif()
 
 option(ENABLE_UNIX_SOCKETS "Enable Unix domain sockets support" ON)
-if(ENABLE_UNIX_SOCKETS AND NOT WINCE)
+if(ENABLE_UNIX_SOCKETS)
   if(WIN32 OR DOS)
     set(USE_UNIX_SOCKETS 1)
   else()
@@ -1618,7 +1570,7 @@ if(WIN32)
   list(APPEND CURL_INCLUDES "winsock2.h")
   list(APPEND CURL_INCLUDES "ws2tcpip.h")
 
-  if(HAVE_WIN32_WINNT AND HAVE_WIN32_WINNT LESS 0x0501 AND NOT WINCE)
+  if(HAVE_WIN32_WINNT AND HAVE_WIN32_WINNT LESS 0x0501)
     # Windows XP is required for freeaddrinfo, getaddrinfo
     message(FATAL_ERROR "Building for Windows XP or newer is required.")
   endif()
@@ -1626,7 +1578,7 @@ if(WIN32)
   # Pre-fill detection results based on target OS version
   if(_CURL_PREFILL)
     if(NOT HAVE_WIN32_WINNT OR HAVE_WIN32_WINNT LESS 0x0600 OR  # older than Windows Vista
-       WINCE OR WINDOWS_STORE)
+       WINDOWS_STORE)
       set(HAVE_IF_NAMETOINDEX 0)
       unset(HAVE_IF_NAMETOINDEX CACHE)
     elseif(MSVC OR MINGW)
@@ -1734,8 +1686,8 @@ endif()
 
 # Apply to all feature checks
 if(WIN32)
-  list(APPEND CMAKE_REQUIRED_LIBRARIES "${_win32_winsock}")
-  if(NOT WINCE AND NOT WINDOWS_STORE)
+  list(APPEND CMAKE_REQUIRED_LIBRARIES "ws2_32")
+  if(NOT WINDOWS_STORE)
     list(APPEND CMAKE_REQUIRED_LIBRARIES "iphlpapi")
   endif()
 elseif(HAVE_LIBSOCKET)
@@ -1805,11 +1757,9 @@ else()
   check_symbol_exists("strcmpi"         "string.h" HAVE_STRCMPI)
 endif()
 
-if(NOT MINGW32CE)  # Avoid false detections
-  check_function_exists("setmode" HAVE_SETMODE)
-  if(WIN32 OR CYGWIN)
-    check_function_exists("_setmode" HAVE__SETMODE)
-  endif()
+check_function_exists("setmode" HAVE_SETMODE)
+if(WIN32 OR CYGWIN)
+  check_function_exists("_setmode" HAVE__SETMODE)
 endif()
 
 if(AMIGA)
@@ -1971,17 +1921,13 @@ include(CMake/OtherTests.cmake)
 set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "HAVE_CONFIG_H")
 
 if(WIN32)
-  list(APPEND CURL_NETWORK_AND_TIME_LIBS "${_win32_winsock}")
-  if(NOT WINCE AND NOT WINDOWS_STORE)
+  list(APPEND CURL_NETWORK_AND_TIME_LIBS "ws2_32")
+  if(NOT WINDOWS_STORE)
     list(APPEND CURL_NETWORK_AND_TIME_LIBS "iphlpapi")
   endif()
-  if(NOT WINCE)
-    list(APPEND CURL_LIBS "bcrypt")
-  endif()
+  list(APPEND CURL_LIBS "bcrypt")
 
-  if(NOT WINCE)
-    set(USE_WIN32_LARGE_FILES ON)
-  endif()
+  set(USE_WIN32_LARGE_FILES ON)
 
   # We use crypto functions that are not available for UWP apps
   if(NOT WINDOWS_STORE)
@@ -1990,13 +1936,10 @@ if(WIN32)
 
   # Link required libraries for USE_WIN32_CRYPTO or USE_SCHANNEL
   if(USE_WIN32_CRYPTO OR USE_SCHANNEL)
-    if(NOT WINCE)
-      list(APPEND CURL_LIBS "advapi32")
-    endif()
-    list(APPEND CURL_LIBS "${_win32_crypt32}")
+    list(APPEND CURL_LIBS "advapi32" "crypt32")
   endif()
   if(USE_WINDOWS_SSPI)
-    list(APPEND CURL_LIBS "${_win32_secur32}")
+    list(APPEND CURL_LIBS "secur32")
   endif()
 endif()
 
index 517de0c4a63e701ba93a165ff7c22e58d1082c58..7038f32a8b8df8bdc55a3e35eee5a48fa4447bd1 100644 (file)
@@ -1315,13 +1315,8 @@ AC_DEFUN([CURL_CHECK_WIN32_LARGEFILE], [
   AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
   if test "$curl_cv_native_windows" = 'yes'; then
     AC_MSG_CHECKING([whether build target supports Win32 large files])
-    if test "$curl_cv_wince" = 'yes'; then
-      dnl Windows CE does not support large files
-      curl_win32_has_largefile='no'
-    else
-      dnl All mingw-w64 versions support large files
-      curl_win32_has_largefile='yes'
-    fi
+    dnl All mingw-w64 versions support large files
+    curl_win32_has_largefile='yes'
     case "$curl_win32_has_largefile" in
       yes)
         if test x"$enable_largefile" = 'xno'; then
@@ -1478,9 +1473,6 @@ AC_DEFUN([CURL_PREPARE_BUILDINFO], [
   if test "$curl_cv_native_windows" = 'yes'; then
     curl_pflags="${curl_pflags} WIN32"
   fi
-  if test "$curl_cv_wince" = 'yes'; then
-    curl_pflags="${curl_pflags} WINCE"
-  fi
   if test "$curl_cv_winuwp" = 'yes'; then
     curl_pflags="${curl_pflags} UWP"
   fi
index e493369b9db6adc8f4ea9c417fbb6654e614f2ed..9602be344f851c190a1db731562064a9cde9b67c 100644 (file)
@@ -529,12 +529,8 @@ dnl for --enable-code-coverage
 CURL_COVERAGE
 CURL_CHECK_NATIVE_WINDOWS
 
-curl_cv_wince='no'
 curl_cv_winuwp='no'
 if test "$curl_cv_native_windows" = "yes"; then
-  case $host_os in
-    mingw32ce*) curl_cv_wince='yes';;
-  esac
   case "$CPPFLAGS" in
     *-DWINSTORECOMPAT*) curl_cv_winuwp='yes';;
   esac
@@ -896,7 +892,7 @@ AS_HELP_STRING([--disable-telnet],[Disable TELNET support]),
     AC_MSG_RESULT(yes)
 )
 
-if test "$curl_cv_winuwp" = 'yes' -o "$curl_cv_wince" = 'yes'; then
+if test "$curl_cv_winuwp" = 'yes'; then
   AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET])
   CURL_DISABLE_TELNET=1
 fi
@@ -1177,37 +1173,6 @@ if test "$HAVE_GETHOSTBYNAME" != "1"; then
   ])
 fi
 
-if test "$HAVE_GETHOSTBYNAME" != "1"; then
-  if test "$curl_cv_wince" = 'yes'; then
-    dnl This is for Windows CE systems
-    winsock_LIB="-lws2"
-    if test ! -z "$winsock_LIB"; then
-      my_ac_save_LIBS=$LIBS
-      LIBS="$winsock_LIB $LIBS"
-      AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
-      AC_LINK_IFELSE([
-        AC_LANG_PROGRAM([[
-          #ifdef _WIN32
-          #ifndef WIN32_LEAN_AND_MEAN
-          #define WIN32_LEAN_AND_MEAN
-          #endif
-          #include <winsock2.h>
-          #endif
-        ]],[[
-          gethostbyname("localhost");
-        ]])
-      ],[
-        AC_MSG_RESULT([yes])
-        HAVE_GETHOSTBYNAME="1"
-      ],[
-        AC_MSG_RESULT([no])
-        winsock_LIB=""
-        LIBS=$my_ac_save_LIBS
-      ])
-    fi
-  fi
-fi
-
 # In UWP mode gethostbyname gets detected via the core libs, but some
 # code (in6addr_any) still need ws2_32, so let us detect and add it.
 if test "$HAVE_GETHOSTBYNAME" != "1" -o "$curl_cv_winuwp" = "yes"; then
@@ -1693,10 +1658,6 @@ AS_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),
   )
 )
 
-if test "$curl_cv_wince" = 'yes'; then
-  ipv6=no
-fi
-
 if test "$ipv6" = yes; then
   curl_ipv6_msg="enabled"
   AC_DEFINE(USE_IPV6, 1, [Define if you want to enable IPv6 support])
@@ -1998,14 +1959,11 @@ CURL_WITH_APPLE_SECTRUST
 
 dnl link required libraries for USE_WIN32_CRYPTO or SCHANNEL_ENABLED
 if test "x$USE_WIN32_CRYPTO" = "x1" -o "x$SCHANNEL_ENABLED" = "x1"; then
-  LIBS="-lcrypt32 $LIBS"
-  if test "$curl_cv_wince" = 'no'; then
-    LIBS="-ladvapi32 $LIBS"
-  fi
+  LIBS="-ladvapi32 -lcrypt32 $LIBS"
 fi
 
 dnl link bcrypt for BCryptGenRandom() (used when building for Vista or newer)
-if test "x$curl_cv_native_windows" = "xyes" -a "$curl_cv_wince" = 'no'; then
+if test "x$curl_cv_native_windows" = "xyes"; then
   LIBS="-lbcrypt $LIBS"
 fi
 
@@ -2750,11 +2708,7 @@ dnl ----------------------------
 dnl check Windows Unicode option
 dnl ----------------------------
 
-if test "$curl_cv_wince" = 'yes'; then
-  want_winuni="yes"
-else
-  want_winuni="no"
-fi
+want_winuni="no"
 if test "$curl_cv_native_windows" = "yes"; then
   if test "$curl_cv_winuwp" = 'yes'; then
     want_winuni="yes"
@@ -4266,11 +4220,9 @@ else
   CURL_CHECK_FUNC_STRICMP
 fi
 
-if test "$curl_cv_wince" = 'no'; then
-  AC_CHECK_FUNCS([setmode])
-  if test "$curl_cv_native_windows" = 'yes' -o "$curl_cv_cygwin" = 'yes'; then
-    AC_CHECK_FUNCS([_setmode])
-  fi
+AC_CHECK_FUNCS([setmode])
+if test "$curl_cv_native_windows" = 'yes' -o "$curl_cv_cygwin" = 'yes'; then
+  AC_CHECK_FUNCS([_setmode])
 fi
 
 if test -z "$ssl_backends"; then
@@ -4639,7 +4591,7 @@ AS_HELP_STRING([--disable-unix-sockets],[Disable Unix domain sockets]),
     want_unix_sockets=auto
     ]
 )
-if test "x$want_unix_sockets" != "xno" -a "$curl_cv_wince" = 'no'; then
+if test "x$want_unix_sockets" != "xno"; then
   if test "x$curl_cv_native_windows" = "xyes"; then
     USE_UNIX_SOCKETS=1
     AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets])
index 48c44e6c6bba2c56728b87db13af14ba260c42c0..d02174d8caabbdf509f6198a4fdfee58c19f4306 100644 (file)
@@ -12,13 +12,6 @@ email the
 as soon as possible and explain to us why this is a problem for you and
 how your use case cannot be satisfied properly using a workaround.
 
-## Windows CE
-
-Windows CE "mainstream support" ended on October 9, 2018, and "Extended
-Support" ended on October 10, 2023.
-
-curl drops all support in November 2025.
-
 ## VS2008
 
 curl drops support for getting built with Microsoft Visual Studio 2008 in
@@ -100,3 +93,4 @@ Support for RTMP in libcurl gets removed in April 2026.
  - BearSSL (removed in 8.15.0)
  - msh3 (removed in 8.16.0)
  - winbuild build system (removed in 8.17.0)
+ - Windows CE (removed in 8.18.0)
index dfbc1eebfd1bce90befba71c1338b1e7b1c74c32..0db7848a224ef2a52100ab3cf8bc8e9e8c63c947 100644 (file)
@@ -650,7 +650,7 @@ This is a probably incomplete list of known CPU architectures and operating
 systems that curl has been compiled for. If you know a system curl compiles
 and runs on, that is not listed, please let us know.
 
-## 109 Operating Systems
+## 108 Operating Systems
 
     AIX, AmigaOS, Android, ArcaOS, Aros, Atari FreeMiNT, Azure Sphere, BeOS,
     Blackberry 10, Blackberry Tablet OS, Cell OS, Cesium, CheriBSD, Chrome OS,
@@ -665,7 +665,7 @@ and runs on, that is not listed, please let us know.
     SINIX-Z, SkyOS, SmartOS, Solaris, Sortix, SunOS, Syllable OS, Symbian,
     Tizen, TPF, Tru64, tvOS, ucLinux, Ultrix, UNICOS, UnixWare, visionOS, VMS,
     vxWorks, watchOS, Wear OS, WebOS, Wii System Software, Wii U, Windows,
-    Windows CE, Xbox System, Xenix, z/OS, z/TPF, z/VM, z/VSE, Zephyr
+    Xbox System, Xenix, z/OS, z/TPF, z/VM, z/VSE, Zephyr
 
 ## 28 CPU Architectures
 
index b13593a0414b89a0e4623b9c589a47a8ee4b4843..12d8de76c974717d3592412aaa4e9ac65fcce015 100644 (file)
@@ -103,12 +103,7 @@ int main(int argc, char **argv)
   if(!fp)
     return 2;
 
-#ifdef UNDER_CE
-  /* !checksrc! disable BANNEDFUNC 1 */
-  if(stat(file, &file_info) != 0) {
-#else
   if(fstat(fileno(fp), &file_info) != 0) {
-#endif
     fclose(fp);
     return 1; /* cannot continue */
   }
index b99fab58c3891c7538ac04d0958713111745fd28..290f92a61e78679b271da7824a836c2d6b2d76d1 100644 (file)
@@ -29,7 +29,7 @@
  * filter IP addresses.
  */
 
-#if defined(__AMIGA__) || defined(UNDER_CE)
+#ifdef __AMIGA__
 #include <stdio.h>
 int main(void) { printf("Platform not supported.\n"); return 1; }
 #else
index 7415cff81f014ec8e838902af3635fd133b9b9c9..6cab781a46577e0383a75c2d667fa6cf34350416 100644 (file)
 #include <unistd.h>           /*  misc. Unix functions      */
 #endif
 
-#ifdef UNDER_CE
-#define strerror(e) "?"
-#else
 #include <errno.h>
-#endif
 
 /* The IP address and port number to connect to */
 #define IPADDR "127.0.0.1"
index 03dd323bda6b929163431d3e5f1b641519bf03ca..fa9de2aa4f64765d4171368e8c5f93f6af930279 100644 (file)
@@ -57,12 +57,7 @@ int main(void)
   }
 
   /* to get the file size */
-#ifdef UNDER_CE
-  /* !checksrc! disable BANNEDFUNC 1 */
-  if(stat("debugit", &file_info) != 0) {
-#else
   if(fstat(fileno(fd), &file_info) != 0) {
-#endif
     fclose(fd);
     curl_global_cleanup();
     return 1; /* cannot continue */
index 26db7f595301f7e2ebca08ed185c9054bef194cd..b334ad3273173e4e9d720848ec5e9fe7a953766b 100644 (file)
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#ifdef UNDER_CE
-#define strerror(e) "?"
-#else
 #include <errno.h>
-#endif
 #ifdef _WIN32
 #include <io.h>
 #undef stat
@@ -95,12 +91,7 @@ int main(void)
   }
 
   /* to get the file size */
-#ifdef UNDER_CE
-  /* !checksrc! disable BANNEDFUNC 1 */
-  if(stat(LOCAL_FILE, &file_info) != 0) {
-#else
   if(fstat(fileno(hd_src), &file_info) != 0) {
-#endif
     fclose(hd_src);
     return 1; /* cannot continue */
   }
index ea972ec1931f7130dfccb549565d012625036933..e9d723d70d6644718e702bb6a1dee2e86eacd303 100644 (file)
@@ -77,9 +77,7 @@ static int upload(CURL *curl, const char *remotepath,
 
   f = fopen(localpath, "rb");
   if(!f) {
-#ifndef UNDER_CE
     perror(NULL);
-#endif
     return 0;
   }
 
index ca61a92d916f03277ae17e78b7e1cbe5c6037328..e58742e59c9697ccec0c02143d3e2f36d906eeef 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#ifdef UNDER_CE
-#define strerror(e) "?"
-#else
 #include <errno.h>
-#endif
 
 #if defined(_MSC_VER) && (_MSC_VER < 1900)
 #define snprintf _snprintf
index 7ba150e91af5a11a1cbffc93f76e83e5a9a60323..84b0e18ea12ba843cc19a72a95243643441ca246 100644 (file)
 #include <string.h>
 #include <fcntl.h>
 #include <sys/stat.h>
-#ifdef UNDER_CE
-#define strerror(e) "?"
-#else
 #include <errno.h>
-#endif
 
 /* somewhat Unix-specific */
 #ifndef _MSC_VER
@@ -231,14 +227,9 @@ static int setup(struct input *t, int num, const char *upload)
     return 1;
   }
 
-#ifdef UNDER_CE
-  /* !checksrc! disable BANNEDFUNC 1 */
-  if(stat(upload, &file_info) != 0) {
-#else
   if(fstat(fileno(t->in), &file_info) != 0) {
-#endif
-    fprintf(stderr, "error: could not stat file %s: %s\n",
-            upload, strerror(errno));
+    fprintf(stderr, "error: could not stat file %s: %s\n", upload,
+            strerror(errno));
     fclose(t->out);
     t->out = NULL;
     return 1;
index 794ea99ae5827a9efac090381a7fe1268ead7f08..a7fac75b4a2ffd01a3905cc99b75d4de8504c853 100644 (file)
@@ -90,12 +90,7 @@ int main(int argc, char **argv)
     return 2;
 
   /* get the file size of the local file */
-#ifdef UNDER_CE
-  /* !checksrc! disable BANNEDFUNC 1 */
-  if(stat(file, &file_info) != 0) {
-#else
   if(fstat(fileno(hd_src), &file_info) != 0) {
-#endif
     fclose(hd_src);
     return 1; /* cannot continue */
   }
index 350d41affaa6944f82df0bd3bf6214f36302f94f..23208d232caf7521b318ccb9d84c8e132c29404a 100644 (file)
@@ -32,9 +32,7 @@
  *
  */
 
-#ifndef UNDER_CE
 #include <errno.h>
-#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <limits.h>
@@ -156,7 +154,7 @@ static int mem_addf(struct mem *mem, const char *format, ...)
       return x;
     }
 
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
     /* Not all versions of Windows CRT vsnprintf are compliant with C99. Some
        return -1 if buffer too small. Try _vscprintf to get the needed size. */
     if(!i && x < 0) {
@@ -297,11 +295,9 @@ int main(void)
       }
     }
     else {
-#ifndef UNDER_CE
       mem_addf(&t->log, "Failed to create body output file %s: %s\n",
                t->bodyfile, strerror(errno));
       fprintf(stderr, "%s", t->log.recent);
-#endif
       failed = 1;
     }
 
@@ -310,12 +306,10 @@ int main(void)
 
       if(fp && t->log.len == fwrite(t->log.buf, 1, t->log.len, fp))
         fprintf(stderr, "Transfer log written to %s\n", t->logfile);
-#ifndef UNDER_CE
       else {
         fprintf(stderr, "Failed to write transfer log to %s: %s\n",
                 t->logfile, strerror(errno));
       }
-#endif
 
       if(fp)
         fclose(fp);
index cb5d1cf33e0cb737f4fac4607e97395651243383..72ae41382c844db321e2eca3d498594701cb7deb 100644 (file)
@@ -92,9 +92,7 @@ static int sftpResumeUpload(CURL *curl, const char *remotepath,
 
   f = fopen(localpath, "rb");
   if(!f) {
-#ifndef UNDER_CE
     perror(NULL);
-#endif
     return 0;
   }
 
@@ -103,7 +101,7 @@ static int sftpResumeUpload(CURL *curl, const char *remotepath,
   curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_cb);
   curl_easy_setopt(curl, CURLOPT_READDATA, f);
 
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
   _fseeki64(f, remoteFileSizeByte, SEEK_SET);
 #else
   fseek(f, (long)remoteFileSizeByte, SEEK_SET);
index 62ed2b0f43aa4605f3d6d5b96d4b53cc76d3b0a1..a5b3e9eba79a055c4c300b1d5d516678e5fbe693 100644 (file)
 #  endif
 
 #elif defined(UNDER_CE)
-#  ifdef __MINGW32CE__
-#    define CURL_TYPEOF_CURL_OFF_T     long long
-#    define CURL_FORMAT_CURL_OFF_T     "lld"
-#    define CURL_FORMAT_CURL_OFF_TU    "llu"
-#    define CURL_SUFFIX_CURL_OFF_T     LL
-#    define CURL_SUFFIX_CURL_OFF_TU    ULL
-#    define CURL_TYPEOF_CURL_SOCKLEN_T int
-#  else
-#    define CURL_TYPEOF_CURL_OFF_T     __int64
-#    define CURL_FORMAT_CURL_OFF_T     "I64d"
-#    define CURL_FORMAT_CURL_OFF_TU    "I64u"
-#    define CURL_SUFFIX_CURL_OFF_T     i64
-#    define CURL_SUFFIX_CURL_OFF_TU    ui64
-#    define CURL_TYPEOF_CURL_SOCKLEN_T int
-#  endif
+#  define CURL_TYPEOF_CURL_OFF_T     __int64
+#  define CURL_FORMAT_CURL_OFF_T     "I64d"
+#  define CURL_FORMAT_CURL_OFF_TU    "I64u"
+#  define CURL_SUFFIX_CURL_OFF_T     i64
+#  define CURL_SUFFIX_CURL_OFF_TU    ui64
+#  define CURL_TYPEOF_CURL_SOCKLEN_T int
 
 #elif defined(__MINGW32__)
 #  include <inttypes.h>
index d1652d0ff425850904ff0617b16410ae53f986be..07b666304910961ac9cb36879b70b0d09fe5e58a 100644 (file)
@@ -473,7 +473,7 @@ static bool async_thrdd_init(struct Curl_easy *data,
 err_exit:
   CURL_TRC_DNS(data, "resolve thread failed init: %d", err);
   async_thrdd_destroy(data);
-  CURL_SETERRNO(err);
+  errno = err;
   return FALSE;
 }
 
index a8fa997de025a0cd475bb8581f596004ef0436a9..d1a99d3ecee9f5f12d2183e5fcdb443414a7bf9a 100644 (file)
@@ -853,24 +853,11 @@ static bool verifyconnect(curl_socket_t sockfd, int *error)
    *
    *    Someone got to verify this on Win-NT 4.0, 2000."
    */
-
-#ifdef UNDER_CE
-  Sleep(0);
-#else
   SleepEx(0, FALSE);
-#endif
-
 #endif
 
   if(getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (void *)&err, &errSize))
     err = SOCKERRNO;
-#ifdef UNDER_CE
-  /* Old Windows CE versions do not support SO_ERROR */
-  if(WSAENOPROTOOPT == err) {
-    SET_SOCKERRNO(0);
-    err = 0;
-  }
-#endif
 #if defined(EBADIOCTL) && defined(__minix)
   /* Minix 3.1.x does not support getsockopt on UDP sockets */
   if(EBADIOCTL == err) {
index 408606d6117965432b4fde7a74dbf63b87325ab2..bf9038a894a28ffc84ea96b867ca8bf2afa96459 100644 (file)
@@ -28,8 +28,6 @@
 /*               Hand crafted config file for Windows               */
 /* ================================================================ */
 
-#ifndef UNDER_CE
-
 /* Define some minimum and default build targets for Visual Studio */
 #ifdef _MSC_VER
    /* VS2012 default target settings and minimum build target check. */
@@ -78,8 +76,6 @@
 #  endif
 #endif /* _MSC_VER */
 
-#endif /* UNDER_CE */
-
 /* ---------------------------------------------------------------- */
 /*                          HEADER FILES                            */
 /* ---------------------------------------------------------------- */
 /* Define if you have the <arpa/inet.h> header file. */
 /* #define HAVE_ARPA_INET_H 1 */
 
-#ifndef UNDER_CE
-
 /* Define if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1  /* exists on __MINGW32CE__ */
+#define HAVE_FCNTL_H 1
 
 /* Define if you have the <io.h> header file. */
-#define HAVE_IO_H 1  /* exists on __MINGW32CE__ */
+#define HAVE_IO_H 1
 
 /* Define if you have the <locale.h> header file. */
 #define HAVE_LOCALE_H 1
 
-#endif
-
 /* Define if you have the <netdb.h> header file. */
 /* #define HAVE_NETDB_H 1 */
 
 /* #define HAVE_NETINET_IN_H 1 */
 
 /* Define to 1 if you have the <stdbool.h> header file. */
-#ifndef UNDER_CE
 #if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__)
-#define HAVE_STDBOOL_H 1  /* exists on __MINGW32CE__ */
-#endif
+#define HAVE_STDBOOL_H 1
 #endif
 
 /* Define to 1 if you have the <stdint.h> header file. */
 #define STDC_HEADERS 1
 
 /* Define to 1 if bool is an available type. */
-#ifndef UNDER_CE
 #if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__)
-#define HAVE_BOOL_T 1  /* exists on __MINGW32CE__ */
-#endif
+#define HAVE_BOOL_T 1
 #endif
 
 /* ---------------------------------------------------------------- */
 /* Define if you have the select function. */
 #define HAVE_SELECT 1
 
-#ifndef UNDER_CE
 /* Define if you have the setlocale function. */
 #define HAVE_SETLOCALE 1
 
 
 /* Define if you have the _setmode function. */
 #define HAVE__SETMODE 1
-#endif
 
 /* Define if you have the socket function. */
 #define HAVE_SOCKET 1
 #endif
 
 /* Define to 1 if you have the signal function. */
-#ifndef UNDER_CE
 #define HAVE_SIGNAL 1
-#endif
 
 /* ---------------------------------------------------------------- */
 /*                       TYPEDEF REPLACEMENTS                       */
 #endif
 
 /* Windows XP is required for freeaddrinfo, getaddrinfo */
-#ifndef UNDER_CE
 #define HAVE_FREEADDRINFO           1
 #define HAVE_GETADDRINFO            1
 #define HAVE_GETADDRINFO_THREADSAFE 1
-#endif
 
 /* ---------------------------------------------------------------- */
 /*                          STRUCT RELATED                          */
 /*                        LARGE FILE SUPPORT                        */
 /* ---------------------------------------------------------------- */
 
-#ifndef UNDER_CE
-
 #if defined(_MSC_VER) || defined(__MINGW32__)
 #  define USE_WIN32_LARGE_FILES
 /* Number of bits in a file offset, on hosts where this is settable. */
 #  define SIZEOF_OFF_T 4
 #endif
 
-#endif /* UNDER_CE */
-
 /* ---------------------------------------------------------------- */
 /*                       DNS RESOLVER SPECIALTY                     */
 /* ---------------------------------------------------------------- */
 #ifdef CURL_HAS_OPENLDAP_LDAPSDK
 #undef USE_WIN32_LDAP
 #define HAVE_LDAP_URL_PARSE 1
-#elif !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#elif !defined(CURL_WINDOWS_UWP)
 #undef HAVE_LDAP_URL_PARSE
 #define HAVE_LDAP_SSL 1
 #define USE_WIN32_LDAP 1
 #endif
 
 /* Define to use Unix sockets. */
-#ifndef UNDER_CE
 #define USE_UNIX_SOCKETS
-#endif
 
 /* ---------------------------------------------------------------- */
 /*                       ADDITIONAL DEFINITIONS                     */
 
 /* Define cpu-machine-OS */
 #ifndef CURL_OS
-#  ifdef UNDER_CE
-#    ifdef _M_ARM
-#    define CURL_OS "arm-pc-win32ce"
-#    else
-#    define CURL_OS "i386-pc-win32ce"
-#    endif
-#  else /* !UNDER_CE */
-#    if defined(_M_IX86) || defined(__i386__) /* x86 (MSVC or gcc) */
-#    define CURL_OS "i386-pc-win32"
-#    elif defined(_M_X64) || defined(__x86_64__) /* x86_64 (VS2005+ or gcc) */
-#    define CURL_OS "x86_64-pc-win32"
-#    elif defined(_M_IA64) || defined(__ia64__) /* Itanium */
-#    define CURL_OS "ia64-pc-win32"
-#    elif defined(_M_ARM_NT) || defined(__arm__) /* ARMv7-Thumb2 */
-#    define CURL_OS "thumbv7a-pc-win32"
-#    elif defined(_M_ARM64) || defined(__aarch64__) /* ARM64 (Windows 10) */
-#    define CURL_OS "aarch64-pc-win32"
-#    else
-#    define CURL_OS "unknown-pc-win32"
-#    endif
-#  endif /* UNDER_CE */
+#  if defined(_M_IX86) || defined(__i386__) /* x86 (MSVC or gcc) */
+#  define CURL_OS "i386-pc-win32"
+#  elif defined(_M_X64) || defined(__x86_64__) /* x86_64 (VS2005+ or gcc) */
+#  define CURL_OS "x86_64-pc-win32"
+#  elif defined(_M_IA64) || defined(__ia64__) /* Itanium */
+#  define CURL_OS "ia64-pc-win32"
+#  elif defined(_M_ARM_NT) || defined(__arm__) /* ARMv7-Thumb2 */
+#  define CURL_OS "thumbv7a-pc-win32"
+#  elif defined(_M_ARM64) || defined(__aarch64__) /* ARM64 (Windows 10) */
+#  define CURL_OS "aarch64-pc-win32"
+#  else
+#  define CURL_OS "unknown-pc-win32"
+#  endif
 #endif /* !CURL_OS */
 
-/* ---------------------------------------------------------------- */
-/*                            Windows CE                            */
-/* ---------------------------------------------------------------- */
-
-#ifdef UNDER_CE
-
-#ifndef UNICODE
-#define UNICODE
-#endif
-
-#ifndef _UNICODE
-#define _UNICODE
-#endif
-
-#define CURL_DISABLE_FILE 1
-#define CURL_DISABLE_TELNET 1
-#define CURL_DISABLE_LDAP 1
-
-#ifndef _MSC_VER
-/* !checksrc! disable BANNEDFUNC 1 */
-extern int stat(const char *path, struct stat *buffer);
-#endif
-
-#endif /* UNDER_CE */
-
 #endif /* HEADER_CURL_CONFIG_WIN32_H */
index 573b02952b10b9632410c91e34a5a0b144180956..b5de9b4f5eb0044bb85076a862b3c4e968a09649 100644 (file)
@@ -280,7 +280,7 @@ bool Curl_addr2string(struct sockaddr *sa, curl_socklen_t salen,
 
   addr[0] = '\0';
   *port = 0;
-  CURL_SETERRNO(SOCKEAFNOSUPPORT);
+  errno = SOCKEAFNOSUPPORT;
   return FALSE;
 }
 
index c41cff21cde94ca4eebba0a057575c868ab1fac0..fd0c7c65d201911078d3ace3ca2749c81bc1364d 100644 (file)
@@ -101,14 +101,7 @@ CURLcode Curl_fopen(struct Curl_easy *data, const char *filename,
   *fh = curlx_fopen(filename, FOPEN_WRITETEXT);
   if(!*fh)
     goto fail;
-  if(
-#ifdef UNDER_CE
-     /* !checksrc! disable BANNEDFUNC 1 */
-     stat(filename, &sb) == -1
-#else
-     fstat(fileno(*fh), &sb) == -1
-#endif
-     || !S_ISREG(sb.st_mode)) {
+  if(fstat(fileno(*fh), &sb) == -1 || !S_ISREG(sb.st_mode)) {
     return CURLE_OK;
   }
   curlx_fclose(*fh);
index d41c9b8ceabca37ef5a882c565d1a09fcd69e258..fe3b9e0ee39594a54f87166bf16a7545495970df 100644 (file)
@@ -75,7 +75,7 @@
 #endif
 #endif
 
-#if defined(__MINGW32__) && !defined(__MINGW32CE__) && \
+#if defined(__MINGW32__) && \
   (!defined(__MINGW64_VERSION_MAJOR) || (__MINGW64_VERSION_MAJOR < 3))
 #error "Building curl requires mingw-w64 3.0 or later"
 #endif
 #  endif
 #endif
 
-/* Avoid bogus format check warnings with mingw32ce gcc 4.4.0 in
-   C99 (-std=gnu99) mode */
-#if defined(__MINGW32CE__) && !defined(CURL_NO_FMT_CHECKS) && \
-  (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) && \
-  (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 4))
-#define CURL_NO_FMT_CHECKS
-#endif
-
 /* Compatibility */
 #ifdef ENABLE_IPV6
 #define USE_IPV6 1
 #    define LSEEK_ERROR                  (__int64)-1
 #  else
      /* Small file (<2Gb) support using Win32 functions. */
-#    ifndef UNDER_CE
-#      undef  lseek
-#      define lseek(fdes, offset, whence)  _lseek(fdes, (long)offset, whence)
-#      define fstat(fdes, stp)             _fstat(fdes, stp)
-#      define struct_stat                  struct _stat
-#    endif
+#    undef  lseek
+#    define lseek(fdes, offset, whence)  _lseek(fdes, (long)offset, whence)
+#    define fstat(fdes, stp)             _fstat(fdes, stp)
+#    define struct_stat                  struct _stat
 #    define LSEEK_ERROR                  (long)-1
 #  endif
 #elif defined(__DJGPP__)
 #include "curl_setup_once.h"
 #endif
 
-#ifdef UNDER_CE
-#define getenv curl_getenv  /* Windows CE does not support getenv() */
-#define raise(s) ((void)(s))
-/* Terrible workarounds to make Windows CE compile */
-#define errno 0
-#define CURL_SETERRNO(x) ((void)(x))
-#define EINTR  4
-#define EAGAIN 11
-#define ENOMEM 12
-#define EACCES 13
-#define EEXIST 17
-#define EISDIR 21
-#define EINVAL 22
-#define ENOSPC 28
-#define strerror(x) "?"
-#undef STDIN_FILENO
-#define STDIN_FILENO 0
-#else
-#define CURL_SETERRNO(x) (errno = (x))
-#endif
-
 /*
  * Definition of our NOP statement Object-like macro
  */
@@ -926,7 +895,7 @@ endings either CRLF or LF so 't' is appropriate.
 
 /* for systems that do not detect this in configure */
 #ifndef CURL_SA_FAMILY_T
-#  if defined(_WIN32) && !defined(UNDER_CE)
+#  ifdef _WIN32
 #    define CURL_SA_FAMILY_T ADDRESS_FAMILY
 #  elif defined(HAVE_SA_FAMILY_T)
 #    define CURL_SA_FAMILY_T sa_family_t
index 7a54760e161ef0b2e276aabd083a3aba9c1356a7..1c2194c502480a373dd32d6efe39e9ded5c5562c 100644 (file)
@@ -33,9 +33,7 @@
 #include <string.h>
 #include <stdarg.h>
 #include <time.h>
-#ifndef UNDER_CE
 #include <errno.h>
-#endif
 
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -356,7 +354,7 @@ typedef unsigned int bit;
 
 #ifdef __VMS
 #define argv_item_t  __char_ptr32
-#elif defined(_UNICODE) && !defined(UNDER_CE)
+#elif defined(_UNICODE)
 #define argv_item_t  wchar_t *
 #else
 #define argv_item_t  char *
index c819b1c22ea51336afd9a1f34e09498924ea5ea4..32b4c894d6b566d63da06f7c114ad810bfa792c5 100644 (file)
@@ -62,11 +62,7 @@ CURLcode Curl_sspi_global_init(void)
   /* If security interface is not yet initialized try to do this */
   if(!Curl_pSecFn) {
     /* Get pointer to Security Service Provider Interface dispatch table */
-#ifdef __MINGW32CE__
-    Curl_pSecFn = InitSecurityInterfaceW();
-#else
     Curl_pSecFn = InitSecurityInterface();
-#endif
     if(!Curl_pSecFn)
       return CURLE_FAILED_INIT;
   }
index 8ecd81fdea14fed3f73b338ce471947922942a32..89ebc9b0ba8ba60a6bb05fd640fee74e5502d654 100644 (file)
@@ -70,225 +70,6 @@ extern PSecurityFunctionTable Curl_pSecFn;
 #define ISC_REQ_USE_HTTP_STYLE                0x01000000
 #endif
 
-#ifdef __MINGW32CE__
-#ifndef ISC_RET_REPLAY_DETECT
-#define ISC_RET_REPLAY_DETECT                 0x00000004
-#endif
-#ifndef ISC_RET_SEQUENCE_DETECT
-#define ISC_RET_SEQUENCE_DETECT               0x00000008
-#endif
-#ifndef ISC_RET_CONFIDENTIALITY
-#define ISC_RET_CONFIDENTIALITY               0x00000010
-#endif
-#ifndef ISC_RET_ALLOCATED_MEMORY
-#define ISC_RET_ALLOCATED_MEMORY              0x00000100
-#endif
-#ifndef ISC_RET_STREAM
-#define ISC_RET_STREAM                        0x00008000
-#endif
-
-#ifndef SEC_E_INSUFFICIENT_MEMORY
-#define SEC_E_INSUFFICIENT_MEMORY             ((HRESULT)0x80090300L)
-#endif
-#ifndef SEC_E_INVALID_HANDLE
-#define SEC_E_INVALID_HANDLE                  ((HRESULT)0x80090301L)
-#endif
-#ifndef SEC_E_UNSUPPORTED_FUNCTION
-#define SEC_E_UNSUPPORTED_FUNCTION            ((HRESULT)0x80090302L)
-#endif
-#ifndef SEC_E_TARGET_UNKNOWN
-#define SEC_E_TARGET_UNKNOWN                  ((HRESULT)0x80090303L)
-#endif
-#ifndef SEC_E_INTERNAL_ERROR
-#define SEC_E_INTERNAL_ERROR                  ((HRESULT)0x80090304L)
-#endif
-#ifndef SEC_E_SECPKG_NOT_FOUND
-#define SEC_E_SECPKG_NOT_FOUND                ((HRESULT)0x80090305L)
-#endif
-#ifndef SEC_E_NOT_OWNER
-#define SEC_E_NOT_OWNER                       ((HRESULT)0x80090306L)
-#endif
-#ifndef SEC_E_CANNOT_INSTALL
-#define SEC_E_CANNOT_INSTALL                  ((HRESULT)0x80090307L)
-#endif
-#ifndef SEC_E_INVALID_TOKEN
-#define SEC_E_INVALID_TOKEN                   ((HRESULT)0x80090308L)
-#endif
-#ifndef SEC_E_CANNOT_PACK
-#define SEC_E_CANNOT_PACK                     ((HRESULT)0x80090309L)
-#endif
-#ifndef SEC_E_QOP_NOT_SUPPORTED
-#define SEC_E_QOP_NOT_SUPPORTED               ((HRESULT)0x8009030AL)
-#endif
-#ifndef SEC_E_NO_IMPERSONATION
-#define SEC_E_NO_IMPERSONATION                ((HRESULT)0x8009030BL)
-#endif
-#ifndef SEC_E_LOGON_DENIED
-#define SEC_E_LOGON_DENIED                    ((HRESULT)0x8009030CL)
-#endif
-#ifndef SEC_E_UNKNOWN_CREDENTIALS
-#define SEC_E_UNKNOWN_CREDENTIALS             ((HRESULT)0x8009030DL)
-#endif
-#ifndef SEC_E_NO_CREDENTIALS
-#define SEC_E_NO_CREDENTIALS                  ((HRESULT)0x8009030EL)
-#endif
-#ifndef SEC_E_MESSAGE_ALTERED
-#define SEC_E_MESSAGE_ALTERED                 ((HRESULT)0x8009030FL)
-#endif
-#ifndef SEC_E_OUT_OF_SEQUENCE
-#define SEC_E_OUT_OF_SEQUENCE                 ((HRESULT)0x80090310L)
-#endif
-#ifndef SEC_E_NO_AUTHENTICATING_AUTHORITY
-#define SEC_E_NO_AUTHENTICATING_AUTHORITY     ((HRESULT)0x80090311L)
-#endif
-#ifndef SEC_E_BAD_PKGID
-#define SEC_E_BAD_PKGID                       ((HRESULT)0x80090316L)
-#endif
-#ifndef SEC_E_CONTEXT_EXPIRED
-#define SEC_E_CONTEXT_EXPIRED                 ((HRESULT)0x80090317L)
-#endif
-#ifndef SEC_E_INCOMPLETE_MESSAGE
-#define SEC_E_INCOMPLETE_MESSAGE              ((HRESULT)0x80090318L)
-#endif
-#ifndef SEC_E_INCOMPLETE_CREDENTIALS
-#define SEC_E_INCOMPLETE_CREDENTIALS          ((HRESULT)0x80090320L)
-#endif
-#ifndef SEC_E_BUFFER_TOO_SMALL
-#define SEC_E_BUFFER_TOO_SMALL                ((HRESULT)0x80090321L)
-#endif
-#ifndef SEC_E_WRONG_PRINCIPAL
-#define SEC_E_WRONG_PRINCIPAL                 ((HRESULT)0x80090322L)
-#endif
-#ifndef SEC_E_TIME_SKEW
-#define SEC_E_TIME_SKEW                       ((HRESULT)0x80090324L)
-#endif
-#ifndef SEC_E_UNTRUSTED_ROOT
-#define SEC_E_UNTRUSTED_ROOT                  ((HRESULT)0x80090325L)
-#endif
-#ifndef SEC_E_ILLEGAL_MESSAGE
-#define SEC_E_ILLEGAL_MESSAGE                 ((HRESULT)0x80090326L)
-#endif
-#ifndef SEC_E_CERT_UNKNOWN
-#define SEC_E_CERT_UNKNOWN                    ((HRESULT)0x80090327L)
-#endif
-#ifndef SEC_E_CERT_EXPIRED
-#define SEC_E_CERT_EXPIRED                    ((HRESULT)0x80090328L)
-#endif
-#ifndef SEC_E_ENCRYPT_FAILURE
-#define SEC_E_ENCRYPT_FAILURE                 ((HRESULT)0x80090329L)
-#endif
-#ifndef SEC_E_DECRYPT_FAILURE
-#define SEC_E_DECRYPT_FAILURE                 ((HRESULT)0x80090330L)
-#endif
-#ifndef SEC_E_ALGORITHM_MISMATCH
-#define SEC_E_ALGORITHM_MISMATCH              ((HRESULT)0x80090331L)
-#endif
-#ifndef SEC_E_SECURITY_QOS_FAILED
-#define SEC_E_SECURITY_QOS_FAILED             ((HRESULT)0x80090332L)
-#endif
-#ifndef SEC_E_UNFINISHED_CONTEXT_DELETED
-#define SEC_E_UNFINISHED_CONTEXT_DELETED      ((HRESULT)0x80090333L)
-#endif
-#ifndef SEC_E_NO_TGT_REPLY
-#define SEC_E_NO_TGT_REPLY                    ((HRESULT)0x80090334L)
-#endif
-#ifndef SEC_E_NO_IP_ADDRESSES
-#define SEC_E_NO_IP_ADDRESSES                 ((HRESULT)0x80090335L)
-#endif
-#ifndef SEC_E_WRONG_CREDENTIAL_HANDLE
-#define SEC_E_WRONG_CREDENTIAL_HANDLE         ((HRESULT)0x80090336L)
-#endif
-#ifndef SEC_E_CRYPTO_SYSTEM_INVALID
-#define SEC_E_CRYPTO_SYSTEM_INVALID           ((HRESULT)0x80090337L)
-#endif
-#ifndef SEC_E_MAX_REFERRALS_EXCEEDED
-#define SEC_E_MAX_REFERRALS_EXCEEDED          ((HRESULT)0x80090338L)
-#endif
-#ifndef SEC_E_MUST_BE_KDC
-#define SEC_E_MUST_BE_KDC                     ((HRESULT)0x80090339L)
-#endif
-#ifndef SEC_E_STRONG_CRYPTO_NOT_SUPPORTED
-#define SEC_E_STRONG_CRYPTO_NOT_SUPPORTED     ((HRESULT)0x8009033AL)
-#endif
-#ifndef SEC_E_TOO_MANY_PRINCIPALS
-#define SEC_E_TOO_MANY_PRINCIPALS             ((HRESULT)0x8009033BL)
-#endif
-#ifndef SEC_E_NO_PA_DATA
-#define SEC_E_NO_PA_DATA                      ((HRESULT)0x8009033CL)
-#endif
-#ifndef SEC_E_PKINIT_NAME_MISMATCH
-#define SEC_E_PKINIT_NAME_MISMATCH            ((HRESULT)0x8009033DL)
-#endif
-#ifndef SEC_E_SMARTCARD_LOGON_REQUIRED
-#define SEC_E_SMARTCARD_LOGON_REQUIRED        ((HRESULT)0x8009033EL)
-#endif
-#ifndef SEC_E_SHUTDOWN_IN_PROGRESS
-#define SEC_E_SHUTDOWN_IN_PROGRESS            ((HRESULT)0x8009033FL)
-#endif
-#ifndef SEC_E_KDC_INVALID_REQUEST
-#define SEC_E_KDC_INVALID_REQUEST             ((HRESULT)0x80090340L)
-#endif
-#ifndef SEC_E_KDC_UNABLE_TO_REFER
-#define SEC_E_KDC_UNABLE_TO_REFER             ((HRESULT)0x80090341L)
-#endif
-#ifndef SEC_E_KDC_UNKNOWN_ETYPE
-#define SEC_E_KDC_UNKNOWN_ETYPE               ((HRESULT)0x80090342L)
-#endif
-#ifndef SEC_E_UNSUPPORTED_PREAUTH
-#define SEC_E_UNSUPPORTED_PREAUTH             ((HRESULT)0x80090343L)
-#endif
-#ifndef SEC_E_DELEGATION_REQUIRED
-#define SEC_E_DELEGATION_REQUIRED             ((HRESULT)0x80090345L)
-#endif
-#ifndef SEC_E_BAD_BINDINGS
-#define SEC_E_BAD_BINDINGS                    ((HRESULT)0x80090346L)
-#endif
-#ifndef SEC_E_MULTIPLE_ACCOUNTS
-#define SEC_E_MULTIPLE_ACCOUNTS               ((HRESULT)0x80090347L)
-#endif
-#ifndef SEC_E_NO_KERB_KEY
-#define SEC_E_NO_KERB_KEY                     ((HRESULT)0x80090348L)
-#endif
-#ifndef SEC_E_CERT_WRONG_USAGE
-#define SEC_E_CERT_WRONG_USAGE                ((HRESULT)0x80090349L)
-#endif
-#ifndef SEC_E_DOWNGRADE_DETECTED
-#define SEC_E_DOWNGRADE_DETECTED              ((HRESULT)0x80090350L)
-#endif
-#ifndef SEC_E_SMARTCARD_CERT_REVOKED
-#define SEC_E_SMARTCARD_CERT_REVOKED          ((HRESULT)0x80090351L)
-#endif
-#ifndef SEC_E_ISSUING_CA_UNTRUSTED
-#define SEC_E_ISSUING_CA_UNTRUSTED            ((HRESULT)0x80090352L)
-#endif
-#ifndef SEC_E_REVOCATION_OFFLINE_C
-#define SEC_E_REVOCATION_OFFLINE_C            ((HRESULT)0x80090353L)
-#endif
-#ifndef SEC_E_PKINIT_CLIENT_FAILURE
-#define SEC_E_PKINIT_CLIENT_FAILURE           ((HRESULT)0x80090354L)
-#endif
-#ifndef SEC_E_SMARTCARD_CERT_EXPIRED
-#define SEC_E_SMARTCARD_CERT_EXPIRED          ((HRESULT)0x80090355L)
-#endif
-#ifndef SEC_E_NO_S4U_PROT_SUPPORT
-#define SEC_E_NO_S4U_PROT_SUPPORT             ((HRESULT)0x80090356L)
-#endif
-#ifndef SEC_E_CROSSREALM_DELEGATION_FAILURE
-#define SEC_E_CROSSREALM_DELEGATION_FAILURE   ((HRESULT)0x80090357L)
-#endif
-#ifndef SEC_E_REVOCATION_OFFLINE_KDC
-#define SEC_E_REVOCATION_OFFLINE_KDC          ((HRESULT)0x80090358L)
-#endif
-#ifndef SEC_E_ISSUING_CA_UNTRUSTED_KDC
-#define SEC_E_ISSUING_CA_UNTRUSTED_KDC        ((HRESULT)0x80090359L)
-#endif
-#ifndef SEC_E_KDC_CERT_EXPIRED
-#define SEC_E_KDC_CERT_EXPIRED                ((HRESULT)0x8009035AL)
-#endif
-#ifndef SEC_E_KDC_CERT_REVOKED
-#define SEC_E_KDC_CERT_REVOKED                ((HRESULT)0x8009035BL)
-#endif
-#endif /* __MINGW32CE__ */
 /* Offered by mingw-w64 v8+. MS SDK 6.0A+. */
 #ifndef SEC_E_INVALID_PARAMETER
 #define SEC_E_INVALID_PARAMETER               ((HRESULT)0x8009035DL)
@@ -302,44 +83,11 @@ extern PSecurityFunctionTable Curl_pSecFn;
 #define SEC_E_POLICY_NLTM_ONLY                ((HRESULT)0x8009035FL)
 #endif
 
-#ifdef __MINGW32CE__
-#ifndef SEC_I_CONTINUE_NEEDED
-#define SEC_I_CONTINUE_NEEDED                 ((HRESULT)0x00090312L)
-#endif
-#ifndef SEC_I_COMPLETE_NEEDED
-#define SEC_I_COMPLETE_NEEDED                 ((HRESULT)0x00090313L)
-#endif
-#ifndef SEC_I_COMPLETE_AND_CONTINUE
-#define SEC_I_COMPLETE_AND_CONTINUE           ((HRESULT)0x00090314L)
-#endif
-#ifndef SEC_I_LOCAL_LOGON
-#define SEC_I_LOCAL_LOGON                     ((HRESULT)0x00090315L)
-#endif
-#ifndef SEC_I_CONTEXT_EXPIRED
-#define SEC_I_CONTEXT_EXPIRED                 ((HRESULT)0x00090317L)
-#endif
-#ifndef SEC_I_INCOMPLETE_CREDENTIALS
-#define SEC_I_INCOMPLETE_CREDENTIALS          ((HRESULT)0x00090320L)
-#endif
-#ifndef SEC_I_RENEGOTIATE
-#define SEC_I_RENEGOTIATE                     ((HRESULT)0x00090321L)
-#endif
-#ifndef SEC_I_NO_LSA_CONTEXT
-#define SEC_I_NO_LSA_CONTEXT                  ((HRESULT)0x00090323L)
-#endif
-#endif /* __MINGW32CE__ */
-
 /* Offered by mingw-w64 v8+. MS SDK 6.0A+. */
 #ifndef SEC_I_SIGNATURE_NEEDED
 #define SEC_I_SIGNATURE_NEEDED                ((HRESULT)0x0009035CL)
 #endif
 
-#ifdef __MINGW32CE__
-#ifndef CRYPT_E_NOT_IN_REVOCATION_DATABASE
-#define CRYPT_E_NOT_IN_REVOCATION_DATABASE    ((HRESULT)0x80092014L)
-#endif
-#endif /* __MINGW32CE__ */
-
 /*
  * Definitions required from ntsecapi.h are directly provided below this point
  * to avoid including ntsecapi.h due to a conflict with OpenSSL's safestack.h
index 68bfddddcbcdf196617b4c3b426b5e5b0231ff6f..a0308f06b2dc10eca7524fb8939f6db791cfcc6e 100644 (file)
@@ -69,7 +69,7 @@ curl_thread_t Curl_thread_create(CURL_THREAD_RETURN_T
 
   rc = pthread_create(t, NULL, curl_thread_create_thunk, ac);
   if(rc) {
-    CURL_SETERRNO(rc);
+    errno = rc;
     goto err;
   }
 
@@ -109,10 +109,9 @@ curl_thread_t Curl_thread_create(CURL_THREAD_RETURN_T
   if(!t) {
     DWORD gle = GetLastError();
     /* !checksrc! disable ERRNOVAR 1 */
-    int err = (gle == ERROR_ACCESS_DENIED ||
-               gle == ERROR_NOT_ENOUGH_MEMORY) ?
-               EACCES : EINVAL;
-    CURL_SETERRNO(err);
+    errno = (gle == ERROR_ACCESS_DENIED ||
+             gle == ERROR_NOT_ENOUGH_MEMORY) ?
+             EACCES : EINVAL;
     return curl_thread_t_null;
   }
   return t;
@@ -128,11 +127,7 @@ void Curl_thread_destroy(curl_thread_t *hnd)
 
 int Curl_thread_join(curl_thread_t *hnd)
 {
-#ifdef UNDER_CE
-  int ret = (WaitForSingleObject(*hnd, INFINITE) == WAIT_OBJECT_0);
-#else
   int ret = (WaitForSingleObjectEx(*hnd, INFINITE, FALSE) == WAIT_OBJECT_0);
-#endif
 
   Curl_thread_destroy(hnd);
 
index 9509e83148807f9729f18b7744e8674d9ea404f8..a5311874b8aee554a0697d1bd15eb4adfadf8d6d 100644 (file)
@@ -47,7 +47,7 @@ int curlx_fseek(void *stream, curl_off_t offset, int whence)
 #endif
 }
 
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
 
 #include "multibyte.h"
 
@@ -235,7 +235,7 @@ int curlx_win32_open(const char *filename, int oflag, ...)
   }
   else
     /* !checksrc! disable ERRNOVAR 1 */
-    CURL_SETERRNO(EINVAL);
+    errno = EINVAL;
 #else
   if(fix_excessive_path(filename, &fixed))
     target = fixed;
@@ -266,7 +266,7 @@ FILE *curlx_win32_fopen(const char *filename, const char *mode)
   }
   else
     /* !checksrc! disable ERRNOVAR 1 */
-    CURL_SETERRNO(EINVAL);
+    errno = EINVAL;
   curlx_unicodefree(filename_w);
   curlx_unicodefree(mode_w);
 #else
@@ -304,7 +304,7 @@ int curlx_win32_stat(const char *path, struct_stat *buffer)
   }
   else
     /* !checksrc! disable ERRNOVAR 1 */
-    CURL_SETERRNO(EINVAL);
+    errno = EINVAL;
 #else
   if(fix_excessive_path(path, &fixed))
     target = fixed;
@@ -321,4 +321,4 @@ int curlx_win32_stat(const char *path, struct_stat *buffer)
   return result;
 }
 
-#endif /* _WIN32 && !UNDER_CE */
+#endif /* _WIN32 */
index 51f4dbca173b5323637263a947e236698f716105..da9eb55ec9dd7c67b52d4154434e4862c27881eb 100644 (file)
@@ -34,7 +34,7 @@
 
 int curlx_fseek(void *stream, curl_off_t offset, int whence);
 
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
 FILE *curlx_win32_fopen(const char *filename, const char *mode);
 int curlx_win32_stat(const char *path, struct_stat *buffer);
 int curlx_win32_open(const char *filename, int oflag, ...);
index a9595d0c2f25edaa1715d881468588419fed8b49..d4053f1a60f2ddb5c9caec0b481848423b7d30d7 100644 (file)
@@ -72,9 +72,9 @@ static char *inet_ntop4(const unsigned char *src, char *dst, size_t size)
   len = strlen(tmp);
   if(len == 0 || len >= size) {
 #ifdef USE_WINSOCK
-    CURL_SETERRNO(WSAEINVAL);
+    errno = WSAEINVAL;
 #else
-    CURL_SETERRNO(ENOSPC);
+    errno = ENOSPC;
 #endif
     return NULL;
   }
@@ -186,9 +186,9 @@ static char *inet_ntop6(const unsigned char *src, char *dst, size_t size)
    */
   if((size_t)(tp - tmp) > size) {
 #ifdef USE_WINSOCK
-    CURL_SETERRNO(WSAEINVAL);
+    errno = WSAEINVAL;
 #else
-    CURL_SETERRNO(ENOSPC);
+    errno = ENOSPC;
 #endif
     return NULL;
   }
@@ -215,7 +215,7 @@ char *curlx_inet_ntop(int af, const void *src, char *buf, size_t size)
   case AF_INET6:
     return inet_ntop6((const unsigned char *)src, buf, size);
   default:
-    CURL_SETERRNO(SOCKEAFNOSUPPORT);
+    errno = SOCKEAFNOSUPPORT;
     return NULL;
   }
 }
index d2b39ae9f1a772a853359d24838db64291bf24ee..b78fa5d746fb7f6bc9584becfa4081ab9640da63 100644 (file)
@@ -82,7 +82,7 @@ curlx_inet_pton(int af, const char *src, void *dst)
   case AF_INET6:
     return inet_pton6(src, (unsigned char *)dst);
   default:
-    CURL_SETERRNO(SOCKEAFNOSUPPORT);
+    errno = SOCKEAFNOSUPPORT;
     return -1;
   }
   /* NOTREACHED */
index e5227554e5630bd01b5ecc259c31ba0d3fd14d4a..047588ed183a9fecc45d8380a5c4f57f55fae3a6 100644 (file)
@@ -287,13 +287,10 @@ const char *curlx_strerror(int err, char *buf, size_t buflen)
   *buf = '\0';
 
 #ifdef _WIN32
-#ifndef UNDER_CE
   /* 'sys_nerr' is the maximum errno number, it is not widely portable */
   if(err >= 0 && err < sys_nerr)
     SNPRINTF(buf, buflen, "%s", sys_errlist[err]);
-  else
-#endif
-  {
+  else {
     if(
 #ifdef USE_WINSOCK
       !get_winsock_error(err, buf, buflen) &&
@@ -350,7 +347,7 @@ const char *curlx_strerror(int err, char *buf, size_t buflen)
     *p = '\0';
 
   if(errno != old_errno)
-    CURL_SETERRNO(old_errno);
+    errno = old_errno;
 
 #ifdef _WIN32
   if(old_win_err != GetLastError())
index 7e415dfe89d929f0e20372121b70b97dbd871256..cc86b71d3e3d41a2c7261058bf523ef8be6f6456 100644 (file)
@@ -111,12 +111,6 @@ bool curlx_verify_windows_version(const unsigned int majorVersion,
     /* we are always running on PLATFORM_WINNT */
     matched = FALSE;
   }
-#elif defined(UNDER_CE)
-  (void)majorVersion;
-  (void)minorVersion;
-  (void)buildVersion;
-  (void)platform;
-  (void)condition;
 #else
   ULONGLONG cm = 0;
   struct OUR_OSVERSIONINFOEXW osver;
@@ -139,7 +133,7 @@ bool curlx_verify_windows_version(const unsigned int majorVersion,
 #pragma clang diagnostic ignored "-Wcast-function-type-strict"
 #endif
     pRtlVerifyVersionInfo = CURLX_FUNCTION_CAST(RTLVERIFYVERSIONINFO_FN,
-      GetProcAddress(GetModuleHandleA("ntdll"), "RtlVerifyVersionInfo"));
+      GetProcAddress(GetModuleHandle(TEXT("ntdll")), "RtlVerifyVersionInfo"));
 #if defined(__clang__) && __clang_major__ >= 16
 #pragma clang diagnostic pop
 #endif
index de1218cec7f5e5f4e2424d87250130da615dd5b3..2dc277c1c1fa2b76589654a7fb1233acc7b98c98 100644 (file)
@@ -61,8 +61,7 @@ const char *curlx_get_winapi_error(DWORD err, char *buf, size_t buflen)
 
   /* We return the local codepage version of the error string because if it is
      output to the user's terminal it will likely be with functions which
-     expect the local codepage (eg fprintf, failf, infof).
-     FormatMessageW -> wcstombs is used for Windows CE compatibility. */
+     expect the local codepage (eg fprintf, failf, infof). */
   if(FormatMessageW((FORMAT_MESSAGE_FROM_SYSTEM |
                      FORMAT_MESSAGE_IGNORE_INSERTS), NULL, err,
                     LANG_NEUTRAL, wbuf, CURL_ARRAYSIZE(wbuf), NULL)) {
@@ -118,7 +117,7 @@ const char *curlx_winapi_strerror(DWORD err, char *buf, size_t buflen)
 #endif
 
   if(errno != old_errno)
-    CURL_SETERRNO(old_errno);
+    errno = old_errno;
 
   if(old_win_err != GetLastError())
     SetLastError(old_win_err);
index c5ccc5b1e61f8d70636252bfa6eb67b9f547cbd9..54896a8d55b47a8ad7fc109e4d54c07b29de5b50 100644 (file)
@@ -106,12 +106,10 @@ static curl_simple_lock s_lock = CURL_SIMPLE_LOCK_INIT;
  * ways, but at this point it must be defined as the system-supplied strdup
  * so the callback pointer is initialized correctly.
  */
-#ifdef UNDER_CE
-#define system_strdup _strdup
-#elif !defined(HAVE_STRDUP)
-#define system_strdup Curl_strdup
-#else
+#ifdef HAVE_STRDUP
 #define system_strdup strdup
+#else
+#define system_strdup Curl_strdup
 #endif
 
 #if defined(_MSC_VER) && defined(_DLL)
index 565620283403f55bcec22f969281085582495f4d..5fff5d0a82f0903c33a13b52a8f4bd4a9362d5e8 100644 (file)
@@ -572,7 +572,7 @@ static CURLcode file_do(struct Curl_easy *data, bool *done)
 
   if(data->state.resume_from) {
     if(!S_ISDIR(statbuf.st_mode)) {
-#if defined(__AMIGA__) || defined(__MINGW32CE__)
+#ifdef __AMIGA__
       if(data->state.resume_from !=
           lseek(fd, (off_t)data->state.resume_from, SEEK_SET))
 #else
index 108310bf301bd21937f5604b5bde4e98fc61896f..bcf4b809cc80561c00bc764dbe4b3c87b2cce201 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -3311,10 +3311,6 @@ static CURLcode ftp_done(struct Curl_easy *data, CURLcode status,
 
   /* shut down the socket to inform the server we are done */
 
-#ifdef UNDER_CE
-  shutdown(conn->sock[SECONDARYSOCKET], 2);  /* SD_BOTH */
-#endif
-
   if(Curl_conn_is_setup(conn, SECONDARYSOCKET)) {
     if(!result && ftpc->dont_check && data->req.maxdownload > 0) {
       /* partial download completed */
index 3bfcf707a44b16694c82a16450b9275b6f8599b6..a2d8056fcc72f362c21bbb6f093996920607edef 100644 (file)
@@ -31,7 +31,7 @@
 
 static char *GetEnv(const char *variable)
 {
-#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE) || \
+#if defined(CURL_WINDOWS_UWP) || \
   defined(__ORBIS__) || defined(__PROSPERO__) /* PlayStation 4 and 5 */
   (void)variable;
   return NULL;
index ce79e5fc4b4ea44e5e11e7a89e5bf312d4580096..48889dcb43bc84272d21ac3d3953946e590aaa80 100644 (file)
@@ -42,9 +42,7 @@
 #endif
 
 #include <setjmp.h>
-#ifndef UNDER_CE
 #include <signal.h>
-#endif
 
 #include "urldata.h"
 #include "sendf.h"
index d86a24628c464290fe0cead83f712886fc84dd61..0cc62f8152338cc9e4dee71644972128b1730487 100644 (file)
--- a/lib/md4.c
+++ b/lib/md4.c
@@ -133,12 +133,7 @@ static int MD4_Init(MD4_CTX *ctx)
 
 static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size)
 {
-#ifdef __MINGW32CE__
-  CryptHashData(ctx->hHash, (BYTE *)CURL_UNCONST(data),
-                (unsigned int) size, 0);
-#else
   CryptHashData(ctx->hHash, (const BYTE *)data, (unsigned int) size, 0);
-#endif
 }
 
 static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
index d99554a4aac9840946aaaf2f6178379b2d2a2661..4b38bb070b3281db6a1262434c89149328fb38e8 100644 (file)
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -240,11 +240,7 @@ static void my_md5_update(void *in,
                           unsigned int inputLen)
 {
   my_md5_ctx *ctx = in;
-#ifdef __MINGW32CE__
-  CryptHashData(ctx->hHash, (BYTE *)CURL_UNCONST(input), inputLen, 0);
-#else
   CryptHashData(ctx->hHash, (const BYTE *)input, inputLen, 0);
-#endif
 }
 
 static void my_md5_final(unsigned char *digest, void *in)
index 7ded52c1e97c47631d5c0fd9299b64200339d004..11e924a55b099653daee61b9abbdea06275b73f5 100644 (file)
@@ -117,7 +117,7 @@ static bool countcheck(const char *func, int line, const char *source)
                     source, line, func);
       fflush(curl_dbg_logfile); /* because it might crash now */
       /* !checksrc! disable ERRNOVAR 1 */
-      CURL_SETERRNO(ENOMEM);
+      errno = ENOMEM;
       return TRUE; /* RETURN ERROR! */
     }
     else
index 225811e65a6516fada021fec033e563fd8040e99..911afca57563d96e81bf0d06299bf39da7aa012d 100644 (file)
@@ -39,7 +39,7 @@
 /* return 0 on success, 1 on error */
 int Curl_rename(const char *oldpath, const char *newpath)
 {
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
   /* rename() on Windows does not overwrite, so we cannot use it here.
      MoveFileEx() will overwrite and is usually atomic, however it fails
      when there are open handles to the file. */
index f7bb5456133de7d8067b4e44b6af7642181a15b5..3e3205e36bf395b3021ebee983985605872b65ed 100644 (file)
@@ -214,11 +214,7 @@ static void my_sha256_update(void *in,
                              unsigned int length)
 {
   my_sha256_ctx *ctx = (my_sha256_ctx *)in;
-#ifdef __MINGW32CE__
-  CryptHashData(ctx->hHash, (BYTE *)CURL_UNCONST(data), length, 0);
-#else
   CryptHashData(ctx->hHash, (const BYTE *)data, length, 0);
-#endif
 }
 
 static void my_sha256_final(unsigned char *digest, void *in)
index 5b82d7f96556e92cc41e66abcdaa0920f8f4a37c..afe69756bcbce84a51e6b99e201cca47c4572371 100644 (file)
@@ -679,7 +679,7 @@ const char *Curl_sspi_strerror(SECURITY_STATUS err, char *buf, size_t buflen)
 #endif
 
   if(errno != old_errno)
-    CURL_SETERRNO(old_errno);
+    errno = old_errno;
 
 #ifdef _WIN32
   if(old_win_err != GetLastError())
index cd01fd2ebfe358a099341d6511d8ff954e32faa6..bdbed66162ebd81fce65fa906de8d9feaeb08e20 100644 (file)
@@ -99,15 +99,9 @@ CURLcode Curl_win32_init(long flags)
   s_hIpHlpApiDll = curl_load_library(TEXT("iphlpapi.dll"));
   if(s_hIpHlpApiDll) {
     /* Get the address of the if_nametoindex function */
-#ifdef UNDER_CE
-    #define CURL_TEXT(n) TEXT(n)
-#else
-    #define CURL_TEXT(n) (n)
-#endif
     IF_NAMETOINDEX_FN pIfNameToIndex =
       CURLX_FUNCTION_CAST(IF_NAMETOINDEX_FN,
-                          GetProcAddress(s_hIpHlpApiDll,
-                                         CURL_TEXT("if_nametoindex")));
+                          GetProcAddress(s_hIpHlpApiDll, "if_nametoindex"));
 
     if(pIfNameToIndex)
       Curl_if_nametoindex = pIfNameToIndex;
@@ -164,13 +158,9 @@ typedef HMODULE (APIENTRY *LOADLIBRARYEX_FN)(LPCTSTR, HANDLE, DWORD);
 
 /* See function definitions in winbase.h */
 #ifdef UNICODE
-#  ifdef UNDER_CE
-#    define LOADLIBARYEX  L"LoadLibraryExW"
-#  else
-#    define LOADLIBARYEX  "LoadLibraryExW"
-#  endif
+#  define LOADLIBARYEX  "LoadLibraryExW"
 #else
-#  define LOADLIBARYEX    "LoadLibraryExA"
+#  define LOADLIBARYEX  "LoadLibraryExA"
 #endif
 
 /*
@@ -189,7 +179,7 @@ typedef HMODULE (APIENTRY *LOADLIBRARYEX_FN)(LPCTSTR, HANDLE, DWORD);
  */
 static HMODULE curl_load_library(LPCTSTR filename)
 {
-#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#ifndef CURL_WINDOWS_UWP
   HMODULE hModule = NULL;
   LOADLIBRARYEX_FN pLoadLibraryEx = NULL;
 
index 4c17cbb50da0d47aa9e3f796f57e2c25fc43bdbe..2b06566f73c040d655b5d40c3ceaeb3c28167ec6 100644 (file)
@@ -39,9 +39,7 @@
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
-#ifndef UNDER_CE
 #include <signal.h>
-#endif
 
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
index f2a907cb09cb7673935911a34f19296e74cb713f..6311f4a41623ed054e1f82ada305a21d270ea007 100644 (file)
 #define CALG_SHA_256 0x0000800c
 #endif
 
-/* Work around typo in CeGCC (as of 0.59.1) w32api headers */
-#if defined(__MINGW32CE__) && \
-  !defined(ALG_CLASS_DHASH) && defined(ALG_CLASS_HASH)
-#define ALG_CLASS_DHASH ALG_CLASS_HASH
-#endif
-
 /* Offered by mingw-w64 v4+. MS SDK 6.0A+. */
 #ifndef PKCS12_NO_PERSIST_KEY
 #define PKCS12_NO_PERSIST_KEY 0x00008000
@@ -385,7 +379,6 @@ set_ssl_ciphers(SCHANNEL_CRED *schannel_cred, char *ciphers,
   return CURLE_OK;
 }
 
-#ifndef UNDER_CE
 /* Function allocates memory for store_path only if CURLE_OK is returned */
 static CURLcode
 get_cert_location(TCHAR *path, DWORD *store_name, TCHAR **store_path,
@@ -441,7 +434,6 @@ get_cert_location(TCHAR *path, DWORD *store_name, TCHAR **store_path,
 
   return CURLE_OK;
 }
-#endif
 
 static CURLcode
 schannel_acquire_credential_handle(struct Curl_cfilter *cf,
@@ -536,7 +528,6 @@ schannel_acquire_credential_handle(struct Curl_cfilter *cf,
     return CURLE_SSL_CONNECT_ERROR;
   }
 
-#ifndef UNDER_CE
   /* client certificate */
   if(data->set.ssl.primary.clientcert || data->set.ssl.primary.cert_blob) {
     DWORD cert_store_name = 0;
@@ -744,7 +735,6 @@ schannel_acquire_credential_handle(struct Curl_cfilter *cf,
     }
     client_cert_store = cert_store;
   }
-#endif
 
   /* allocate memory for the reusable credential handle */
   backend->cred = (struct Curl_schannel_cred *)
@@ -875,9 +865,7 @@ schannel_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data)
   struct ssl_connect_data *connssl = cf->ctx;
   struct schannel_ssl_backend_data *backend =
     (struct schannel_ssl_backend_data *)connssl->backend;
-#ifndef UNDER_CE
   struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
-#endif
   struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
   SecBuffer outbuf;
   SecBufferDesc outbuf_desc;
@@ -908,11 +896,6 @@ schannel_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data)
   backend->use_alpn = FALSE;
 #endif
 
-#ifdef UNDER_CE
-  /* certificate validation on Windows CE does not seem to work right; we will
-   * do it following a more manual process. */
-  backend->use_manual_cred_validation = TRUE;
-#else
   if(conn_config->CAfile || conn_config->ca_info_blob) {
     if(curlx_verify_windows_version(6, 1, 0, PLATFORM_WINNT,
                                     VERSION_GREATER_THAN_EQUAL)) {
@@ -926,7 +909,6 @@ schannel_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data)
   }
   else
     backend->use_manual_cred_validation = FALSE;
-#endif
 
   backend->cred = NULL;
 
@@ -2573,7 +2555,7 @@ static void schannel_close(struct Curl_cfilter *cf, struct Curl_easy *data)
 
 static int schannel_init(void)
 {
-#if defined(HAS_ALPN_SCHANNEL) && !defined(UNDER_CE)
+#ifdef HAS_ALPN_SCHANNEL
   typedef const char *(APIENTRY *WINE_GET_VERSION_FN)(void);
 #if defined(__clang__) && __clang_major__ >= 16
 #pragma clang diagnostic push
@@ -2581,8 +2563,7 @@ static int schannel_init(void)
 #endif
   WINE_GET_VERSION_FN p_wine_get_version =
     CURLX_FUNCTION_CAST(WINE_GET_VERSION_FN,
-                        GetProcAddress(GetModuleHandleA("ntdll"),
-                                       "wine_get_version"));
+      GetProcAddress(GetModuleHandle(TEXT("ntdll")), "wine_get_version"));
 #if defined(__clang__) && __clang_major__ >= 16
 #pragma clang diagnostic pop
 #endif
@@ -2599,7 +2580,7 @@ static int schannel_init(void)
     s_win_has_alpn = curlx_verify_windows_version(6, 3, 0, PLATFORM_WINNT,
                                                   VERSION_GREATER_THAN_EQUAL);
   }
-#endif /* HAS_ALPN_SCHANNEL && !UNDER_CE */
+#endif /* HAS_ALPN_SCHANNEL */
 
   return Curl_sspi_global_init() == CURLE_OK ? 1 : 0;
 }
@@ -2716,12 +2697,7 @@ static void schannel_checksum(const unsigned char *input,
     if(!CryptCreateHash(hProv, algId, 0, 0, &hHash))
       break; /* failed */
 
-#ifdef __MINGW32CE__
-    /* workaround for CeGCC, should be (const BYTE*) */
-    if(!CryptHashData(hHash, (BYTE*)CURL_UNCONST(input), (DWORD)inputlen, 0))
-#else
     if(!CryptHashData(hHash, input, (DWORD)inputlen, 0))
-#endif
       break; /* failed */
 
     /* get hash size */
index a5084944846fc59a9cdbbab9257ade6f0ed587a2..6b8aec5613745f6e85f07d396287906b4b758f5b 100644 (file)
 
 #define BACKEND ((struct schannel_ssl_backend_data *)connssl->backend)
 
-#ifdef __MINGW32CE__
-#define CERT_QUERY_OBJECT_BLOB 0x00000002
-#define CERT_QUERY_CONTENT_CERT 1
-#define CERT_QUERY_CONTENT_FLAG_CERT (1 << CERT_QUERY_CONTENT_CERT)
-#define CERT_QUERY_FORMAT_BINARY 1
-#define CERT_QUERY_FORMAT_BASE64_ENCODED 2
-#define CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED 3
-#define CERT_QUERY_FORMAT_FLAG_ALL               \
-  (1 << CERT_QUERY_FORMAT_BINARY) |              \
-  (1 << CERT_QUERY_FORMAT_BASE64_ENCODED) |      \
-  (1 << CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED)
-#define CERT_CHAIN_REVOCATION_CHECK_CHAIN 0x20000000
-#define CERT_NAME_DISABLE_IE4_UTF8_FLAG 0x00010000
-#define CERT_TRUST_IS_OFFLINE_REVOCATION 0x01000000
-#endif /* __MINGW32CE__ */
-
 #define MAX_CAFILE_SIZE 1048576 /* 1 MiB */
 #define BEGIN_CERT "-----BEGIN CERTIFICATE-----"
 #define END_CERT "\n-----END CERTIFICATE-----"
@@ -112,7 +96,6 @@ struct cert_chain_engine_config_win7 {
   HCERTSTORE hExclusiveTrustedPeople;
 };
 
-#ifndef UNDER_CE
 static int is_cr_or_lf(char c)
 {
   return c == '\r' || c == '\n';
@@ -534,7 +517,6 @@ static bool get_alt_name_info(struct Curl_easy *data,
   result = TRUE;
   return result;
 }
-#endif /* !UNDER_CE */
 
 /* Verify the server's hostname */
 CURLcode Curl_verify_host(struct Curl_cfilter *cf,
@@ -543,58 +525,6 @@ CURLcode Curl_verify_host(struct Curl_cfilter *cf,
   CURLcode result = CURLE_PEER_FAILED_VERIFICATION;
   struct ssl_connect_data *connssl = cf->ctx;
   CERT_CONTEXT *pCertContextServer = NULL;
-#ifdef UNDER_CE
-  TCHAR cert_hostname_buff[256];
-  DWORD len;
-
-  /* This code does not support certificates with multiple alternative names.
-   * Right now we are only asking for the first preferred alternative name.
-   * Instead we would need to do all via CERT_NAME_SEARCH_ALL_NAMES_FLAG
-   * (If Windows CE supports that?) and run this section in a loop for each.
-   * https://learn.microsoft.com/windows/win32/api/wincrypt/nf-wincrypt-certgetnamestringa
-   * curl: (51) schannel: CertGetNameString() certificate hostname
-   * (.google.com) did not match connection (google.com)
-   */
-  len = CertGetNameString(pCertContextServer,
-                          CERT_NAME_DNS_TYPE,
-                          CERT_NAME_DISABLE_IE4_UTF8_FLAG,
-                          NULL,
-                          cert_hostname_buff,
-                          256);
-  if(len > 0) {
-    /* Comparing the cert name and the connection hostname encoded as UTF-8
-     * is acceptable since both values are assumed to use ASCII
-     * (or some equivalent) encoding
-     */
-    char *cert_hostname = curlx_convert_tchar_to_UTF8(cert_hostname_buff);
-    if(!cert_hostname) {
-      result = CURLE_OUT_OF_MEMORY;
-    }
-    else{
-      const char *conn_hostname = connssl->peer.hostname;
-      if(Curl_cert_hostcheck(cert_hostname, strlen(cert_hostname),
-                             conn_hostname, strlen(conn_hostname))) {
-        infof(data,
-              "schannel: connection hostname (%s) validated "
-              "against certificate name (%s)",
-              conn_hostname, cert_hostname);
-        result = CURLE_OK;
-      }
-      else{
-        failf(data,
-              "schannel: connection hostname (%s) "
-              "does not match certificate name (%s)",
-              conn_hostname, cert_hostname);
-      }
-      Curl_safefree(cert_hostname);
-    }
-  }
-  else {
-    failf(data,
-          "schannel: CertGetNameString did not provide any "
-          "certificate name information");
-  }
-#else
   SECURITY_STATUS sspi_status;
   TCHAR *cert_hostname_buff = NULL;
   size_t cert_hostname_buff_index = 0;
@@ -740,7 +670,6 @@ cleanup:
 
   if(pCertContextServer)
     CertFreeCertificateContext(pCertContextServer);
-#endif /* !UNDER_CE */
 
   return result;
 }
@@ -757,10 +686,8 @@ CURLcode Curl_verify_certificate(struct Curl_cfilter *cf,
   CERT_CONTEXT *pCertContextServer = NULL;
   const CERT_CHAIN_CONTEXT *pChainContext = NULL;
   HCERTCHAINENGINE cert_chain_engine = NULL;
-#ifndef UNDER_CE
   HCERTSTORE trust_store = NULL;
   HCERTSTORE own_trust_store = NULL;
-#endif /* !UNDER_CE */
 
   DEBUGASSERT(BACKEND);
 
@@ -776,7 +703,6 @@ CURLcode Curl_verify_certificate(struct Curl_cfilter *cf,
     result = CURLE_PEER_FAILED_VERIFICATION;
   }
 
-#ifndef UNDER_CE
   if(result == CURLE_OK &&
      (conn_config->CAfile || conn_config->ca_info_blob) &&
      BACKEND->use_manual_cred_validation) {
@@ -870,7 +796,6 @@ CURLcode Curl_verify_certificate(struct Curl_cfilter *cf,
       }
     }
   }
-#endif /* !UNDER_CE */
 
   if(result == CURLE_OK) {
     CERT_CHAIN_PARA ChainPara;
@@ -934,7 +859,6 @@ CURLcode Curl_verify_certificate(struct Curl_cfilter *cf,
     }
   }
 
-#ifndef UNDER_CE
   if(cert_chain_engine) {
     CertFreeCertificateChainEngine(cert_chain_engine);
   }
@@ -942,7 +866,6 @@ CURLcode Curl_verify_certificate(struct Curl_cfilter *cf,
   if(own_trust_store) {
     CertCloseStore(own_trust_store, 0);
   }
-#endif /* !UNDER_CE */
 
   if(pChainContext)
     CertFreeCertificateChain(pChainContext);
index b9abc6e3faed04383009ae489554fa6a6348ed5b..328b12403e9b0ed05f5b25ff18e0b752603e2116 100644 (file)
@@ -386,10 +386,7 @@ static CURLcode cf_ssl_peer_key_add_path(struct dynbuf *buf,
      * valid when used in another process with different CWD. However,
      * when a path does not exist, this does not work. Then, we add
      * the path as is. */
-#ifdef UNDER_CE
-    (void)is_local;
-    return curlx_dyn_addf(buf, ":%s-%s", name, path);
-#elif defined(_WIN32)
+#ifdef _WIN32
     char abspath[_MAX_PATH];
     if(_fullpath(abspath, path, _MAX_PATH))
       return curlx_dyn_addf(buf, ":%s-%s", name, abspath);
index a4088003535e990ed1985888eb1eb93537476942..22eecd349f20ad424caf620ed82acaea15df93c3 100644 (file)
@@ -74,7 +74,7 @@ fi
 if test "x$xc_lt_want_enable_shared" = 'xyes' &&
   test "x$xc_lt_want_enable_static" = 'xyes'; then
   case $host_os in @%:@ (
-    cegcc* | os2* | aix*)
+    os2* | aix*)
       xc_lt_want_enable_static='no'
       ;;
   esac
@@ -265,7 +265,7 @@ elif test "x$allow_undefined_flag" = 'xunsupported'; then
   xc_lt_shlib_use_no_undefined='yes'
 fi
 case $host_os in @%:@ (
-  cygwin* | mingw* | cegcc* | os2* | aix*)
+  cygwin* | mingw* | os2* | aix*)
     xc_lt_shlib_use_no_undefined='yes'
     ;;
 esac
index a70c96b7650feb8bc7bac5bdc0ff02856df56fdc..9e2bbed8f06c6c42ae20554029dae7438ed70d55 100644 (file)
@@ -121,7 +121,7 @@ if(CURL_HAS_LTO)
   set_target_properties(${EXE_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
 endif()
 
-if(ENABLE_UNICODE AND MINGW AND NOT MINGW32CE)
+if(ENABLE_UNICODE AND MINGW)
   if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
     set_property(TARGET ${EXE_NAME} APPEND PROPERTY LINK_OPTIONS "-municode")
   else()
index 014e2df8c00bd55365315259e530a624ec7b40be..867ca6edcf88a4bfaac43149ac0ee5e842f40e97 100644 (file)
@@ -64,7 +64,7 @@ unsigned int get_terminal_columns(void)
     struct winsize ts;
     if(!ioctl(STDIN_FILENO, TIOCGWINSZ, &ts))
       cols = (int)ts.ws_col;
-#elif defined(_WIN32) && !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#elif defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
     {
       HANDLE stderr_hnd = GetStdHandle(STD_ERROR_HANDLE);
       CONSOLE_SCREEN_BUFFER_INFO console_info;
index 2ea88017051e7f44c634a1b3ac0d13d6dfbe93e4..d4431a74b951abc2c521718ba82e491b23a27512 100644 (file)
@@ -156,7 +156,7 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
           /*
            * Truncate the etag save stream, it can have an existing etag value.
            */
-#if defined(HAVE_FTRUNCATE) && !defined(__MINGW32CE__)
+#ifdef HAVE_FTRUNCATE
           if(ftruncate(fileno(etag_save->stream), 0)) {
             return CURL_WRITEFUNC_ERROR;
           }
index 6c119047ce562aa7dc2ff3264a57dea3247ebff3..cc7ef5a55079f22f472f0217d2ea2a81b1074ef9 100644 (file)
@@ -122,11 +122,11 @@ size_t tool_read_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
    On Linux per->infd should be stdin (0) and the block below should not
    execute */
   if(per->uploadfile && !strcmp(per->uploadfile, ".") && per->infd > 0) {
-#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
     rc = CURL_RECV(per->infd, buffer, curlx_uztosi(sz * nmemb), 0);
     if(rc < 0) {
       if(SOCKERRNO == SOCKEWOULDBLOCK) {
-        CURL_SETERRNO(0);
+        errno = 0;
         config->readbusy = TRUE;
         return CURL_READFUNC_PAUSE;
       }
@@ -142,7 +142,7 @@ size_t tool_read_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
     rc = read(per->infd, buffer, sz*nmemb);
     if(rc < 0) {
       if(errno == EAGAIN) {
-        CURL_SETERRNO(0);
+        errno = 0;
         config->readbusy = TRUE;
         return CURL_READFUNC_PAUSE;
       }
index 292da1c251765bf4dc071a5519499c9c99065023..fd1b4c563c803697dad8d7fcd15ca27b49950dee 100644 (file)
@@ -78,7 +78,7 @@ int tool_seek_cb(void *userdata, curl_off_t offset, int whence)
   }
 #endif
 
-#if defined(__AMIGA__) || defined(__MINGW32CE__)
+#ifdef __AMIGA__
   if(LSEEK_ERROR == lseek(per->infd, (off_t)offset, whence))
 #else
   if(LSEEK_ERROR == lseek(per->infd, offset, whence))
index 724706b7a1af7b0d13a2a41b5151324c9494cfad..48f5fea3c9b9b637bcd3fb19a61c4eec57ae010c 100644 (file)
@@ -109,7 +109,7 @@ bool tool_create_output_file(struct OutStruct *outs,
   return TRUE;
 }
 
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
 static size_t win_console(intptr_t fhnd, struct OutStruct *outs,
                           char *buffer, size_t bytes,
                           size_t *retp)
@@ -247,7 +247,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
   struct OperationConfig *config = per->config;
   size_t bytes = sz * nmemb;
   bool is_tty = global->isatty;
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
   CONSOLE_SCREEN_BUFFER_INFO console_info;
   intptr_t fhnd;
 #endif
@@ -321,7 +321,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
     }
   }
 
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
   fhnd = _get_osfhandle(fileno(outs->stream));
   /* if Windows console then UTF-8 must be converted to UTF-16 */
   if(isatty(fileno(outs->stream)) &&
index 29d5ecc782209b919d081e976f3616dd58e3399f..2ddb0ad2fcfc3bbc99d760f217b605849d80529b 100644 (file)
@@ -261,7 +261,7 @@ static void free_globalconfig(void)
   global->trace_stream = NULL;
 
   tool_safefree(global->libcurl);
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
   free(global->term.buf);
 #endif
 }
index cac22483b7df102ccb3c65cfd4fd4a8437ca0f9a..dc78f2db44f646d50f1e56f5113088d32a8e1d33 100644 (file)
@@ -326,7 +326,7 @@ struct OperationConfig {
   BIT(skip_existing);
 };
 
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
 struct termout {
   wchar_t *buf;
   DWORD len;
@@ -343,7 +343,7 @@ struct GlobalConfig {
   struct OperationConfig *first;
   struct OperationConfig *current;
   struct OperationConfig *last;
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
   struct termout term;
 #endif
   timediff_t ms_per_transfer;     /* start next transfer after (at least) this
index 91cc1b60cbd5a84cfcc4099942c5e8a179cdf6a5..17b2d01e9bc69be70aba46fdcc533fcb1cbcc100 100644 (file)
@@ -23,8 +23,8 @@
  ***************************************************************************/
 #include "tool_setup.h"
 
-#if defined(_WIN32) && !defined(UNDER_CE)
-#  include <direct.h>
+#ifdef _WIN32
+#include <direct.h>
 #endif
 
 #include "tool_dirhie.h"
index 2b19a163ce8bb2ecf26294a30872378e660c27bc..6204296a8b519527fa6f2b3b1ac50544d812d11f 100644 (file)
@@ -561,7 +561,7 @@ char **__crt0_glob_function(char *arg)
 
 #ifdef _WIN32
 
-#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE) && \
+#if !defined(CURL_WINDOWS_UWP) && \
   !defined(CURL_DISABLE_CA_SEARCH) && !defined(CURL_CA_SEARCH_SAFE)
 /* Search and set the CA cert file for Windows.
  *
@@ -613,7 +613,7 @@ CURLcode FindWin32CACert(struct OperationConfig *config,
 struct curl_slist *GetLoadedModulePaths(void)
 {
   struct curl_slist *slist = NULL;
-#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#ifndef CURL_WINDOWS_UWP
   HANDLE hnd = INVALID_HANDLE_VALUE;
   MODULEENTRY32 mod = {0};
 
@@ -664,7 +664,7 @@ cleanup:
 
 bool tool_term_has_bold;
 
-#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#ifndef CURL_WINDOWS_UWP
 /* The terminal settings to restore on exit */
 static struct TerminalSettings {
   HANDLE hStdOut;
@@ -735,14 +735,14 @@ static void init_terminal(void)
 CURLcode win32_init(void)
 {
   curlx_now_init();
-#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#ifndef CURL_WINDOWS_UWP
   init_terminal();
 #endif
 
   return CURLE_OK;
 }
 
-#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#ifndef CURL_WINDOWS_UWP
 /* The following STDIN non - blocking read techniques are heavily inspired
    by nmap and ncat (https://nmap.org/ncat/) */
 struct win_thread_data {
@@ -949,7 +949,7 @@ curl_socket_t win32_stdin_read_thread(void)
   return socket_r;
 }
 
-#endif /* !CURL_WINDOWS_UWP && !UNDER_CE */
+#endif /* !CURL_WINDOWS_UWP */
 
 #endif /* _WIN32 */
 
index 7fe5260476ea7f29fff029283c582f8afa33cd31..01500bdbf732c1a264487303ca08da697057fa6f 100644 (file)
@@ -47,7 +47,7 @@ char **__crt0_glob_function(char *arg);
 
 #ifdef _WIN32
 
-#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE) && \
+#if !defined(CURL_WINDOWS_UWP) && \
   !defined(CURL_DISABLE_CA_SEARCH) && !defined(CURL_CA_SEARCH_SAFE)
 CURLcode FindWin32CACert(struct OperationConfig *config,
                          const TCHAR *bundle_file);
@@ -55,9 +55,9 @@ CURLcode FindWin32CACert(struct OperationConfig *config,
 struct curl_slist *GetLoadedModulePaths(void);
 CURLcode win32_init(void);
 
-#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#ifndef CURL_WINDOWS_UWP
 curl_socket_t win32_stdin_read_thread(void);
-#endif /* !CURL_WINDOWS_UWP && !UNDER_CE */
+#endif
 
 #endif /* _WIN32 */
 
index 1d127a584286451adaae517d5046774b6fc1a8fa..c1e9abe9d0b8a179b3e073897eafe6e7c119c1c8 100644 (file)
@@ -121,11 +121,7 @@ static struct tool_mime *tool_mime_new_filedata(struct tool_mime *parent,
     }
   }
   else {        /* Standard input. */
-#ifdef UNDER_CE
-    int fd = STDIN_FILENO;
-#else
     int fd = fileno(stdin);
-#endif
     char *data = NULL;
     curl_off_t size;
     curl_off_t origin;
index 6b37cc50ebe72d7460482cc3aaf94a674361fe45..d5ef54a81d2480445689968bc97bc5b2ba983793 100644 (file)
@@ -379,7 +379,7 @@ void parse_cert_parameter(const char *cert_parameter,
 
 ParameterError parse_args(int argc, argv_item_t argv[]);
 
-#if defined(UNICODE) && defined(_WIN32) && !defined(UNDER_CE)
+#if defined(UNICODE) && defined(_WIN32)
 
 #define convert_UTF8_to_tchar(ptr) curlx_convert_UTF8_to_wchar((ptr))
 #define convert_tchar_to_UTF8(ptr) curlx_convert_wchar_to_UTF8((ptr))
index a4dea347efe0f7d2025fb08ec110e74eea3fe789..014c22813acf0b7e81a6184e79b6a3bd30ee26c6 100644 (file)
@@ -42,7 +42,7 @@
 #  include iodef
 #endif
 
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
 #  include <conio.h>
 #endif
 
@@ -115,7 +115,7 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
   return buffer; /* we always return success */
 }
 #define DONE
-#endif /* _WIN32 && !UNDER_CE */
+#endif /* _WIN32 */
 
 #ifndef DONE /* not previously provided */
 
index 4e70c1081cfaa93e3e468a1d2704b64c35f287d1..8df63ef05a59d44d08163a1c87aec8e7b5879f6b 100644 (file)
@@ -27,9 +27,7 @@
 #include <tchar.h>
 #endif
 
-#ifndef UNDER_CE
 #include <signal.h>
-#endif
 
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
@@ -143,7 +141,7 @@ static void memory_tracking_init(void)
 /*
 ** curl tool main function.
 */
-#if defined(_UNICODE) && !defined(UNDER_CE)
+#ifdef _UNICODE
 #if defined(__GNUC__) || defined(__clang__)
 /* GCC does not know about wmain() */
 #pragma GCC diagnostic push
@@ -159,7 +157,7 @@ int main(int argc, char *argv[])
 
   tool_init_stderr();
 
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
   /* Undocumented diagnostic option to list the full paths of all loaded
      modules. This is purposely pre-init. */
   if(argc == 2 && !_tcscmp(argv[1], _T("--dump-module-paths"))) {
@@ -169,8 +167,7 @@ int main(int argc, char *argv[])
     curl_slist_free_all(head);
     return head ? 0 : 1;
   }
-#endif
-#ifdef _WIN32
+
   /* win32_init must be called before other init routines. */
   result = win32_init();
   if(result) {
@@ -214,7 +211,7 @@ int main(int argc, char *argv[])
 #endif
 }
 
-#if defined(_UNICODE) && !defined(UNDER_CE)
+#ifdef _UNICODE
 #if defined(__GNUC__) || defined(__clang__)
 #pragma GCC diagnostic pop
 #endif
index b7c8805b3a4cc6bf59e1152a72cdf19837f99fbd..8949ce2a52f350dbf9016e33077ea6505b506125 100644 (file)
@@ -555,25 +555,19 @@ static CURLcode retrycheck(struct OperationConfig *config,
     }
 
     if(truncate && outs->bytes && outs->filename && outs->stream) {
-#ifndef __MINGW32CE__
       struct_stat fileinfo;
 
       /* The output can be a named pipe or a character device etc that
          cannot be truncated. Only truncate regular files. */
       if(!fstat(fileno(outs->stream), &fileinfo) &&
-         S_ISREG(fileinfo.st_mode))
-#else
-        /* Windows CE's fileno() is bad so just skip the check */
-#endif
-      {
+         S_ISREG(fileinfo.st_mode)) {
         int rc;
         /* We have written data to an output file, we truncate file */
         fflush(outs->stream);
         notef("Throwing away %"  CURL_FORMAT_CURL_OFF_T " bytes",
               outs->bytes);
         /* truncate file at the position where we started appending */
-#if defined(HAVE_FTRUNCATE) && !defined(__DJGPP__) && !defined(__AMIGA__) && \
-  !defined(__MINGW32CE__)
+#if defined(HAVE_FTRUNCATE) && !defined(__DJGPP__) && !defined(__AMIGA__)
         if(ftruncate(fileno(outs->stream), outs->init)) {
           /* when truncate fails, we cannot just append as then we will
              create something strange, bail out */
@@ -625,7 +619,7 @@ static CURLcode post_per_transfer(struct per_transfer *per,
 
   if(per->uploadfile) {
     if(!strcmp(per->uploadfile, ".") && per->infd > 0) {
-#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
       sclose(per->infd);
 #else
       warnf("Closing per->infd != 0: FD == "
@@ -1122,7 +1116,7 @@ static void check_stdin_upload(struct OperationConfig *config,
 
   CURLX_SET_BINMODE(stdin);
   if(!strcmp(per->uploadfile, ".")) {
-#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
     /* non-blocking stdin behavior on Windows is challenging
        Spawn a new thread that will read from stdin and write
        out to a socket */
@@ -2100,8 +2094,7 @@ static CURLcode cacertpaths(struct OperationConfig *config)
         goto fail;
       }
     }
-#elif !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE) && \
-  !defined(CURL_DISABLE_CA_SEARCH)
+#elif !defined(CURL_WINDOWS_UWP) && !defined(CURL_DISABLE_CA_SEARCH)
     result = FindWin32CACert(config, TEXT("curl-ca-bundle.crt"));
     if(result)
       goto fail;
@@ -2234,11 +2227,8 @@ CURLcode operate(int argc, argv_item_t argv[])
 {
   CURLcode result = CURLE_OK;
   const char *first_arg;
-#ifdef UNDER_CE
-  first_arg = argc > 1 ? strdup(argv[1]) : NULL;
-#else
+
   first_arg = argc > 1 ? convert_tchar_to_UTF8(argv[1]) : NULL;
-#endif
 
 #ifdef HAVE_SETLOCALE
   /* Override locale for number parsing (only) */
index 46096d5b5abed9ca99bb21904d368f7df5c98518..5fce4e24d12413ff80941cf8d685f9f13d238582 100644 (file)
@@ -100,7 +100,7 @@ ParameterError parseconfig(const char *filename, int max_recursive)
       }
       filename = pathalloc = curlrc;
     }
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
     else {
       char *fullp;
       /* check for .curlrc then _curlrc in the directory of the executable */
index a661040737b893b233c8b278fc4beb07360ec917..17c2f420b582dd3acd572fcb11d1d8e455cfc2bf 100644 (file)
@@ -93,15 +93,6 @@ extern FILE *tool_stderr;
 /* set in init_terminal() */
 extern bool tool_term_has_bold;
 
-#ifdef UNDER_CE
-#  undef isatty
-#  define isatty(fd) 0  /* fd is void*, expects int */
-#  undef _get_osfhandle
-#  define _get_osfhandle(fd) (fd)
-#  undef _getch
-#  define _getch() 0
-#endif
-
 #ifndef HAVE_FTRUNCATE
 
 int tool_ftruncate64(int fd, curl_off_t where);
index f8415d2a173972b0a526b8a199eaee7218ff53ab..a2798876ea0655112c4fe425dfd470c0ad228ca5 100644 (file)
@@ -80,17 +80,9 @@ int struplocompare4sort(const void *p1, const void *p2)
 }
 
 #ifdef USE_TOOL_FTRUNCATE
-
-#ifdef UNDER_CE
-/* 64-bit lseek-like function unavailable */
-#  undef _lseeki64
-#  define _lseeki64(hnd,ofs,whence) lseek(hnd,ofs,whence)
-#endif
-
 /*
  * Truncate a file handle at a 64-bit position 'where'.
  */
-
 int tool_ftruncate64(int fd, curl_off_t where)
 {
   intptr_t handle = _get_osfhandle(fd);
@@ -103,10 +95,9 @@ int tool_ftruncate64(int fd, curl_off_t where)
 
   return 0;
 }
-
 #endif /* USE_TOOL_FTRUNCATE */
 
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
 FILE *tool_execpath(const char *filename, char **pathp)
 {
   static char filebuffer[512];
index c97c1c03c2058abeba31427ce6a7c866169856ac..12206ce980aae093cc554e7cbfdd49cf12c4ab93 100644 (file)
@@ -34,7 +34,7 @@ struct timeval tvrealnow(void);
 int struplocompare(const char *p1, const char *p2);
 int struplocompare4sort(const void *p1, const void *p2);
 
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
 FILE *tool_execpath(const char *filename, char **pathp);
 #endif
 
index b4f7702851372fcb6487ac39763f9e27e0432782..88cbdd8a44f41bd74296ad0ec12f630168da2205 100644 (file)
@@ -61,12 +61,7 @@ static CURLcode test_lib505(const char *URL)
   }
 
   /* get the file size of the local file */
-#ifdef UNDER_CE
-  /* !checksrc! disable BANNEDFUNC 1 */
-  hd = stat(libtest_arg2, &file_info);
-#else
   hd = fstat(fileno(hd_src), &file_info);
-#endif
   if(hd == -1) {
     /* can't open file, bail out */
     curl_mfprintf(stderr, "fstat() failed with error (%d) %s\n",
index 4c33973ec9f7de58c2501038c917964c73c73689..292dd59f21bc0815e566135ee9e3e4827197955e 100644 (file)
@@ -52,12 +52,7 @@ static CURLcode test_lib525(const char *URL)
   }
 
   /* get the file size of the local file */
-#ifdef UNDER_CE
-  /* !checksrc! disable BANNEDFUNC 1 */
-  hd = stat(libtest_arg2, &file_info);
-#else
   hd = fstat(fileno(hd_src), &file_info);
-#endif
   if(hd == -1) {
     /* can't open file, bail out */
     curl_mfprintf(stderr, "fstat() failed with error (%d) %s\n",
index dfe585d9da73c2934dcc84bdc0d683b356ee0ca6..8a2b76f8d0b701cde701dfa5033684e068728f4f 100644 (file)
@@ -52,12 +52,7 @@ static CURLcode test_lib541(const char *URL)
   }
 
   /* get the file size of the local file */
-#ifdef UNDER_CE
-  /* !checksrc! disable BANNEDFUNC 1 */
-  hd = stat(libtest_arg2, &file_info);
-#else
   hd = fstat(fileno(hd_src), &file_info);
-#endif
   if(hd == -1) {
     /* can't open file, bail out */
     curl_mfprintf(stderr, "fstat() failed with error (%d) %s\n",
index 78b89975e8ac522047fb0035f714020239576879..daf92fe1e6009144bd7fe455cdc4146fa169578d 100644 (file)
@@ -80,11 +80,7 @@ again:
 
       if(nread) {
         /* send received stuff to stdout */
-#ifdef UNDER_CE
-        if((size_t)fwrite(buf, sizeof(buf[0]), nread, stdout) != nread) {
-#else
         if((size_t)write(STDOUT_FILENO, buf, nread) != nread) {
-#endif
           char errbuf[STRERROR_LEN];
           curl_mfprintf(stderr, "write() failed: errno %d (%s)\n",
                         errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
index e013daedff8a23c5ec6cd91cc7e8a6e8e8e6d906..9601f29c71bc16307151ab3a18a3a5360b1fc62c 100644 (file)
@@ -254,12 +254,7 @@ static CURLcode test_lib582(const char *URL)
   }
 
   /* get the file size of the local file */
-#ifdef UNDER_CE
-  /* !checksrc! disable BANNEDFUNC 1 */
-  hd = stat(libtest_arg2, &file_info);
-#else
   hd = fstat(fileno(hd_src), &file_info);
-#endif
   if(hd == -1) {
     /* can't open file, bail out */
     curl_mfprintf(stderr, "fstat() failed with error (%d) %s\n",
index 3a7255ccb88f1b52501361210d66dfd0061a4878..fc581487e6947041998f7625e53dece032093398 100644 (file)
@@ -48,9 +48,7 @@ struct entry_s {
 
 extern const struct entry_s s_entries[];
 
-#ifndef UNDER_CE
 #include <signal.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index 7320fa6fe9a25be182740bd73553185b31716395..b4896260b94e562442c4539d2a58270346f1681e 100644 (file)
@@ -101,7 +101,7 @@ enum sockmode {
   ACTIVE_DISCONNECT  /* as a client, disconnected from server */
 };
 
-#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
 /*
  * read-wrapper to support reading from stdin on Windows.
  */
@@ -128,7 +128,7 @@ static ssize_t read_wincon(int fd, void *buf, size_t count)
     return rcount;
   }
 
-  CURL_SETERRNO((int)GetLastError());
+  errno = (int)GetLastError();
   return -1;
 }
 
@@ -161,7 +161,7 @@ static ssize_t write_wincon(int fd, const void *buf, size_t count)
     return wcount;
   }
 
-  CURL_SETERRNO((int)GetLastError());
+  errno = (int)GetLastError();
   return -1;
 }
 #define SOCKFILT_read  read_wincon
@@ -171,8 +171,6 @@ static ssize_t write_wincon(int fd, const void *buf, size_t count)
 #define SOCKFILT_write write
 #endif
 
-#ifndef UNDER_CE
-
 /* On Windows, we sometimes get this for a broken pipe, seemingly
  * when the client just closed stdin? */
 #define CURL_WIN32_EPIPE      109
@@ -296,7 +294,6 @@ static bool read_stdin(void *buffer, size_t nbytes)
   }
   return TRUE;
 }
-#endif
 
 /*
  * write_stdout tries to write to stdio nbytes from the given buffer. This is a
@@ -308,12 +305,7 @@ static bool read_stdin(void *buffer, size_t nbytes)
 static bool write_stdout(const void *buffer, size_t nbytes)
 {
   ssize_t nwrite;
-#ifdef UNDER_CE
-  puts(buffer);
-  nwrite = nbytes;
-#else
   nwrite = fullwrite(fileno(stdout), buffer, nbytes);
-#endif
   if(nwrite != (ssize_t)nbytes) {
     logmsg("exiting...");
     return FALSE;
@@ -321,7 +313,6 @@ static bool write_stdout(const void *buffer, size_t nbytes)
   return TRUE;
 }
 
-#ifndef UNDER_CE
 static void lograw(unsigned char *buffer, ssize_t len)
 {
   char data[120];
@@ -401,10 +392,8 @@ static bool read_data_block(unsigned char *buffer, ssize_t maxlen,
 
   return TRUE;
 }
-#endif
 
-
-#if defined(USE_WINSOCK) && !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#if defined(USE_WINSOCK) && !defined(CURL_WINDOWS_UWP)
 /*
  * Winsock select() does not support standard file descriptors,
  * it can only check SOCKETs. The following function is an attempt
@@ -867,8 +856,6 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
 #define SOCKFILT_select(a,b,c,d,e) select(a,b,c,d,e)
 #endif  /* USE_WINSOCK */
 
-
-#ifndef UNDER_CE
 /* Perform the disconnect handshake with sockfilt
  * This involves waiting for the disconnect acknowledgment after the DISC
  * command, while throwing away anything else that might come in before
@@ -923,7 +910,6 @@ static bool disc_handshake(void)
   } while(TRUE);
   return TRUE;
 }
-#endif
 
 /*
   sockfdp is a pointer to an established stream or CURL_SOCKET_BAD
@@ -935,12 +921,6 @@ static bool juggle(curl_socket_t *sockfdp,
                    curl_socket_t listenfd,
                    enum sockmode *mode)
 {
-#ifdef UNDER_CE
-  (void)sockfdp;
-  (void)listenfd;
-  (void)mode;
-  return FALSE;
-#else
   struct timeval timeout;
   fd_set fds_read;
   fd_set fds_write;
@@ -1217,7 +1197,6 @@ static bool juggle(curl_socket_t *sockfdp,
   }
 
   return TRUE;
-#endif
 }
 
 static int test_sockfilt(int argc, char *argv[])
index 6de8000327bd09f1eef73668d97e512ef00e6afb..afe69862636a0f2b61455f2e82fe6e376ee6be49 100644 (file)
@@ -333,7 +333,7 @@ static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
 static SIGHANDLER_T old_sigbreak_handler = SIG_ERR;
 #endif
 
-#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
 static DWORD thread_main_id = 0;
 static HANDLE thread_main_window = NULL;
 static HWND hidden_main_window = NULL;
@@ -344,7 +344,6 @@ static HWND hidden_main_window = NULL;
  * The first time this is called it will set got_exit_signal to one and
  * store in exit_signal the signal that triggered its execution.
  */
-#ifndef UNDER_CE
 /*
  * Only call signal-safe functions from the signal handler, as required by
  * the POSIX specification:
@@ -387,11 +386,10 @@ static void exit_signal_handler(int signum)
 #endif
   }
   (void)signal(signum, exit_signal_handler);
-  CURL_SETERRNO(old_errno);
+  errno = old_errno;
 }
-#endif
 
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
 /* CTRL event handler for Windows Console applications to simulate
  * SIGINT, SIGTERM and SIGBREAK on CTRL events and trigger signal handler.
  *
@@ -439,7 +437,7 @@ static BOOL WINAPI ctrl_event_handler(DWORD dwCtrlType)
 }
 #endif
 
-#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
 /* Window message handler for Windows applications to add support
  * for graceful process termination via taskkill (without /f) which
  * sends WM_CLOSE to all Windows of a process (even hidden ones).
@@ -519,7 +517,6 @@ static DWORD WINAPI main_window_loop(void *lpParameter)
 }
 #endif
 
-#ifndef UNDER_CE
 static SIGHANDLER_T set_signal(int signum, SIGHANDLER_T handler,
                                bool restartable)
 {
@@ -549,7 +546,6 @@ static SIGHANDLER_T set_signal(int signum, SIGHANDLER_T handler,
   return oldhdlr;
 #endif
 }
-#endif
 
 void install_signal_handlers(bool keep_sigalrm)
 {
@@ -608,12 +604,10 @@ void install_signal_handlers(bool keep_sigalrm)
            errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
 #endif
 #ifdef _WIN32
-#ifndef UNDER_CE
   if(!SetConsoleCtrlHandler(ctrl_event_handler, TRUE))
     logmsg("cannot install CTRL event handler");
-#endif
 
-#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#ifndef CURL_WINDOWS_UWP
   thread_main_window = CreateThread(NULL, 0, &main_window_loop,
                                     GetModuleHandle(NULL), 0, &thread_main_id);
   if(!thread_main_window || !thread_main_id)
@@ -653,10 +647,8 @@ void restore_signal_handlers(bool keep_sigalrm)
     (void)set_signal(SIGBREAK, old_sigbreak_handler, FALSE);
 #endif
 #ifdef _WIN32
-#ifndef UNDER_CE
   (void)SetConsoleCtrlHandler(ctrl_event_handler, FALSE);
-#endif
-#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
+#ifndef CURL_WINDOWS_UWP
   if(thread_main_window && thread_main_id) {
     if(PostThreadMessage(thread_main_id, WM_APP, 0, 0)) {
       if(WaitForSingleObjectEx(thread_main_window, INFINITE, TRUE)) {