# 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()
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)
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()
# 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")
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()
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()
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()
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"
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})
endif()
endif()
endif()
-if(ENABLE_IPV6 AND NOT WINCE)
+if(ENABLE_IPV6)
set(USE_IPV6 ON)
endif()
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()
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})
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")
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()
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()
# 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)
# 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)
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)
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)
# 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()
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
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
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
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
])
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
)
)
-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])
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
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"
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
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])
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
- 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)
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,
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
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 */
}
* 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
#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"
}
/* 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 */
#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
}
/* 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 */
}
f = fopen(localpath, "rb");
if(!f) {
-#ifndef UNDER_CE
perror(NULL);
-#endif
return 0;
}
#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
#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
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;
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 */
}
*
*/
-#ifndef UNDER_CE
#include <errno.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
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) {
}
}
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;
}
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);
f = fopen(localpath, "rb");
if(!f) {
-#ifndef UNDER_CE
perror(NULL);
-#endif
return 0;
}
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);
# 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>
err_exit:
CURL_TRC_DNS(data, "resolve thread failed init: %d", err);
async_thrdd_destroy(data);
- CURL_SETERRNO(err);
+ errno = err;
return FALSE;
}
*
* 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) {
/* 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. */
# 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 */
addr[0] = '\0';
*port = 0;
- CURL_SETERRNO(SOCKEAFNOSUPPORT);
+ errno = SOCKEAFNOSUPPORT;
return FALSE;
}
*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);
#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
*/
/* 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
#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>
#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 *
/* 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;
}
#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)
#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
rc = pthread_create(t, NULL, curl_thread_create_thunk, ac);
if(rc) {
- CURL_SETERRNO(rc);
+ errno = rc;
goto err;
}
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;
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);
#endif
}
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
#include "multibyte.h"
}
else
/* !checksrc! disable ERRNOVAR 1 */
- CURL_SETERRNO(EINVAL);
+ errno = EINVAL;
#else
if(fix_excessive_path(filename, &fixed))
target = fixed;
}
else
/* !checksrc! disable ERRNOVAR 1 */
- CURL_SETERRNO(EINVAL);
+ errno = EINVAL;
curlx_unicodefree(filename_w);
curlx_unicodefree(mode_w);
#else
}
else
/* !checksrc! disable ERRNOVAR 1 */
- CURL_SETERRNO(EINVAL);
+ errno = EINVAL;
#else
if(fix_excessive_path(path, &fixed))
target = fixed;
return result;
}
-#endif /* _WIN32 && !UNDER_CE */
+#endif /* _WIN32 */
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, ...);
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;
}
*/
if((size_t)(tp - tmp) > size) {
#ifdef USE_WINSOCK
- CURL_SETERRNO(WSAEINVAL);
+ errno = WSAEINVAL;
#else
- CURL_SETERRNO(ENOSPC);
+ errno = ENOSPC;
#endif
return NULL;
}
case AF_INET6:
return inet_ntop6((const unsigned char *)src, buf, size);
default:
- CURL_SETERRNO(SOCKEAFNOSUPPORT);
+ errno = SOCKEAFNOSUPPORT;
return NULL;
}
}
case AF_INET6:
return inet_pton6(src, (unsigned char *)dst);
default:
- CURL_SETERRNO(SOCKEAFNOSUPPORT);
+ errno = SOCKEAFNOSUPPORT;
return -1;
}
/* NOTREACHED */
*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) &&
*p = '\0';
if(errno != old_errno)
- CURL_SETERRNO(old_errno);
+ errno = old_errno;
#ifdef _WIN32
if(old_win_err != GetLastError())
/* 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;
#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
/* 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)) {
#endif
if(errno != old_errno)
- CURL_SETERRNO(old_errno);
+ errno = old_errno;
if(old_win_err != GetLastError())
SetLastError(old_win_err);
* 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)
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
/* 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 */
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;
#endif
#include <setjmp.h>
-#ifndef UNDER_CE
#include <signal.h>
-#endif
#include "urldata.h"
#include "sendf.h"
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)
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)
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
/* 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. */
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)
#endif
if(errno != old_errno)
- CURL_SETERRNO(old_errno);
+ errno = old_errno;
#ifdef _WIN32
if(old_win_err != GetLastError())
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;
/* 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
/*
*/
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;
#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>
#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
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,
return CURLE_OK;
}
-#endif
static CURLcode
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;
}
client_cert_store = cert_store;
}
-#endif
/* allocate memory for the reusable credential handle */
backend->cred = (struct Curl_schannel_cred *)
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;
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)) {
}
else
backend->use_manual_cred_validation = FALSE;
-#endif
backend->cred = NULL;
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
#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
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;
}
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 */
#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-----"
HCERTSTORE hExclusiveTrustedPeople;
};
-#ifndef UNDER_CE
static int is_cr_or_lf(char c)
{
return c == '\r' || c == '\n';
result = TRUE;
return result;
}
-#endif /* !UNDER_CE */
/* Verify the server's hostname */
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;
if(pCertContextServer)
CertFreeCertificateContext(pCertContextServer);
-#endif /* !UNDER_CE */
return result;
}
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);
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) {
}
}
}
-#endif /* !UNDER_CE */
if(result == CURLE_OK) {
CERT_CHAIN_PARA ChainPara;
}
}
-#ifndef UNDER_CE
if(cert_chain_engine) {
CertFreeCertificateChainEngine(cert_chain_engine);
}
if(own_trust_store) {
CertCloseStore(own_trust_store, 0);
}
-#endif /* !UNDER_CE */
if(pChainContext)
CertFreeCertificateChain(pChainContext);
* 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);
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
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
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()
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;
/*
* 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;
}
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;
}
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;
}
}
#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))
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)
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
}
}
-#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)) &&
global->trace_stream = NULL;
tool_safefree(global->libcurl);
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
free(global->term.buf);
#endif
}
BIT(skip_existing);
};
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
struct termout {
wchar_t *buf;
DWORD len;
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
***************************************************************************/
#include "tool_setup.h"
-#if defined(_WIN32) && !defined(UNDER_CE)
-# include <direct.h>
+#ifdef _WIN32
+#include <direct.h>
#endif
#include "tool_dirhie.h"
#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.
*
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};
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;
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 {
return socket_r;
}
-#endif /* !CURL_WINDOWS_UWP && !UNDER_CE */
+#endif /* !CURL_WINDOWS_UWP */
#endif /* _WIN32 */
#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);
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 */
}
}
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;
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))
# include iodef
#endif
-#if defined(_WIN32) && !defined(UNDER_CE)
+#ifdef _WIN32
# include <conio.h>
#endif
return buffer; /* we always return success */
}
#define DONE
-#endif /* _WIN32 && !UNDER_CE */
+#endif /* _WIN32 */
#ifndef DONE /* not previously provided */
#include <tchar.h>
#endif
-#ifndef UNDER_CE
#include <signal.h>
-#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
/*
** 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
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"))) {
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) {
#endif
}
-#if defined(_UNICODE) && !defined(UNDER_CE)
+#ifdef _UNICODE
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic pop
#endif
}
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 */
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 == "
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 */
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;
{
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) */
}
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 */
/* 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);
}
#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);
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];
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
}
/* 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",
}
/* 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",
}
/* 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",
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)));
}
/* 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",
extern const struct entry_s s_entries[];
-#ifndef UNDER_CE
#include <signal.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
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.
*/
return rcount;
}
- CURL_SETERRNO((int)GetLastError());
+ errno = (int)GetLastError();
return -1;
}
return wcount;
}
- CURL_SETERRNO((int)GetLastError());
+ errno = (int)GetLastError();
return -1;
}
#define SOCKFILT_read read_wincon
#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
}
return TRUE;
}
-#endif
/*
* write_stdout tries to write to stdio nbytes from the given buffer. This is a
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;
return TRUE;
}
-#ifndef UNDER_CE
static void lograw(unsigned char *buffer, ssize_t len)
{
char data[120];
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
#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
} while(TRUE);
return TRUE;
}
-#endif
/*
sockfdp is a pointer to an established stream or CURL_SOCKET_BAD
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;
}
return TRUE;
-#endif
}
static int test_sockfilt(int argc, char *argv[])
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;
* 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:
#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.
*
}
#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).
}
#endif
-#ifndef UNDER_CE
static SIGHANDLER_T set_signal(int signum, SIGHANDLER_T handler,
bool restartable)
{
return oldhdlr;
#endif
}
-#endif
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)
(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)) {