build: drop Windows CE / CeGCC support

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 f98c0ba834 #17924
Follow-up to 8491e6574c #17379
Follow-up to 2a292c3984 #15975

Closes #17927
This commit is contained in:
Viktor Szakats 2025-07-15 00:36:08 +02:00
parent 2dc71ba8bf
commit 554dfa5568
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
81 changed files with 166 additions and 975 deletions

View 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[])